@stream-io/video-client 1.19.2 → 1.19.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/CHANGELOG.md +7 -0
- package/dist/index.browser.es.js +18 -6
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +18 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +18 -6
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +6 -1
- package/dist/src/StreamSfuClient.d.ts +4 -0
- package/package.json +1 -1
- package/src/Call.ts +11 -5
- package/src/StreamSfuClient.ts +6 -0
- package/src/StreamVideoClient.ts +1 -0
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.19.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.19.2...@stream-io/video-client-1.19.3) (2025-04-15)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- fast reconnect shouldn't be followed up with full rejoining on network switch ([#1760](https://github.com/GetStream/stream-video-js/issues/1760)) ([71363bd](https://github.com/GetStream/stream-video-js/commit/71363bdf0fb6cd6273ff6c2a0faf9ea1eb53f121))
|
|
10
|
+
- watched calls should auto-subscribe for state updates ([#1762](https://github.com/GetStream/stream-video-js/issues/1762)) ([abcb45b](https://github.com/GetStream/stream-video-js/commit/abcb45b7fed4ca10e4ac6ea8ee18630ca5a9cb46)), closes [#1433](https://github.com/GetStream/stream-video-js/issues/1433)
|
|
11
|
+
|
|
5
12
|
## [1.19.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.19.1...@stream-io/video-client-1.19.2) (2025-04-11)
|
|
6
13
|
|
|
7
14
|
### Bug Fixes
|
package/dist/index.browser.es.js
CHANGED
|
@@ -5643,7 +5643,7 @@ const aggregate = (stats) => {
|
|
|
5643
5643
|
return report;
|
|
5644
5644
|
};
|
|
5645
5645
|
|
|
5646
|
-
const version = "1.19.
|
|
5646
|
+
const version = "1.19.3";
|
|
5647
5647
|
const [major, minor, patch] = version.split('.');
|
|
5648
5648
|
let sdkInfo = {
|
|
5649
5649
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -7266,6 +7266,10 @@ class StreamSfuClient {
|
|
|
7266
7266
|
* This is set to `true` when the user initiates the leave process.
|
|
7267
7267
|
*/
|
|
7268
7268
|
this.isLeaving = false;
|
|
7269
|
+
/**
|
|
7270
|
+
* Flag to indicate if the client is in the process of closing the connection.
|
|
7271
|
+
*/
|
|
7272
|
+
this.isClosing = false;
|
|
7269
7273
|
this.pingIntervalInMs = 10 * 1000;
|
|
7270
7274
|
this.unhealthyTimeoutInMs = this.pingIntervalInMs + 5 * 1000;
|
|
7271
7275
|
/**
|
|
@@ -7317,6 +7321,7 @@ class StreamSfuClient {
|
|
|
7317
7321
|
this.onSignalClose?.(`${e.code} ${e.reason}`);
|
|
7318
7322
|
};
|
|
7319
7323
|
this.close = (code = StreamSfuClient.NORMAL_CLOSURE, reason) => {
|
|
7324
|
+
this.isClosing = true;
|
|
7320
7325
|
if (this.signalWs.readyState === WebSocket.OPEN) {
|
|
7321
7326
|
this.logger('debug', `Closing SFU WS connection: ${code} - ${reason}`);
|
|
7322
7327
|
this.signalWs.close(code, `js-client: ${reason}`);
|
|
@@ -10507,6 +10512,11 @@ class Call {
|
|
|
10507
10512
|
*/
|
|
10508
10513
|
this.leaveCallHooks = new Set();
|
|
10509
10514
|
this.streamClientEventHandlers = new Map();
|
|
10515
|
+
/**
|
|
10516
|
+
* Sets up the call instance.
|
|
10517
|
+
*
|
|
10518
|
+
* @internal an internal method and should not be used outside the SDK.
|
|
10519
|
+
*/
|
|
10510
10520
|
this.setup = async () => {
|
|
10511
10521
|
await withoutConcurrency(this.joinLeaveConcurrencyTag, async () => {
|
|
10512
10522
|
if (this.initialized)
|
|
@@ -11277,7 +11287,7 @@ class Call {
|
|
|
11277
11287
|
callingState === CallingState.LEFT)
|
|
11278
11288
|
return;
|
|
11279
11289
|
// normal close, no need to reconnect
|
|
11280
|
-
if (sfuClient.isLeaving)
|
|
11290
|
+
if (sfuClient.isLeaving || sfuClient.isClosing)
|
|
11281
11291
|
return;
|
|
11282
11292
|
this.reconnect(WebsocketReconnectStrategy.REJOIN, reason).catch((err) => {
|
|
11283
11293
|
this.logger('warn', '[Reconnect] Error reconnecting', err);
|
|
@@ -11488,9 +11498,10 @@ class Call {
|
|
|
11488
11498
|
this.sfuStatsReporter?.start();
|
|
11489
11499
|
}
|
|
11490
11500
|
});
|
|
11491
|
-
this.leaveCallHooks
|
|
11492
|
-
|
|
11493
|
-
|
|
11501
|
+
this.leaveCallHooks
|
|
11502
|
+
.add(unregisterGoAway)
|
|
11503
|
+
.add(unregisterOnError)
|
|
11504
|
+
.add(unregisterNetworkChanged);
|
|
11494
11505
|
};
|
|
11495
11506
|
/**
|
|
11496
11507
|
* Restores the published tracks after a reconnection.
|
|
@@ -13432,7 +13443,7 @@ class StreamClient {
|
|
|
13432
13443
|
this.getUserAgent = () => {
|
|
13433
13444
|
if (!this.cachedUserAgent) {
|
|
13434
13445
|
const { clientAppIdentifier = {} } = this.options;
|
|
13435
|
-
const { sdkName = 'js', sdkVersion = "1.19.
|
|
13446
|
+
const { sdkName = 'js', sdkVersion = "1.19.3", ...extras } = clientAppIdentifier;
|
|
13436
13447
|
this.cachedUserAgent = [
|
|
13437
13448
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
13438
13449
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|
|
@@ -13819,6 +13830,7 @@ class StreamVideoClient {
|
|
|
13819
13830
|
call.state.updateFromCallResponse(c.call);
|
|
13820
13831
|
await call.applyDeviceConfig(c.call.settings, false);
|
|
13821
13832
|
if (data.watch) {
|
|
13833
|
+
await call.setup();
|
|
13822
13834
|
this.writeableStateStore.registerCall(call);
|
|
13823
13835
|
}
|
|
13824
13836
|
calls.push(call);
|