@stream-io/video-client 0.5.4 → 0.5.6

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
@@ -8602,7 +8602,7 @@ class StreamSfuClient {
8602
8602
  this.unhealthyTimeoutInMs = this.pingIntervalInMs + 5 * 1000;
8603
8603
  this.close = (code = StreamSfuClient.NORMAL_CLOSURE, reason = 'js-client: requested signal connection close') => {
8604
8604
  this.logger('debug', 'Closing SFU WS connection', code, reason);
8605
- if (this.signalWs.readyState === this.signalWs.CLOSED) {
8605
+ if (this.signalWs.readyState !== this.signalWs.CLOSED) {
8606
8606
  this.signalWs.close(code, reason);
8607
8607
  }
8608
8608
  this.unsubscribeIceTrickle();
@@ -8818,7 +8818,8 @@ const watchCallAccepted = (call) => {
8818
8818
  return;
8819
8819
  }
8820
8820
  const { state } = call;
8821
- if (state.callingState === exports.CallingState.RINGING) {
8821
+ if (event.call.created_by.id === call.currentUserId &&
8822
+ state.callingState === exports.CallingState.RINGING) {
8822
8823
  await call.join();
8823
8824
  }
8824
8825
  };
@@ -14256,7 +14257,7 @@ class StreamClient {
14256
14257
  });
14257
14258
  };
14258
14259
  this.getUserAgent = () => {
14259
- const version = "0.5.4" ;
14260
+ const version = "0.5.6" ;
14260
14261
  return (this.userAgent ||
14261
14262
  `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
14262
14263
  };