@stream-io/video-client 1.11.9 → 1.11.10

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.11.10](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.11.9...@stream-io/video-client-1.11.10) (2024-11-28)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * ringing calls not being left when ended ([#1601](https://github.com/GetStream/stream-video-js/issues/1601)) ([1c2b9d1](https://github.com/GetStream/stream-video-js/commit/1c2b9d1a54767652acc52cae9bb3d348c9df566f))
11
+
5
12
  ## [1.11.9](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.11.8...@stream-io/video-client-1.11.9) (2024-11-27)
6
13
 
7
14
 
@@ -3297,7 +3297,7 @@ const retryable = async (rpc, signal) => {
3297
3297
  return result;
3298
3298
  };
3299
3299
 
3300
- const version = "1.11.9";
3300
+ const version = "1.11.10";
3301
3301
  const [major, minor, patch] = version.split('.');
3302
3302
  let sdkInfo = {
3303
3303
  type: SdkType.PLAIN_JAVASCRIPT,
@@ -6781,7 +6781,9 @@ const watchCallEnded = (call) => {
6781
6781
  const { callingState } = call.state;
6782
6782
  if (callingState !== CallingState.IDLE &&
6783
6783
  callingState !== CallingState.LEFT) {
6784
- call.leave({ reason: 'call.ended event received' }).catch((err) => {
6784
+ call
6785
+ .leave({ reason: 'call.ended event received', reject: false })
6786
+ .catch((err) => {
6785
6787
  call.logger('error', 'Failed to leave call after call.ended ', err);
6786
6788
  });
6787
6789
  }
@@ -9923,7 +9925,7 @@ class Call {
9923
9925
  /**
9924
9926
  * Leave the call and stop the media streams that were published by the call.
9925
9927
  */
9926
- this.leave = async ({ reject = false, reason = 'user is leaving the call', } = {}) => {
9928
+ this.leave = async ({ reject, reason = 'user is leaving the call', } = {}) => {
9927
9929
  await withoutConcurrency(this.joinLeaveConcurrencyTag, async () => {
9928
9930
  const callingState = this.state.callingState;
9929
9931
  if (callingState === CallingState.LEFT) {
@@ -9939,14 +9941,15 @@ class Call {
9939
9941
  };
9940
9942
  await waitUntilCallJoined();
9941
9943
  }
9942
- if (callingState === CallingState.RINGING) {
9944
+ if (callingState === CallingState.RINGING && reject !== false) {
9943
9945
  if (reject) {
9944
9946
  await this.reject(reason);
9945
9947
  }
9946
9948
  else {
9949
+ // if reject was undefined, we still have to cancel the call automatically
9950
+ // when I am the creator and everyone else left the call
9947
9951
  const hasOtherParticipants = this.state.remoteParticipants.length > 0;
9948
9952
  if (this.isCreatedByMe && !hasOtherParticipants) {
9949
- // I'm the one who started the call, so I should cancel it when there are no other participants.
9950
9953
  await this.reject('cancel');
9951
9954
  }
9952
9955
  }
@@ -12614,7 +12617,7 @@ class StreamClient {
12614
12617
  return await this.wsConnection.connect(this.defaultWSTimeout);
12615
12618
  };
12616
12619
  this.getUserAgent = () => {
12617
- const version = "1.11.9";
12620
+ const version = "1.11.10";
12618
12621
  return (this.userAgent ||
12619
12622
  `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
12620
12623
  };