@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.es.js CHANGED
@@ -8886,7 +8886,7 @@ class StreamSfuClient {
8886
8886
  return retryable(() => this.rpc.updateSubscriptions({
8887
8887
  sessionId: this.sessionId,
8888
8888
  tracks: subscriptions,
8889
- }), this.logger);
8889
+ }), this.logger, 'debug');
8890
8890
  };
8891
8891
  this.setPublisher = async (data) => {
8892
8892
  return retryable(() => this.rpc.setPublisher({
@@ -8932,7 +8932,7 @@ class StreamSfuClient {
8932
8932
  return retryable(() => this.rpc.sendStats({
8933
8933
  ...stats,
8934
8934
  sessionId: this.sessionId,
8935
- }), this.logger);
8935
+ }), this.logger, 'debug');
8936
8936
  };
8937
8937
  this.startNoiseCancellation = async () => {
8938
8938
  return retryable(() => this.rpc.startNoiseCancellation({
@@ -9069,7 +9069,7 @@ const MAX_RETRIES = 5;
9069
9069
  * @param <I> the type of the request object.
9070
9070
  * @param <O> the type of the response object.
9071
9071
  */
9072
- const retryable = async (rpc, logger) => {
9072
+ const retryable = async (rpc, logger, level = 'error') => {
9073
9073
  let retryAttempt = 0;
9074
9074
  let rpcCallResult;
9075
9075
  do {
@@ -9078,10 +9078,9 @@ const retryable = async (rpc, logger) => {
9078
9078
  await sleep(retryInterval(retryAttempt));
9079
9079
  }
9080
9080
  rpcCallResult = await rpc();
9081
- logger('trace', `SFU RPC response received for ${rpcCallResult.method.name}`, rpcCallResult);
9082
9081
  // if the RPC call failed, log the error and retry
9083
9082
  if (rpcCallResult.response.error) {
9084
- logger('error', `SFU RPC Error (${rpcCallResult.method.name}):`, rpcCallResult.response.error);
9083
+ logger(level, `SFU RPC Error (${rpcCallResult.method.name}):`, rpcCallResult.response.error);
9085
9084
  }
9086
9085
  retryAttempt++;
9087
9086
  } while (rpcCallResult.response.error?.shouldRetry &&
@@ -14893,7 +14892,7 @@ class StreamClient {
14893
14892
  });
14894
14893
  };
14895
14894
  this.getUserAgent = () => {
14896
- const version = "0.7.12" ;
14895
+ const version = "0.7.13" ;
14897
14896
  return (this.userAgent ||
14898
14897
  `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
14899
14898
  };