@stream-io/video-client 1.33.1 → 1.34.1
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 +19 -0
- package/dist/index.browser.es.js +15 -8
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +15 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +15 -8
- package/dist/index.es.js.map +1 -1
- package/package.json +20 -21
- package/src/Call.ts +1 -0
- package/src/devices/CameraManager.ts +3 -2
- package/src/devices/SpeakerManager.ts +9 -6
- package/src/devices/__tests__/SpeakerManager.test.ts +8 -5
- package/src/rtc/__tests__/layers.test.ts +99 -74
- package/src/store/__tests__/CallState.test.ts +7 -12
package/dist/index.cjs.js
CHANGED
|
@@ -5855,7 +5855,7 @@ const getSdkVersion = (sdk) => {
|
|
|
5855
5855
|
return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
|
|
5856
5856
|
};
|
|
5857
5857
|
|
|
5858
|
-
const version = "1.
|
|
5858
|
+
const version = "1.34.1";
|
|
5859
5859
|
const [major, minor, patch] = version.split('.');
|
|
5860
5860
|
let sdkInfo = {
|
|
5861
5861
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -10682,12 +10682,13 @@ class CameraManager extends DeviceManager {
|
|
|
10682
10682
|
await videoTrack?.applyConstraints({
|
|
10683
10683
|
facingMode: direction === 'front' ? 'user' : 'environment',
|
|
10684
10684
|
});
|
|
10685
|
-
this.state.setDirection(direction);
|
|
10686
|
-
return;
|
|
10687
10685
|
}
|
|
10688
10686
|
// providing both device id and direction doesn't work, so we deselect the device
|
|
10689
10687
|
this.state.setDirection(direction);
|
|
10690
10688
|
this.state.setDevice(undefined);
|
|
10689
|
+
if (isReactNative()) {
|
|
10690
|
+
return;
|
|
10691
|
+
}
|
|
10691
10692
|
this.getTracks().forEach((track) => track.stop());
|
|
10692
10693
|
try {
|
|
10693
10694
|
await this.unmuteStream();
|
|
@@ -11645,13 +11646,18 @@ class SpeakerManager {
|
|
|
11645
11646
|
* @param volume a number between 0 and 1. Set it to `undefined` to use the default volume.
|
|
11646
11647
|
*/
|
|
11647
11648
|
setParticipantVolume(sessionId, volume) {
|
|
11648
|
-
if (isReactNative()) {
|
|
11649
|
-
throw new Error('This feature is not supported in React Native. Please visit https://getstream.io/video/docs/reactnative/core/camera-and-microphone/#speaker-management for more details');
|
|
11650
|
-
}
|
|
11651
11649
|
if (volume && (volume < 0 || volume > 1)) {
|
|
11652
11650
|
throw new Error('Volume must be between 0 and 1, or undefined');
|
|
11653
11651
|
}
|
|
11654
|
-
this.call.state.updateParticipant(sessionId,
|
|
11652
|
+
this.call.state.updateParticipant(sessionId, (p) => {
|
|
11653
|
+
if (isReactNative() && p.audioStream) {
|
|
11654
|
+
for (const track of p.audioStream.getAudioTracks()) {
|
|
11655
|
+
// @ts-expect-error track._setVolume is present in react-native-webrtc
|
|
11656
|
+
track?._setVolume(volume);
|
|
11657
|
+
}
|
|
11658
|
+
}
|
|
11659
|
+
return { audioVolume: volume };
|
|
11660
|
+
});
|
|
11655
11661
|
}
|
|
11656
11662
|
}
|
|
11657
11663
|
|
|
@@ -12465,6 +12471,7 @@ class Call {
|
|
|
12465
12471
|
});
|
|
12466
12472
|
}
|
|
12467
12473
|
this.tracer.setEnabled(enableTracing);
|
|
12474
|
+
this.sfuStatsReporter?.flush();
|
|
12468
12475
|
this.sfuStatsReporter?.stop();
|
|
12469
12476
|
if (statsOptions?.reporting_interval_ms > 0) {
|
|
12470
12477
|
this.sfuStatsReporter = new SfuStatsReporter(sfuClient, {
|
|
@@ -14798,7 +14805,7 @@ class StreamClient {
|
|
|
14798
14805
|
this.getUserAgent = () => {
|
|
14799
14806
|
if (!this.cachedUserAgent) {
|
|
14800
14807
|
const { clientAppIdentifier = {} } = this.options;
|
|
14801
|
-
const { sdkName = 'js', sdkVersion = "1.
|
|
14808
|
+
const { sdkName = 'js', sdkVersion = "1.34.1", ...extras } = clientAppIdentifier;
|
|
14802
14809
|
this.cachedUserAgent = [
|
|
14803
14810
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
14804
14811
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|