@stream-io/video-client 1.6.4 → 1.6.5
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 +20 -16
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +20 -16
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +20 -16
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/devices/InputMediaDeviceManager.ts +20 -14
package/dist/index.cjs.js
CHANGED
|
@@ -6841,7 +6841,7 @@ const retryable = async (rpc, signal) => {
|
|
|
6841
6841
|
return result;
|
|
6842
6842
|
};
|
|
6843
6843
|
|
|
6844
|
-
const version = "1.6.
|
|
6844
|
+
const version = "1.6.5" ;
|
|
6845
6845
|
const [major, minor, patch] = version.split('.');
|
|
6846
6846
|
let sdkInfo = {
|
|
6847
6847
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -11790,10 +11790,12 @@ class InputMediaDeviceManager {
|
|
|
11790
11790
|
await this.applySettingsToStream();
|
|
11791
11791
|
}
|
|
11792
11792
|
async applySettingsToStream() {
|
|
11793
|
-
|
|
11794
|
-
|
|
11795
|
-
|
|
11796
|
-
|
|
11793
|
+
await withCancellation(this.statusChangeConcurrencyTag, async () => {
|
|
11794
|
+
if (this.enabled) {
|
|
11795
|
+
await this.muteStream();
|
|
11796
|
+
await this.unmuteStream();
|
|
11797
|
+
}
|
|
11798
|
+
});
|
|
11797
11799
|
}
|
|
11798
11800
|
getTracks() {
|
|
11799
11801
|
return this.state.mediaStream?.getTracks() ?? [];
|
|
@@ -11936,17 +11938,19 @@ class InputMediaDeviceManager {
|
|
|
11936
11938
|
}
|
|
11937
11939
|
if (this.state.mediaStream !== stream) {
|
|
11938
11940
|
this.state.setMediaStream(stream, await rootStream);
|
|
11941
|
+
const handleTrackEnded = async () => {
|
|
11942
|
+
await this.statusChangeSettled();
|
|
11943
|
+
if (this.enabled) {
|
|
11944
|
+
this.isTrackStoppedDueToTrackEnd = true;
|
|
11945
|
+
setTimeout(() => {
|
|
11946
|
+
this.isTrackStoppedDueToTrackEnd = false;
|
|
11947
|
+
}, 2000);
|
|
11948
|
+
await this.disable();
|
|
11949
|
+
}
|
|
11950
|
+
};
|
|
11939
11951
|
this.getTracks().forEach((track) => {
|
|
11940
|
-
track.addEventListener('ended',
|
|
11941
|
-
|
|
11942
|
-
if (this.enabled) {
|
|
11943
|
-
this.isTrackStoppedDueToTrackEnd = true;
|
|
11944
|
-
setTimeout(() => {
|
|
11945
|
-
this.isTrackStoppedDueToTrackEnd = false;
|
|
11946
|
-
}, 2000);
|
|
11947
|
-
await this.disable();
|
|
11948
|
-
}
|
|
11949
|
-
});
|
|
11952
|
+
track.addEventListener('ended', handleTrackEnded);
|
|
11953
|
+
this.subscriptions.push(() => track.removeEventListener('ended', handleTrackEnded));
|
|
11950
11954
|
});
|
|
11951
11955
|
}
|
|
11952
11956
|
}
|
|
@@ -16133,7 +16137,7 @@ class StreamClient {
|
|
|
16133
16137
|
});
|
|
16134
16138
|
};
|
|
16135
16139
|
this.getUserAgent = () => {
|
|
16136
|
-
const version = "1.6.
|
|
16140
|
+
const version = "1.6.5" ;
|
|
16137
16141
|
return (this.userAgent ||
|
|
16138
16142
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
16139
16143
|
};
|