@stream-io/video-client 0.0.47 → 0.0.48
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 +25 -8
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +25 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +25 -8
- package/dist/index.es.js.map +1 -1
- package/dist/src/rtc/Publisher.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/rtc/Publisher.ts +25 -9
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
|
+
### [0.0.48](https://github.com/GetStream/stream-video-js/compare/client0.0.47...client0.0.48) (2023-07-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* force iceRestart offer, delay ICE restart ([#801](https://github.com/GetStream/stream-video-js/issues/801)) ([0da298f](https://github.com/GetStream/stream-video-js/commit/0da298faff30ddc42277444aad0d40a635fafb0b)), closes [#787](https://github.com/GetStream/stream-video-js/issues/787)
|
|
11
|
+
|
|
5
12
|
### [0.0.47](https://github.com/GetStream/stream-video-js/compare/client0.0.46...client0.0.47) (2023-07-14)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -6318,10 +6318,10 @@ class Publisher {
|
|
|
6318
6318
|
/**
|
|
6319
6319
|
* Restarts the ICE connection and renegotiates with the SFU.
|
|
6320
6320
|
*/
|
|
6321
|
-
this.restartIce = () => {
|
|
6321
|
+
this.restartIce = () => __awaiter(this, void 0, void 0, function* () {
|
|
6322
6322
|
this.logger('debug', 'Restarting ICE connection');
|
|
6323
|
-
this.
|
|
6324
|
-
};
|
|
6323
|
+
yield this.negotiate({ iceRestart: true });
|
|
6324
|
+
});
|
|
6325
6325
|
this.onNegotiationNeeded = () => __awaiter(this, void 0, void 0, function* () {
|
|
6326
6326
|
yield this.negotiate();
|
|
6327
6327
|
});
|
|
@@ -6463,10 +6463,27 @@ class Publisher {
|
|
|
6463
6463
|
};
|
|
6464
6464
|
this.onIceConnectionStateChange = () => {
|
|
6465
6465
|
const state = this.pc.iceConnectionState;
|
|
6466
|
-
this.logger('debug', `ICE Connection state changed`, state);
|
|
6467
|
-
if (state === 'failed'
|
|
6468
|
-
this.logger('warn', `
|
|
6469
|
-
this.restartIce()
|
|
6466
|
+
this.logger('debug', `ICE Connection state changed to`, state);
|
|
6467
|
+
if (state === 'failed') {
|
|
6468
|
+
this.logger('warn', `Attempting to restart ICE`);
|
|
6469
|
+
this.restartIce().catch((e) => {
|
|
6470
|
+
this.logger('error', `ICE restart error`, e);
|
|
6471
|
+
});
|
|
6472
|
+
}
|
|
6473
|
+
else if (state === 'disconnected') {
|
|
6474
|
+
// when in `disconnected` state, the browser may recover automatically,
|
|
6475
|
+
// hence, we delay the ICE restart
|
|
6476
|
+
this.logger('warn', `Scheduling ICE restart in 5 seconds`);
|
|
6477
|
+
setTimeout(() => {
|
|
6478
|
+
// check if the state is still `disconnected` or `failed`
|
|
6479
|
+
// as the connection may have recovered (or failed) in the meantime
|
|
6480
|
+
if (this.pc.iceConnectionState === 'disconnected' ||
|
|
6481
|
+
this.pc.iceConnectionState === 'failed') {
|
|
6482
|
+
this.restartIce().catch((e) => {
|
|
6483
|
+
this.logger('error', `ICE restart error`, e);
|
|
6484
|
+
});
|
|
6485
|
+
}
|
|
6486
|
+
}, 5000);
|
|
6470
6487
|
}
|
|
6471
6488
|
};
|
|
6472
6489
|
this.onIceGatheringStateChange = () => {
|
|
@@ -11308,7 +11325,7 @@ class WSConnectionFallback {
|
|
|
11308
11325
|
}
|
|
11309
11326
|
}
|
|
11310
11327
|
|
|
11311
|
-
const version = '0.0.
|
|
11328
|
+
const version = '0.0.48';
|
|
11312
11329
|
|
|
11313
11330
|
const logger = getLogger(['location']);
|
|
11314
11331
|
const HINT_URL = `https://hint.stream-io-video.com/`;
|