@stream-io/video-client 0.4.1 → 0.4.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 +7 -0
- package/dist/index.browser.es.js +15 -18
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +15 -18
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +15 -18
- package/dist/index.es.js.map +1 -1
- package/dist/src/devices/InputMediaDeviceManager.d.ts +1 -1
- package/package.json +1 -1
- package/src/devices/InputMediaDeviceManager.ts +16 -22
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.4.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-0.4.1...@stream-io/video-client-0.4.2) (2023-11-01)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* respect server-side settings in the lobby ([#1175](https://github.com/GetStream/stream-video-js/issues/1175)) ([b722a0a](https://github.com/GetStream/stream-video-js/commit/b722a0a4f8fd4e4e56787db3d9a56e45ee195974))
|
|
11
|
+
|
|
5
12
|
### [0.4.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-0.4.0...@stream-io/video-client-0.4.1) (2023-10-30)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -10262,9 +10262,8 @@ class InputMediaDeviceManager {
|
|
|
10262
10262
|
* Starts stream.
|
|
10263
10263
|
*/
|
|
10264
10264
|
async enable() {
|
|
10265
|
-
if (this.state.status === 'enabled')
|
|
10265
|
+
if (this.state.status === 'enabled')
|
|
10266
10266
|
return;
|
|
10267
|
-
}
|
|
10268
10267
|
this.enablePromise = this.unmuteStream();
|
|
10269
10268
|
try {
|
|
10270
10269
|
await this.enablePromise;
|
|
@@ -10281,10 +10280,10 @@ class InputMediaDeviceManager {
|
|
|
10281
10280
|
*/
|
|
10282
10281
|
async disable() {
|
|
10283
10282
|
this.state.prevStatus = this.state.status;
|
|
10284
|
-
if (this.state.status === 'disabled')
|
|
10283
|
+
if (this.state.status === 'disabled')
|
|
10285
10284
|
return;
|
|
10286
|
-
|
|
10287
|
-
this.disablePromise = this.muteStream(
|
|
10285
|
+
const stopTracks = this.state.disableMode === 'stop-tracks';
|
|
10286
|
+
this.disablePromise = this.muteStream(stopTracks);
|
|
10288
10287
|
try {
|
|
10289
10288
|
await this.disablePromise;
|
|
10290
10289
|
this.state.setStatus('disabled');
|
|
@@ -10321,7 +10320,7 @@ class InputMediaDeviceManager {
|
|
|
10321
10320
|
*
|
|
10322
10321
|
* @param constraints the constraints to set.
|
|
10323
10322
|
*/
|
|
10324
|
-
|
|
10323
|
+
setDefaultConstraints(constraints) {
|
|
10325
10324
|
this.state.setDefaultConstraints(constraints);
|
|
10326
10325
|
}
|
|
10327
10326
|
/**
|
|
@@ -10351,25 +10350,23 @@ class InputMediaDeviceManager {
|
|
|
10351
10350
|
return this.state.mediaStream?.getTracks() ?? [];
|
|
10352
10351
|
}
|
|
10353
10352
|
async muteStream(stopTracks = true) {
|
|
10354
|
-
if (!this.state.mediaStream)
|
|
10353
|
+
if (!this.state.mediaStream)
|
|
10355
10354
|
return;
|
|
10356
|
-
}
|
|
10357
10355
|
this.logger('debug', `${stopTracks ? 'Stopping' : 'Disabling'} stream`);
|
|
10358
10356
|
if (this.call.state.callingState === CallingState.JOINED) {
|
|
10359
10357
|
await this.stopPublishStream(stopTracks);
|
|
10360
10358
|
}
|
|
10361
10359
|
this.muteLocalStream(stopTracks);
|
|
10362
|
-
this.getTracks().
|
|
10363
|
-
|
|
10360
|
+
const allEnded = this.getTracks().every((t) => t.readyState === 'ended');
|
|
10361
|
+
if (allEnded) {
|
|
10362
|
+
if (this.state.mediaStream &&
|
|
10364
10363
|
// @ts-expect-error release() is present in react-native-webrtc
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
this.state.mediaStream.release();
|
|
10369
|
-
}
|
|
10370
|
-
this.state.setMediaStream(undefined);
|
|
10364
|
+
typeof this.state.mediaStream.release === 'function') {
|
|
10365
|
+
// @ts-expect-error called to dispose the stream in RN
|
|
10366
|
+
this.state.mediaStream.release();
|
|
10371
10367
|
}
|
|
10372
|
-
|
|
10368
|
+
this.state.setMediaStream(undefined);
|
|
10369
|
+
}
|
|
10373
10370
|
}
|
|
10374
10371
|
muteTracks() {
|
|
10375
10372
|
this.getTracks().forEach((track) => {
|
|
@@ -13942,7 +13939,7 @@ class StreamClient {
|
|
|
13942
13939
|
});
|
|
13943
13940
|
};
|
|
13944
13941
|
this.getUserAgent = () => {
|
|
13945
|
-
const version = "0.4.
|
|
13942
|
+
const version = "0.4.2" ;
|
|
13946
13943
|
return (this.userAgent ||
|
|
13947
13944
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
13948
13945
|
};
|