@stream-io/video-client 1.18.1 → 1.18.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 +9 -0
- package/dist/index.browser.es.js +19 -6
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +19 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +19 -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 +9 -1
package/dist/index.cjs.js
CHANGED
|
@@ -5712,7 +5712,9 @@ class Publisher extends BasePeerConnection {
|
|
|
5712
5712
|
else {
|
|
5713
5713
|
const previousTrack = transceiver.sender.track;
|
|
5714
5714
|
await transceiver.sender.replaceTrack(trackToPublish);
|
|
5715
|
-
|
|
5715
|
+
if (!isReactNative()) {
|
|
5716
|
+
this.stopTrack(previousTrack);
|
|
5717
|
+
}
|
|
5716
5718
|
}
|
|
5717
5719
|
}
|
|
5718
5720
|
};
|
|
@@ -5813,6 +5815,11 @@ class Publisher extends BasePeerConnection {
|
|
|
5813
5815
|
}
|
|
5814
5816
|
for (const track of this.clonedTracks) {
|
|
5815
5817
|
this.stopTrack(track);
|
|
5818
|
+
// @ts-expect-error release() is present in react-native-webrtc
|
|
5819
|
+
if (track && typeof track.release === 'function') {
|
|
5820
|
+
// @ts-expect-error
|
|
5821
|
+
track.release();
|
|
5822
|
+
}
|
|
5816
5823
|
}
|
|
5817
5824
|
};
|
|
5818
5825
|
this.changePublishQuality = async (videoSender) => {
|
|
@@ -7465,7 +7472,7 @@ const aggregate = (stats) => {
|
|
|
7465
7472
|
return report;
|
|
7466
7473
|
};
|
|
7467
7474
|
|
|
7468
|
-
const version = "1.18.
|
|
7475
|
+
const version = "1.18.2";
|
|
7469
7476
|
const [major, minor, patch] = version.split('.');
|
|
7470
7477
|
let sdkInfo = {
|
|
7471
7478
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -10627,8 +10634,7 @@ class Call {
|
|
|
10627
10634
|
}
|
|
10628
10635
|
catch (error) {
|
|
10629
10636
|
// prevent triggering reconnect flow if the state is OFFLINE
|
|
10630
|
-
const avoidRestoreState = this.state.callingState === exports.CallingState.OFFLINE
|
|
10631
|
-
callingState === exports.CallingState.RECONNECTING;
|
|
10637
|
+
const avoidRestoreState = this.state.callingState === exports.CallingState.OFFLINE;
|
|
10632
10638
|
if (!avoidRestoreState) {
|
|
10633
10639
|
// restore the previous call state if the join-flow fails
|
|
10634
10640
|
this.state.setCallingState(callingState);
|
|
@@ -10915,7 +10921,8 @@ class Call {
|
|
|
10915
10921
|
if (data?.ring) {
|
|
10916
10922
|
this.ringingSubject.next(true);
|
|
10917
10923
|
}
|
|
10918
|
-
|
|
10924
|
+
const isReconnecting = this.reconnectStrategy !== WebsocketReconnectStrategy.UNSPECIFIED;
|
|
10925
|
+
if (!isReconnecting && this.ringing && !this.isCreatedByMe) {
|
|
10919
10926
|
// signals other users that I have accepted the incoming call.
|
|
10920
10927
|
await this.accept();
|
|
10921
10928
|
}
|
|
@@ -10996,6 +11003,12 @@ class Call {
|
|
|
10996
11003
|
break; // do-while loop, reconnection worked, exit the loop
|
|
10997
11004
|
}
|
|
10998
11005
|
catch (error) {
|
|
11006
|
+
if (this.state.callingState === exports.CallingState.OFFLINE) {
|
|
11007
|
+
this.logger('trace', `[Reconnect] Can't reconnect while offline, stopping reconnection attempts`);
|
|
11008
|
+
break;
|
|
11009
|
+
// we don't need to handle the error if the call is offline
|
|
11010
|
+
// network change event will trigger the reconnection
|
|
11011
|
+
}
|
|
10999
11012
|
if (error instanceof ErrorFromResponse && error.unrecoverable) {
|
|
11000
11013
|
this.logger('warn', `[Reconnect] Can't reconnect due to coordinator unrecoverable error`, error);
|
|
11001
11014
|
this.state.setCallingState(exports.CallingState.RECONNECTING_FAILED);
|
|
@@ -13093,7 +13106,7 @@ class StreamClient {
|
|
|
13093
13106
|
this.getUserAgent = () => {
|
|
13094
13107
|
if (!this.cachedUserAgent) {
|
|
13095
13108
|
const { clientAppIdentifier = {} } = this.options;
|
|
13096
|
-
const { sdkName = 'js', sdkVersion = "1.18.
|
|
13109
|
+
const { sdkName = 'js', sdkVersion = "1.18.2", ...extras } = clientAppIdentifier;
|
|
13097
13110
|
this.cachedUserAgent = [
|
|
13098
13111
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
13099
13112
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|