@stream-io/video-client 0.7.12 → 0.7.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -8906,7 +8906,7 @@ class StreamSfuClient {
8906
8906
  return retryable(() => this.rpc.updateSubscriptions({
8907
8907
  sessionId: this.sessionId,
8908
8908
  tracks: subscriptions,
8909
- }), this.logger);
8909
+ }), this.logger, 'debug');
8910
8910
  };
8911
8911
  this.setPublisher = async (data) => {
8912
8912
  return retryable(() => this.rpc.setPublisher({
@@ -8952,7 +8952,7 @@ class StreamSfuClient {
8952
8952
  return retryable(() => this.rpc.sendStats({
8953
8953
  ...stats,
8954
8954
  sessionId: this.sessionId,
8955
- }), this.logger);
8955
+ }), this.logger, 'debug');
8956
8956
  };
8957
8957
  this.startNoiseCancellation = async () => {
8958
8958
  return retryable(() => this.rpc.startNoiseCancellation({
@@ -9089,7 +9089,7 @@ const MAX_RETRIES = 5;
9089
9089
  * @param <I> the type of the request object.
9090
9090
  * @param <O> the type of the response object.
9091
9091
  */
9092
- const retryable = async (rpc, logger) => {
9092
+ const retryable = async (rpc, logger, level = 'error') => {
9093
9093
  let retryAttempt = 0;
9094
9094
  let rpcCallResult;
9095
9095
  do {
@@ -9098,10 +9098,9 @@ const retryable = async (rpc, logger) => {
9098
9098
  await sleep(retryInterval(retryAttempt));
9099
9099
  }
9100
9100
  rpcCallResult = await rpc();
9101
- logger('trace', `SFU RPC response received for ${rpcCallResult.method.name}`, rpcCallResult);
9102
9101
  // if the RPC call failed, log the error and retry
9103
9102
  if (rpcCallResult.response.error) {
9104
- logger('error', `SFU RPC Error (${rpcCallResult.method.name}):`, rpcCallResult.response.error);
9103
+ logger(level, `SFU RPC Error (${rpcCallResult.method.name}):`, rpcCallResult.response.error);
9105
9104
  }
9106
9105
  retryAttempt++;
9107
9106
  } while (rpcCallResult.response.error?.shouldRetry &&
@@ -14913,7 +14912,7 @@ class StreamClient {
14913
14912
  });
14914
14913
  };
14915
14914
  this.getUserAgent = () => {
14916
- const version = "0.7.12" ;
14915
+ const version = "0.7.13" ;
14917
14916
  return (this.userAgent ||
14918
14917
  `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
14919
14918
  };