@stream-io/video-client 1.11.0 → 1.11.2

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.11.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.11.1...@stream-io/video-client-1.11.2) (2024-11-14)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * fully reset token manager on user disconnect ([#1578](https://github.com/GetStream/stream-video-js/issues/1578)) ([6751abc](https://github.com/GetStream/stream-video-js/commit/6751abc0507085bd7c9f3f803f4c5929e0598bea)), closes [#1573](https://github.com/GetStream/stream-video-js/issues/1573)
11
+
12
+ ## [1.11.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.11.0...@stream-io/video-client-1.11.1) (2024-11-14)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * reject was not called on timeout, decline and cancel scenarios ([#1576](https://github.com/GetStream/stream-video-js/issues/1576)) ([8be76a4](https://github.com/GetStream/stream-video-js/commit/8be76a447729aeba7f5c68f8a9bb85b4738cb76d))
18
+
5
19
  ## [1.11.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.10.5...@stream-io/video-client-1.11.0) (2024-11-13)
6
20
 
7
21
 
@@ -3335,7 +3335,7 @@ const retryable = async (rpc, signal) => {
3335
3335
  return result;
3336
3336
  };
3337
3337
 
3338
- const version = "1.11.0";
3338
+ const version = "1.11.2";
3339
3339
  const [major, minor, patch] = version.split('.');
3340
3340
  let sdkInfo = {
3341
3341
  type: SdkType.PLAIN_JAVASCRIPT,
@@ -9891,19 +9891,16 @@ class Call {
9891
9891
  };
9892
9892
  await waitUntilCallJoined();
9893
9893
  }
9894
- if (reject && this.ringing) {
9895
- // I'm the one who started the call, so I should cancel it.
9896
- const hasOtherParticipants = this.state.remoteParticipants.length > 0;
9897
- if (this.isCreatedByMe &&
9898
- !hasOtherParticipants &&
9899
- callingState === CallingState.RINGING) {
9900
- // Signals other users that I have cancelled my call to them
9901
- // before they accepted it.
9902
- await this.reject();
9894
+ if (callingState === CallingState.RINGING) {
9895
+ if (reject) {
9896
+ await this.reject(reason);
9903
9897
  }
9904
- else if (callingState === CallingState.RINGING) {
9905
- // Signals other users that I have rejected the incoming call.
9906
- await this.reject();
9898
+ else {
9899
+ const hasOtherParticipants = this.state.remoteParticipants.length > 0;
9900
+ if (this.isCreatedByMe && !hasOtherParticipants) {
9901
+ // I'm the one who started the call, so I should cancel it when there are no other participants.
9902
+ await this.reject('cancel');
9903
+ }
9907
9904
  }
9908
9905
  }
9909
9906
  this.statsReporter?.stop();
@@ -11014,13 +11011,15 @@ class Call {
11014
11011
  // ignore if the call is not ringing
11015
11012
  if (this.state.callingState !== CallingState.RINGING)
11016
11013
  return;
11017
- const timeoutInMs = settings.ring.auto_cancel_timeout_ms;
11014
+ const timeoutInMs = this.isCreatedByMe
11015
+ ? settings.ring.auto_cancel_timeout_ms
11016
+ : settings.ring.incoming_call_timeout_ms;
11018
11017
  // 0 means no auto-drop
11019
11018
  if (timeoutInMs <= 0)
11020
11019
  return;
11021
11020
  clearTimeout(this.dropTimeout);
11022
11021
  this.dropTimeout = setTimeout(() => {
11023
- this.leave({ reason: 'ring: timeout' }).catch((err) => {
11022
+ this.leave({ reject: true, reason: 'timeout' }).catch((err) => {
11024
11023
  this.logger('error', 'Failed to drop call', err);
11025
11024
  });
11026
11025
  }, timeoutInMs);
@@ -12217,6 +12216,8 @@ class TokenManager {
12217
12216
  */
12218
12217
  this.reset = () => {
12219
12218
  this.token = undefined;
12219
+ this.tokenProvider = undefined;
12220
+ this.type = 'static';
12220
12221
  this.user = undefined;
12221
12222
  this.loadTokenPromise = null;
12222
12223
  };
@@ -12977,7 +12978,7 @@ class StreamClient {
12977
12978
  });
12978
12979
  };
12979
12980
  this.getUserAgent = () => {
12980
- const version = "1.11.0";
12981
+ const version = "1.11.2";
12981
12982
  return (this.userAgent ||
12982
12983
  `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
12983
12984
  };