@stream-io/video-client 1.15.3 → 1.15.5

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,20 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.15.5](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.15.4...@stream-io/video-client-1.15.5) (2025-01-24)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * remove the participants from state when leaving call ([003ac26](https://github.com/GetStream/stream-video-js/commit/003ac26eff3c14779d5f25e6e64973c88a5b811d))
11
+
12
+ ## [1.15.4](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.15.3...@stream-io/video-client-1.15.4) (2025-01-23)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * leave ringing call if accepted or rejected elsewhere ([#1654](https://github.com/GetStream/stream-video-js/issues/1654)) ([9f25adf](https://github.com/GetStream/stream-video-js/commit/9f25adf8796db369f7e3e236e6a178f525ae8f55))
18
+
5
19
  ## [1.15.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.15.2...@stream-io/video-client-1.15.3) (2025-01-21)
6
20
 
7
21
 
@@ -3597,6 +3597,9 @@ const withoutConcurrency = createRunner(wrapWithContinuationTracking);
3597
3597
  */
3598
3598
  const withCancellation = createRunner(wrapWithCancellation);
3599
3599
  const pendingPromises = new Map();
3600
+ function hasPending(tag) {
3601
+ return pendingPromises.has(tag);
3602
+ }
3600
3603
  async function settled(tag) {
3601
3604
  await pendingPromises.get(tag)?.promise;
3602
3605
  }
@@ -7353,7 +7356,7 @@ const aggregate = (stats) => {
7353
7356
  return report;
7354
7357
  };
7355
7358
 
7356
- const version = "1.15.3";
7359
+ const version = "1.15.5";
7357
7360
  const [major, minor, patch] = version.split('.');
7358
7361
  let sdkInfo = {
7359
7362
  type: SdkType.PLAIN_JAVASCRIPT,
@@ -10062,7 +10065,7 @@ class Call {
10062
10065
  }
10063
10066
  }));
10064
10067
  this.leaveCallHooks.add(
10065
- // cancel auto-drop when call is
10068
+ // cancel auto-drop when call is accepted or rejected
10066
10069
  createSubscription(this.state.session$, (session) => {
10067
10070
  if (!this.ringing)
10068
10071
  return;
@@ -10074,6 +10077,13 @@ class Call {
10074
10077
  if (isAcceptedByMe || isRejectedByMe) {
10075
10078
  this.cancelAutoDrop();
10076
10079
  }
10080
+ const isAcceptedElsewhere = isAcceptedByMe && this.state.callingState === CallingState.RINGING;
10081
+ if ((isAcceptedElsewhere || isRejectedByMe) &&
10082
+ !hasPending(this.joinLeaveConcurrencyTag)) {
10083
+ this.leave().catch(() => {
10084
+ this.logger('error', 'Could not leave a call that was accepted or rejected elsewhere');
10085
+ });
10086
+ }
10077
10087
  }));
10078
10088
  this.leaveCallHooks.add(
10079
10089
  // "ringing" mode effects and event handlers
@@ -10243,6 +10253,7 @@ class Call {
10243
10253
  this.sfuClient = undefined;
10244
10254
  this.dynascaleManager.setSfuClient(undefined);
10245
10255
  this.state.setCallingState(CallingState.LEFT);
10256
+ this.state.setParticipants([]);
10246
10257
  this.state.dispose();
10247
10258
  // Call all leave call hooks, e.g. to clean up global event handlers
10248
10259
  this.leaveCallHooks.forEach((hook) => hook());
@@ -12852,7 +12863,7 @@ class StreamClient {
12852
12863
  return await this.wsConnection.connect(this.defaultWSTimeout);
12853
12864
  };
12854
12865
  this.getUserAgent = () => {
12855
- const version = "1.15.3";
12866
+ const version = "1.15.5";
12856
12867
  return (this.userAgent ||
12857
12868
  `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
12858
12869
  };