@stream-io/video-client 1.15.2 → 1.15.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-client",
3
- "version": "1.15.2",
3
+ "version": "1.15.3",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
package/src/Call.ts CHANGED
@@ -849,25 +849,32 @@ export class Call {
849
849
  const preferredSubscribeOptions = !isReconnecting
850
850
  ? this.getPreferredSubscribeOptions()
851
851
  : [];
852
- const { callState, fastReconnectDeadlineSeconds, publishOptions } =
853
- await sfuClient.join({
854
- subscriberSdp,
855
- publisherSdp,
856
- clientDetails,
857
- fastReconnect: performingFastReconnect,
858
- reconnectDetails,
859
- preferredPublishOptions,
860
- preferredSubscribeOptions,
861
- });
862
852
 
863
- this.currentPublishOptions = publishOptions;
864
- this.fastReconnectDeadlineSeconds = fastReconnectDeadlineSeconds;
865
- if (callState) {
866
- this.state.updateFromSfuCallState(
867
- callState,
868
- sfuClient.sessionId,
869
- reconnectDetails,
870
- );
853
+ try {
854
+ const { callState, fastReconnectDeadlineSeconds, publishOptions } =
855
+ await sfuClient.join({
856
+ subscriberSdp,
857
+ publisherSdp,
858
+ clientDetails,
859
+ fastReconnect: performingFastReconnect,
860
+ reconnectDetails,
861
+ preferredPublishOptions,
862
+ preferredSubscribeOptions,
863
+ });
864
+
865
+ this.currentPublishOptions = publishOptions;
866
+ this.fastReconnectDeadlineSeconds = fastReconnectDeadlineSeconds;
867
+ if (callState) {
868
+ this.state.updateFromSfuCallState(
869
+ callState,
870
+ sfuClient.sessionId,
871
+ reconnectDetails,
872
+ );
873
+ }
874
+ } catch (error) {
875
+ // restore the previous call state if the join-flow fails
876
+ this.state.setCallingState(callingState);
877
+ throw error;
871
878
  }
872
879
  }
873
880