@stream-io/video-client 1.55.0 → 1.55.1
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 +29 -9
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +29 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +29 -9
- package/dist/index.es.js.map +1 -1
- package/dist/src/coordinator/connection/connection.d.ts +1 -0
- package/dist/src/rtc/types.d.ts +1 -0
- package/package.json +2 -2
- 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/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.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)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **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))
|
|
10
|
+
- 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))
|
|
11
|
+
|
|
5
12
|
## [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
13
|
|
|
7
14
|
### 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.1";
|
|
4930
4930
|
const [major, minor, patch] = version.split('.');
|
|
4931
4931
|
let sdkInfo = {
|
|
4932
4932
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -9041,6 +9041,9 @@ class Publisher extends BasePeerConnection {
|
|
|
9041
9041
|
if (isAudioTrackType(trackType)) {
|
|
9042
9042
|
await this.updateAudioPublishOptions(trackType, options);
|
|
9043
9043
|
}
|
|
9044
|
+
if (track && !bundle.negotiated) {
|
|
9045
|
+
await this.negotiate();
|
|
9046
|
+
}
|
|
9044
9047
|
};
|
|
9045
9048
|
/**
|
|
9046
9049
|
* Updates the publish options for the given track type.
|
|
@@ -9297,6 +9300,10 @@ class Publisher extends BasePeerConnection {
|
|
|
9297
9300
|
throw new NegotiationError(response.error);
|
|
9298
9301
|
const { sdp: answerSdp } = response;
|
|
9299
9302
|
await this.pc.setRemoteDescription({ type: 'answer', sdp: answerSdp });
|
|
9303
|
+
for (const bundle of this.transceiverCache.items()) {
|
|
9304
|
+
if (bundle.transceiver.sender.track)
|
|
9305
|
+
bundle.negotiated = true;
|
|
9306
|
+
}
|
|
9300
9307
|
}
|
|
9301
9308
|
catch (err) {
|
|
9302
9309
|
// negotiation failed, rollback to the previous state
|
|
@@ -17193,6 +17200,7 @@ class StableWSConnection {
|
|
|
17193
17200
|
consecutiveFailures = 0;
|
|
17194
17201
|
/** keep track of the total number of failures */
|
|
17195
17202
|
totalFailures = 0;
|
|
17203
|
+
lastConnectionError;
|
|
17196
17204
|
// Health-check pings + connection-staleness check.
|
|
17197
17205
|
/** Send a health check message every 25 seconds */
|
|
17198
17206
|
pingInterval = 25 * 1000;
|
|
@@ -17221,6 +17229,7 @@ class StableWSConnection {
|
|
|
17221
17229
|
throw Error(`You've called connect twice, can only attempt 1 connection at the time`);
|
|
17222
17230
|
}
|
|
17223
17231
|
this.isDisconnected = false;
|
|
17232
|
+
this.lastConnectionError = undefined;
|
|
17224
17233
|
try {
|
|
17225
17234
|
const healthCheck = await this._connect(timeout);
|
|
17226
17235
|
this.consecutiveFailures = 0;
|
|
@@ -17251,6 +17260,7 @@ class StableWSConnection {
|
|
|
17251
17260
|
// _connect()'s catch) keeps a single failure from spawning two
|
|
17252
17261
|
// parallel chains - one from this catch and one from _reconnect's
|
|
17253
17262
|
// own catch when _connect was called from there.
|
|
17263
|
+
this.lastConnectionError = error;
|
|
17254
17264
|
this._reconnect();
|
|
17255
17265
|
}
|
|
17256
17266
|
}
|
|
@@ -17287,12 +17297,21 @@ class StableWSConnection {
|
|
|
17287
17297
|
(async () => {
|
|
17288
17298
|
await sleep(timeout);
|
|
17289
17299
|
this.isConnecting = false;
|
|
17290
|
-
|
|
17291
|
-
|
|
17292
|
-
|
|
17293
|
-
|
|
17294
|
-
|
|
17295
|
-
|
|
17300
|
+
const e = this.lastConnectionError;
|
|
17301
|
+
const errorPayload = e
|
|
17302
|
+
? {
|
|
17303
|
+
code: e.code,
|
|
17304
|
+
StatusCode: e.StatusCode,
|
|
17305
|
+
message: e.message,
|
|
17306
|
+
isWSFailure: e.isWSFailure,
|
|
17307
|
+
}
|
|
17308
|
+
: {
|
|
17309
|
+
code: '',
|
|
17310
|
+
StatusCode: '',
|
|
17311
|
+
message: 'initial WS connection could not be established',
|
|
17312
|
+
isWSFailure: true,
|
|
17313
|
+
};
|
|
17314
|
+
throw new Error(JSON.stringify(errorPayload));
|
|
17296
17315
|
})(),
|
|
17297
17316
|
]);
|
|
17298
17317
|
};
|
|
@@ -17446,6 +17465,7 @@ class StableWSConnection {
|
|
|
17446
17465
|
}
|
|
17447
17466
|
catch (caught) {
|
|
17448
17467
|
const err = caught;
|
|
17468
|
+
this.lastConnectionError = err;
|
|
17449
17469
|
this.isConnecting = false;
|
|
17450
17470
|
this._log(`_connect() - Error - `, err);
|
|
17451
17471
|
// Reject THIS attempt's connection-id promise (P1) directly via the
|
|
@@ -18398,11 +18418,11 @@ class StreamClient {
|
|
|
18398
18418
|
return await this.wsConnection.connect(this.defaultWSTimeout);
|
|
18399
18419
|
};
|
|
18400
18420
|
getSdkVersion = () => this.options.clientAppIdentifier?.sdkVersion ||
|
|
18401
|
-
"1.55.
|
|
18421
|
+
"1.55.1";
|
|
18402
18422
|
getUserAgent = () => {
|
|
18403
18423
|
if (!this.cachedUserAgent) {
|
|
18404
18424
|
const { clientAppIdentifier = {} } = this.options;
|
|
18405
|
-
const { sdkName = 'js', sdkVersion = "1.55.
|
|
18425
|
+
const { sdkName = 'js', sdkVersion = "1.55.1", ...extras } = clientAppIdentifier;
|
|
18406
18426
|
this.cachedUserAgent = [
|
|
18407
18427
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
18408
18428
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|