@stream-io/video-client 1.56.0 → 1.57.0
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 +10 -0
- package/dist/index.browser.es.js +39 -19
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +39 -19
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +39 -19
- package/dist/index.es.js.map +1 -1
- package/dist/src/helpers/MediaPlaybackWatchdog.d.ts +4 -0
- package/package.json +11 -11
- package/src/devices/__tests__/MicrophoneManagerRN.test.ts +1 -2
- package/src/devices/devicePersistence.ts +1 -2
- package/src/helpers/MediaPlaybackWatchdog.ts +35 -16
- package/src/helpers/__tests__/MediaPlaybackWatchdog.test.ts +137 -8
- package/src/helpers/__tests__/ViewportTracker.test.ts +1 -2
- package/src/reporting/ClientEventReporter.ts +2 -8
- package/src/rtc/types.ts +1 -2
- package/src/stats/rtc/types.ts +8 -2
- package/src/store/CallState.ts +1 -2
- package/src/types.ts +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.57.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.56.0...@stream-io/video-client-1.57.0) (2026-08-07)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- **react-native:** Expo SDK 57 / RN 0.86.2 upgrade and iOS 27 compatibility fixes ([#2355](https://github.com/GetStream/stream-video-js/issues/2355)) ([ea3c29b](https://github.com/GetStream/stream-video-js/commit/ea3c29b227f7a2a9ddb0eb046325e4783b558c94))
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
- **client:** require stable playback before resetting watchdog retries ([#2361](https://github.com/GetStream/stream-video-js/issues/2361)) ([3e6b675](https://github.com/GetStream/stream-video-js/commit/3e6b67527702111cd0ea80e3bee1c9e6995406aa))
|
|
14
|
+
|
|
5
15
|
## [1.56.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.55.2...@stream-io/video-client-1.56.0) (2026-07-30)
|
|
6
16
|
|
|
7
17
|
### Features
|
package/dist/index.browser.es.js
CHANGED
|
@@ -4926,7 +4926,7 @@ const toIceCandidate = (iceTrickle) => {
|
|
|
4926
4926
|
}
|
|
4927
4927
|
};
|
|
4928
4928
|
|
|
4929
|
-
const version = "1.
|
|
4929
|
+
const version = "1.57.0";
|
|
4930
4930
|
const [major, minor, patch] = version.split('.');
|
|
4931
4931
|
let sdkInfo = {
|
|
4932
4932
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -11196,8 +11196,10 @@ class MediaPlaybackWatchdog {
|
|
|
11196
11196
|
tracer;
|
|
11197
11197
|
controller = new AbortController();
|
|
11198
11198
|
pendingTimer;
|
|
11199
|
+
settleTimer;
|
|
11199
11200
|
attempt = 0;
|
|
11200
11201
|
disposed = false;
|
|
11202
|
+
stopped = false;
|
|
11201
11203
|
constructor(opts) {
|
|
11202
11204
|
this.element = opts.element;
|
|
11203
11205
|
this.kind = opts.kind;
|
|
@@ -11218,33 +11220,49 @@ class MediaPlaybackWatchdog {
|
|
|
11218
11220
|
return;
|
|
11219
11221
|
this.disposed = true;
|
|
11220
11222
|
this.controller.abort();
|
|
11223
|
+
this.clearTimers();
|
|
11224
|
+
};
|
|
11225
|
+
clearTimers = () => {
|
|
11221
11226
|
if (this.pendingTimer)
|
|
11222
11227
|
clearTimeout(this.pendingTimer);
|
|
11223
11228
|
this.pendingTimer = undefined;
|
|
11229
|
+
if (this.settleTimer)
|
|
11230
|
+
clearTimeout(this.settleTimer);
|
|
11231
|
+
this.settleTimer = undefined;
|
|
11224
11232
|
};
|
|
11225
11233
|
onPlaying = () => {
|
|
11226
|
-
if (this.attempt > 0) {
|
|
11227
|
-
this.tracer.trace('mediaPlayback.recover.success', {
|
|
11228
|
-
kind: this.kind,
|
|
11229
|
-
attempts: this.attempt,
|
|
11230
|
-
});
|
|
11231
|
-
}
|
|
11232
|
-
this.attempt = 0;
|
|
11233
11234
|
if (this.pendingTimer)
|
|
11234
11235
|
clearTimeout(this.pendingTimer);
|
|
11235
11236
|
this.pendingTimer = undefined;
|
|
11237
|
+
if (this.attempt === 0 || this.settleTimer)
|
|
11238
|
+
return;
|
|
11239
|
+
this.settleTimer ??= setTimeout(this.onSettled, 1000);
|
|
11240
|
+
};
|
|
11241
|
+
onSettled = () => {
|
|
11242
|
+
this.settleTimer = undefined;
|
|
11243
|
+
if (this.element.paused)
|
|
11244
|
+
return;
|
|
11245
|
+
this.tracer.trace('mediaPlayback.recover.success', {
|
|
11246
|
+
kind: this.kind,
|
|
11247
|
+
attempts: this.attempt,
|
|
11248
|
+
});
|
|
11249
|
+
this.attempt = 0;
|
|
11250
|
+
this.stopped = false;
|
|
11236
11251
|
};
|
|
11237
11252
|
onPauseOrSuspend = (event) => {
|
|
11238
|
-
if (this.disposed)
|
|
11253
|
+
if (this.disposed || this.stopped)
|
|
11239
11254
|
return;
|
|
11240
11255
|
this.tracer.trace('mediaPlayback.paused', {
|
|
11241
11256
|
kind: this.kind,
|
|
11242
11257
|
reason: event.type,
|
|
11243
11258
|
});
|
|
11259
|
+
if (this.settleTimer)
|
|
11260
|
+
clearTimeout(this.settleTimer);
|
|
11261
|
+
this.settleTimer = undefined;
|
|
11244
11262
|
this.scheduleRecovery();
|
|
11245
11263
|
};
|
|
11246
11264
|
scheduleRecovery = () => {
|
|
11247
|
-
if (this.disposed || this.pendingTimer)
|
|
11265
|
+
if (this.disposed || this.stopped || this.pendingTimer)
|
|
11248
11266
|
return;
|
|
11249
11267
|
const skipReason = this.computeSkipReason();
|
|
11250
11268
|
if (skipReason) {
|
|
@@ -11254,6 +11272,15 @@ class MediaPlaybackWatchdog {
|
|
|
11254
11272
|
});
|
|
11255
11273
|
return;
|
|
11256
11274
|
}
|
|
11275
|
+
if (this.attempt >= 10) {
|
|
11276
|
+
this.stopped = true;
|
|
11277
|
+
this.clearTimers();
|
|
11278
|
+
this.tracer.trace('mediaPlayback.recover.giveUp', {
|
|
11279
|
+
kind: this.kind,
|
|
11280
|
+
attempts: this.attempt,
|
|
11281
|
+
});
|
|
11282
|
+
return;
|
|
11283
|
+
}
|
|
11257
11284
|
const delay = this.attempt === 0 ? 0 : retryInterval(this.attempt);
|
|
11258
11285
|
this.pendingTimer = setTimeout(this.attemptPlay, delay);
|
|
11259
11286
|
};
|
|
@@ -11289,13 +11316,6 @@ class MediaPlaybackWatchdog {
|
|
|
11289
11316
|
if (this.disposed)
|
|
11290
11317
|
return;
|
|
11291
11318
|
this.logger.warn(`Failed to recover ${this.kind} playback`, err);
|
|
11292
|
-
if (this.attempt >= 10) {
|
|
11293
|
-
this.tracer.trace('mediaPlayback.recover.giveUp', {
|
|
11294
|
-
kind: this.kind,
|
|
11295
|
-
attempts: this.attempt,
|
|
11296
|
-
});
|
|
11297
|
-
return;
|
|
11298
|
-
}
|
|
11299
11319
|
this.scheduleRecovery();
|
|
11300
11320
|
}
|
|
11301
11321
|
};
|
|
@@ -18492,11 +18512,11 @@ class StreamClient {
|
|
|
18492
18512
|
return await this.wsConnection.connect(this.defaultWSTimeout);
|
|
18493
18513
|
};
|
|
18494
18514
|
getSdkVersion = () => this.options.clientAppIdentifier?.sdkVersion ||
|
|
18495
|
-
"1.
|
|
18515
|
+
"1.57.0";
|
|
18496
18516
|
getUserAgent = () => {
|
|
18497
18517
|
if (!this.cachedUserAgent) {
|
|
18498
18518
|
const { clientAppIdentifier = {} } = this.options;
|
|
18499
|
-
const { sdkName = 'js', sdkVersion = "1.
|
|
18519
|
+
const { sdkName = 'js', sdkVersion = "1.57.0", ...extras } = clientAppIdentifier;
|
|
18500
18520
|
this.cachedUserAgent = [
|
|
18501
18521
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
18502
18522
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|