@stream-io/video-client 1.25.2 → 1.25.4
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 +11 -0
- package/dist/index.browser.es.js +15 -4
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +15 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +15 -4
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/Call.ts +13 -2
- package/src/__tests__/Call.test.ts +1 -1
- package/src/__tests__/StreamVideoClient.api.test.ts +1 -0
- package/src/__tests__/StreamVideoClient.test.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.25.4](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.25.3...@stream-io/video-client-1.25.4) (2025-07-07)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- sync call state after a failed reconnect ([#1846](https://github.com/GetStream/stream-video-js/issues/1846)) ([905e5c2](https://github.com/GetStream/stream-video-js/commit/905e5c2011d3267e83b3f2a861a4175de4111cfa))
|
|
10
|
+
|
|
11
|
+
## [1.25.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.25.2...@stream-io/video-client-1.25.3) (2025-07-03)
|
|
12
|
+
|
|
13
|
+
- bump the default test timeout ([bea27db](https://github.com/GetStream/stream-video-js/commit/bea27db1922a6f2a0899375d1a4cade1eb1291b5))
|
|
14
|
+
- increase axios timeout ([d9cc4ac](https://github.com/GetStream/stream-video-js/commit/d9cc4ac69f58d12d97af0c714df564349c17c9b5))
|
|
15
|
+
|
|
5
16
|
## [1.25.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.25.1...@stream-io/video-client-1.25.2) (2025-07-02)
|
|
6
17
|
|
|
7
18
|
### Bug Fixes
|
package/dist/index.browser.es.js
CHANGED
|
@@ -5810,7 +5810,7 @@ const aggregate = (stats) => {
|
|
|
5810
5810
|
return report;
|
|
5811
5811
|
};
|
|
5812
5812
|
|
|
5813
|
-
const version = "1.25.
|
|
5813
|
+
const version = "1.25.4";
|
|
5814
5814
|
const [major, minor, patch] = version.split('.');
|
|
5815
5815
|
let sdkInfo = {
|
|
5816
5816
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -12054,6 +12054,16 @@ class Call {
|
|
|
12054
12054
|
const reconnectStartTime = Date.now();
|
|
12055
12055
|
this.reconnectStrategy = strategy;
|
|
12056
12056
|
this.reconnectReason = reason;
|
|
12057
|
+
const markAsReconnectingFailed = async () => {
|
|
12058
|
+
try {
|
|
12059
|
+
// attempt to fetch the call data from the server, as the call
|
|
12060
|
+
// state might have changed while we were reconnecting or were offline
|
|
12061
|
+
await this.get();
|
|
12062
|
+
}
|
|
12063
|
+
finally {
|
|
12064
|
+
this.state.setCallingState(CallingState.RECONNECTING_FAILED);
|
|
12065
|
+
}
|
|
12066
|
+
};
|
|
12057
12067
|
let attempt = 0;
|
|
12058
12068
|
do {
|
|
12059
12069
|
const reconnectingTime = Date.now() - reconnectStartTime;
|
|
@@ -12061,7 +12071,7 @@ class Call {
|
|
|
12061
12071
|
reconnectingTime / 1000 > this.disconnectionTimeoutSeconds;
|
|
12062
12072
|
if (shouldGiveUpReconnecting) {
|
|
12063
12073
|
this.logger('warn', '[Reconnect] Stopping reconnection attempts after reaching disconnection timeout');
|
|
12064
|
-
|
|
12074
|
+
await markAsReconnectingFailed();
|
|
12065
12075
|
return;
|
|
12066
12076
|
}
|
|
12067
12077
|
// we don't increment reconnect attempts for the FAST strategy.
|
|
@@ -12102,7 +12112,7 @@ class Call {
|
|
|
12102
12112
|
}
|
|
12103
12113
|
if (error instanceof ErrorFromResponse && error.unrecoverable) {
|
|
12104
12114
|
this.logger('warn', `[Reconnect] Can't reconnect due to coordinator unrecoverable error`, error);
|
|
12105
|
-
|
|
12115
|
+
await markAsReconnectingFailed();
|
|
12106
12116
|
return;
|
|
12107
12117
|
}
|
|
12108
12118
|
await sleep(500);
|
|
@@ -12139,6 +12149,7 @@ class Call {
|
|
|
12139
12149
|
this.reconnectStrategy = WebsocketReconnectStrategy.FAST;
|
|
12140
12150
|
this.state.setCallingState(CallingState.RECONNECTING);
|
|
12141
12151
|
await this.doJoin(this.joinCallData);
|
|
12152
|
+
await this.get(); // fetch the latest call state, as it might have changed
|
|
12142
12153
|
this.sfuStatsReporter?.sendReconnectionTime(WebsocketReconnectStrategy.FAST, (Date.now() - reconnectStartTime) / 1000);
|
|
12143
12154
|
};
|
|
12144
12155
|
/**
|
|
@@ -14273,7 +14284,7 @@ class StreamClient {
|
|
|
14273
14284
|
this.getUserAgent = () => {
|
|
14274
14285
|
if (!this.cachedUserAgent) {
|
|
14275
14286
|
const { clientAppIdentifier = {} } = this.options;
|
|
14276
|
-
const { sdkName = 'js', sdkVersion = "1.25.
|
|
14287
|
+
const { sdkName = 'js', sdkVersion = "1.25.4", ...extras } = clientAppIdentifier;
|
|
14277
14288
|
this.cachedUserAgent = [
|
|
14278
14289
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
14279
14290
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|