@stream-io/video-client 1.55.0 → 1.55.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 +13 -0
- package/dist/index.browser.es.js +41 -9
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +41 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +41 -9
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +4 -0
- package/dist/src/coordinator/connection/connection.d.ts +1 -0
- package/dist/src/rtc/types.d.ts +1 -0
- package/dist/src/store/CallState.d.ts +4 -0
- package/package.json +2 -2
- package/src/Call.ts +7 -0
- package/src/coordinator/connection/__tests__/connection.test.ts +47 -0
- package/src/coordinator/connection/connection.ts +20 -8
- package/src/rtc/Publisher.ts +7 -0
- package/src/rtc/__tests__/Publisher.test.ts +74 -0
- package/src/rtc/types.ts +1 -0
- package/src/store/CallState.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.55.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.55.1...@stream-io/video-client-1.55.2) (2026-07-17)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- use speakerLayoutSortPreset in RN spotlight view ([#2332](https://github.com/GetStream/stream-video-js/issues/2332)) ([910a5de](https://github.com/GetStream/stream-video-js/commit/910a5de6160cc34de99ea1615ef40bb034c57078))
|
|
10
|
+
|
|
11
|
+
## [1.55.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.55.0...@stream-io/video-client-1.55.1) (2026-07-02)
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
- **client:** propagate underlying WS connection error through connect timeout ([#2307](https://github.com/GetStream/stream-video-js/issues/2307)) ([30b332c](https://github.com/GetStream/stream-video-js/commit/30b332cd2dc5542305f8722db9a8d55ba139af9a))
|
|
16
|
+
- renegotiate unacknowledged publisher transceivers on republish ([#2309](https://github.com/GetStream/stream-video-js/issues/2309)) ([049f06b](https://github.com/GetStream/stream-video-js/commit/049f06b30ec7f420e0eab0e298545c5d2d3bcc67))
|
|
17
|
+
|
|
5
18
|
## [1.55.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.54.0...@stream-io/video-client-1.55.0) (2026-06-26)
|
|
6
19
|
|
|
7
20
|
### 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.55.
|
|
4929
|
+
const version = "1.55.2";
|
|
4930
4930
|
const [major, minor, patch] = version.split('.');
|
|
4931
4931
|
let sdkInfo = {
|
|
4932
4932
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -6281,6 +6281,12 @@ class CallState {
|
|
|
6281
6281
|
// trigger re-sorting of participants
|
|
6282
6282
|
this.setCurrentValue(this.participantsSubject, (ps) => ps);
|
|
6283
6283
|
};
|
|
6284
|
+
/**
|
|
6285
|
+
* Returns the comparator currently used to sort the participants.
|
|
6286
|
+
*/
|
|
6287
|
+
getSortParticipantsBy = () => {
|
|
6288
|
+
return this.sortParticipantsBy;
|
|
6289
|
+
};
|
|
6284
6290
|
/**
|
|
6285
6291
|
* Gets the current value of an observable, or undefined if the observable has
|
|
6286
6292
|
* not emitted a value yet.
|
|
@@ -9041,6 +9047,9 @@ class Publisher extends BasePeerConnection {
|
|
|
9041
9047
|
if (isAudioTrackType(trackType)) {
|
|
9042
9048
|
await this.updateAudioPublishOptions(trackType, options);
|
|
9043
9049
|
}
|
|
9050
|
+
if (track && !bundle.negotiated) {
|
|
9051
|
+
await this.negotiate();
|
|
9052
|
+
}
|
|
9044
9053
|
};
|
|
9045
9054
|
/**
|
|
9046
9055
|
* Updates the publish options for the given track type.
|
|
@@ -9297,6 +9306,10 @@ class Publisher extends BasePeerConnection {
|
|
|
9297
9306
|
throw new NegotiationError(response.error);
|
|
9298
9307
|
const { sdp: answerSdp } = response;
|
|
9299
9308
|
await this.pc.setRemoteDescription({ type: 'answer', sdp: answerSdp });
|
|
9309
|
+
for (const bundle of this.transceiverCache.items()) {
|
|
9310
|
+
if (bundle.transceiver.sender.track)
|
|
9311
|
+
bundle.negotiated = true;
|
|
9312
|
+
}
|
|
9300
9313
|
}
|
|
9301
9314
|
catch (err) {
|
|
9302
9315
|
// negotiation failed, rollback to the previous state
|
|
@@ -16342,6 +16355,12 @@ class Call {
|
|
|
16342
16355
|
setSortParticipantsBy = (criteria) => {
|
|
16343
16356
|
return this.state.setSortParticipantsBy(criteria);
|
|
16344
16357
|
};
|
|
16358
|
+
/**
|
|
16359
|
+
* Returns the comparator currently used to sort the participants.
|
|
16360
|
+
*/
|
|
16361
|
+
getSortParticipantsBy = () => {
|
|
16362
|
+
return this.state.getSortParticipantsBy();
|
|
16363
|
+
};
|
|
16345
16364
|
/**
|
|
16346
16365
|
* Sends a reaction to the other call participants.
|
|
16347
16366
|
*
|
|
@@ -17193,6 +17212,7 @@ class StableWSConnection {
|
|
|
17193
17212
|
consecutiveFailures = 0;
|
|
17194
17213
|
/** keep track of the total number of failures */
|
|
17195
17214
|
totalFailures = 0;
|
|
17215
|
+
lastConnectionError;
|
|
17196
17216
|
// Health-check pings + connection-staleness check.
|
|
17197
17217
|
/** Send a health check message every 25 seconds */
|
|
17198
17218
|
pingInterval = 25 * 1000;
|
|
@@ -17221,6 +17241,7 @@ class StableWSConnection {
|
|
|
17221
17241
|
throw Error(`You've called connect twice, can only attempt 1 connection at the time`);
|
|
17222
17242
|
}
|
|
17223
17243
|
this.isDisconnected = false;
|
|
17244
|
+
this.lastConnectionError = undefined;
|
|
17224
17245
|
try {
|
|
17225
17246
|
const healthCheck = await this._connect(timeout);
|
|
17226
17247
|
this.consecutiveFailures = 0;
|
|
@@ -17251,6 +17272,7 @@ class StableWSConnection {
|
|
|
17251
17272
|
// _connect()'s catch) keeps a single failure from spawning two
|
|
17252
17273
|
// parallel chains - one from this catch and one from _reconnect's
|
|
17253
17274
|
// own catch when _connect was called from there.
|
|
17275
|
+
this.lastConnectionError = error;
|
|
17254
17276
|
this._reconnect();
|
|
17255
17277
|
}
|
|
17256
17278
|
}
|
|
@@ -17287,12 +17309,21 @@ class StableWSConnection {
|
|
|
17287
17309
|
(async () => {
|
|
17288
17310
|
await sleep(timeout);
|
|
17289
17311
|
this.isConnecting = false;
|
|
17290
|
-
|
|
17291
|
-
|
|
17292
|
-
|
|
17293
|
-
|
|
17294
|
-
|
|
17295
|
-
|
|
17312
|
+
const e = this.lastConnectionError;
|
|
17313
|
+
const errorPayload = e
|
|
17314
|
+
? {
|
|
17315
|
+
code: e.code,
|
|
17316
|
+
StatusCode: e.StatusCode,
|
|
17317
|
+
message: e.message,
|
|
17318
|
+
isWSFailure: e.isWSFailure,
|
|
17319
|
+
}
|
|
17320
|
+
: {
|
|
17321
|
+
code: '',
|
|
17322
|
+
StatusCode: '',
|
|
17323
|
+
message: 'initial WS connection could not be established',
|
|
17324
|
+
isWSFailure: true,
|
|
17325
|
+
};
|
|
17326
|
+
throw new Error(JSON.stringify(errorPayload));
|
|
17296
17327
|
})(),
|
|
17297
17328
|
]);
|
|
17298
17329
|
};
|
|
@@ -17446,6 +17477,7 @@ class StableWSConnection {
|
|
|
17446
17477
|
}
|
|
17447
17478
|
catch (caught) {
|
|
17448
17479
|
const err = caught;
|
|
17480
|
+
this.lastConnectionError = err;
|
|
17449
17481
|
this.isConnecting = false;
|
|
17450
17482
|
this._log(`_connect() - Error - `, err);
|
|
17451
17483
|
// Reject THIS attempt's connection-id promise (P1) directly via the
|
|
@@ -18398,11 +18430,11 @@ class StreamClient {
|
|
|
18398
18430
|
return await this.wsConnection.connect(this.defaultWSTimeout);
|
|
18399
18431
|
};
|
|
18400
18432
|
getSdkVersion = () => this.options.clientAppIdentifier?.sdkVersion ||
|
|
18401
|
-
"1.55.
|
|
18433
|
+
"1.55.2";
|
|
18402
18434
|
getUserAgent = () => {
|
|
18403
18435
|
if (!this.cachedUserAgent) {
|
|
18404
18436
|
const { clientAppIdentifier = {} } = this.options;
|
|
18405
|
-
const { sdkName = 'js', sdkVersion = "1.55.
|
|
18437
|
+
const { sdkName = 'js', sdkVersion = "1.55.2", ...extras } = clientAppIdentifier;
|
|
18406
18438
|
this.cachedUserAgent = [
|
|
18407
18439
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
18408
18440
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|