@stream-io/video-client 0.1.8 → 0.1.10
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 +14 -0
- package/dist/index.browser.es.js +11 -10
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +11 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +11 -10
- package/dist/index.es.js.map +1 -1
- package/dist/src/StreamVideoClient.d.ts +4 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/StreamVideoClient.ts +7 -0
- package/src/__tests__/server-side/call-members.test.ts +1 -1
- package/src/__tests__/server-side/call-types.test.ts +36 -0
- package/src/__tests__/server-side/call.test.ts +14 -2
- package/src/devices/devices.ts +4 -7
- package/src/rtc/codecs.ts +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -11668,7 +11668,7 @@ class WSConnectionFallback {
|
|
|
11668
11668
|
}
|
|
11669
11669
|
}
|
|
11670
11670
|
|
|
11671
|
-
const version = '0.1.
|
|
11671
|
+
const version = '0.1.10';
|
|
11672
11672
|
|
|
11673
11673
|
const logger = getLogger(['location']);
|
|
11674
11674
|
const HINT_URL = `https://hint.stream-io-video.com/`;
|
|
@@ -12482,6 +12482,12 @@ class StreamVideoClient {
|
|
|
12482
12482
|
}
|
|
12483
12483
|
}
|
|
12484
12484
|
}
|
|
12485
|
+
/**
|
|
12486
|
+
* Return the reactive state store, use this if you want to be notified about changes to the client state
|
|
12487
|
+
*/
|
|
12488
|
+
get state() {
|
|
12489
|
+
return this.readOnlyStateStore;
|
|
12490
|
+
}
|
|
12485
12491
|
/**
|
|
12486
12492
|
* Connects the given user to the client.
|
|
12487
12493
|
* Only one user can connect at a time, if you want to change users, call `disconnectUser` before connecting a new user.
|
|
@@ -12646,15 +12652,12 @@ const getDevices = (constraints) => {
|
|
|
12646
12652
|
navigator.mediaDevices.enumerateDevices().then((devices) => {
|
|
12647
12653
|
subscriber.next(devices);
|
|
12648
12654
|
// If we stop the tracks before enumerateDevices -> the labels won't show up in Firefox
|
|
12649
|
-
media
|
|
12655
|
+
disposeOfMediaStream(media);
|
|
12650
12656
|
subscriber.complete();
|
|
12651
12657
|
});
|
|
12652
12658
|
})
|
|
12653
12659
|
.catch((error) => {
|
|
12654
|
-
|
|
12655
|
-
if (logger) {
|
|
12656
|
-
logger('error', 'Failed to get devices', error);
|
|
12657
|
-
}
|
|
12660
|
+
getLogger(['devices'])('error', 'Failed to get devices', error);
|
|
12658
12661
|
subscriber.error(error);
|
|
12659
12662
|
});
|
|
12660
12663
|
});
|
|
@@ -12725,12 +12728,11 @@ const getAudioOutputDevices = () => {
|
|
|
12725
12728
|
return audioDevices$.pipe(rxjs.map((values) => values.filter((d) => d.kind === 'audiooutput')));
|
|
12726
12729
|
};
|
|
12727
12730
|
const getStream = (constraints) => __awaiter(void 0, void 0, void 0, function* () {
|
|
12728
|
-
var _a;
|
|
12729
12731
|
try {
|
|
12730
12732
|
return yield navigator.mediaDevices.getUserMedia(constraints);
|
|
12731
12733
|
}
|
|
12732
12734
|
catch (e) {
|
|
12733
|
-
|
|
12735
|
+
getLogger(['devices'])('error', `Failed get user media`, {
|
|
12734
12736
|
error: e,
|
|
12735
12737
|
constraints: constraints,
|
|
12736
12738
|
});
|
|
@@ -12776,12 +12778,11 @@ const getVideoStream = (trackConstraints) => __awaiter(void 0, void 0, void 0, f
|
|
|
12776
12778
|
* @param options any additional options to pass to the [`getDisplayMedia`](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia) API.
|
|
12777
12779
|
*/
|
|
12778
12780
|
const getScreenShareStream = (options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
12779
|
-
var _b;
|
|
12780
12781
|
try {
|
|
12781
12782
|
return yield navigator.mediaDevices.getDisplayMedia(Object.assign({ video: true, audio: false }, options));
|
|
12782
12783
|
}
|
|
12783
12784
|
catch (e) {
|
|
12784
|
-
|
|
12785
|
+
getLogger(['devices'])('error', 'Failed to get screen share stream', e);
|
|
12785
12786
|
throw e;
|
|
12786
12787
|
}
|
|
12787
12788
|
});
|