@stream-io/video-client 1.18.1 → 1.18.3
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 +16 -0
- package/dist/index.browser.es.js +14 -6
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +14 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +14 -6
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/Call.ts +14 -3
- package/src/rtc/Publisher.ts +4 -1
package/dist/index.es.js
CHANGED
|
@@ -5711,7 +5711,9 @@ class Publisher extends BasePeerConnection {
|
|
|
5711
5711
|
else {
|
|
5712
5712
|
const previousTrack = transceiver.sender.track;
|
|
5713
5713
|
await transceiver.sender.replaceTrack(trackToPublish);
|
|
5714
|
-
|
|
5714
|
+
if (!isReactNative()) {
|
|
5715
|
+
this.stopTrack(previousTrack);
|
|
5716
|
+
}
|
|
5715
5717
|
}
|
|
5716
5718
|
}
|
|
5717
5719
|
};
|
|
@@ -7464,7 +7466,7 @@ const aggregate = (stats) => {
|
|
|
7464
7466
|
return report;
|
|
7465
7467
|
};
|
|
7466
7468
|
|
|
7467
|
-
const version = "1.18.
|
|
7469
|
+
const version = "1.18.3";
|
|
7468
7470
|
const [major, minor, patch] = version.split('.');
|
|
7469
7471
|
let sdkInfo = {
|
|
7470
7472
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -10626,8 +10628,7 @@ class Call {
|
|
|
10626
10628
|
}
|
|
10627
10629
|
catch (error) {
|
|
10628
10630
|
// prevent triggering reconnect flow if the state is OFFLINE
|
|
10629
|
-
const avoidRestoreState = this.state.callingState === CallingState.OFFLINE
|
|
10630
|
-
callingState === CallingState.RECONNECTING;
|
|
10631
|
+
const avoidRestoreState = this.state.callingState === CallingState.OFFLINE;
|
|
10631
10632
|
if (!avoidRestoreState) {
|
|
10632
10633
|
// restore the previous call state if the join-flow fails
|
|
10633
10634
|
this.state.setCallingState(callingState);
|
|
@@ -10914,7 +10915,8 @@ class Call {
|
|
|
10914
10915
|
if (data?.ring) {
|
|
10915
10916
|
this.ringingSubject.next(true);
|
|
10916
10917
|
}
|
|
10917
|
-
|
|
10918
|
+
const isReconnecting = this.reconnectStrategy !== WebsocketReconnectStrategy.UNSPECIFIED;
|
|
10919
|
+
if (!isReconnecting && this.ringing && !this.isCreatedByMe) {
|
|
10918
10920
|
// signals other users that I have accepted the incoming call.
|
|
10919
10921
|
await this.accept();
|
|
10920
10922
|
}
|
|
@@ -10995,6 +10997,12 @@ class Call {
|
|
|
10995
10997
|
break; // do-while loop, reconnection worked, exit the loop
|
|
10996
10998
|
}
|
|
10997
10999
|
catch (error) {
|
|
11000
|
+
if (this.state.callingState === CallingState.OFFLINE) {
|
|
11001
|
+
this.logger('trace', `[Reconnect] Can't reconnect while offline, stopping reconnection attempts`);
|
|
11002
|
+
break;
|
|
11003
|
+
// we don't need to handle the error if the call is offline
|
|
11004
|
+
// network change event will trigger the reconnection
|
|
11005
|
+
}
|
|
10998
11006
|
if (error instanceof ErrorFromResponse && error.unrecoverable) {
|
|
10999
11007
|
this.logger('warn', `[Reconnect] Can't reconnect due to coordinator unrecoverable error`, error);
|
|
11000
11008
|
this.state.setCallingState(CallingState.RECONNECTING_FAILED);
|
|
@@ -13092,7 +13100,7 @@ class StreamClient {
|
|
|
13092
13100
|
this.getUserAgent = () => {
|
|
13093
13101
|
if (!this.cachedUserAgent) {
|
|
13094
13102
|
const { clientAppIdentifier = {} } = this.options;
|
|
13095
|
-
const { sdkName = 'js', sdkVersion = "1.18.
|
|
13103
|
+
const { sdkName = 'js', sdkVersion = "1.18.3", ...extras } = clientAppIdentifier;
|
|
13096
13104
|
this.cachedUserAgent = [
|
|
13097
13105
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
13098
13106
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|