@stream-io/video-react-sdk 1.13.0 → 1.13.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 +18 -0
- package/dist/index.cjs.js +12 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +12 -6
- package/dist/index.es.js.map +1 -1
- package/package.json +3 -3
- package/src/hooks/usePersistedDevicePreferences.ts +20 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.13.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.13.1...@stream-io/video-react-sdk-1.13.2) (2025-04-02)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `@stream-io/video-client` updated to version `1.18.9`
|
|
10
|
+
* `@stream-io/video-react-bindings` updated to version `1.5.11`
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* correctly apply muted state from persisted settings ([#1745](https://github.com/GetStream/stream-video-js/issues/1745)) ([a718de6](https://github.com/GetStream/stream-video-js/commit/a718de618acbc505c975da9c8d4ecaac722245af)), closes [#1736](https://github.com/GetStream/stream-video-js/issues/1736) [#1741](https://github.com/GetStream/stream-video-js/issues/1741)
|
|
15
|
+
|
|
16
|
+
## [1.13.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.13.0...@stream-io/video-react-sdk-1.13.1) (2025-04-01)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* apply muted state from persisted device preferences ([#1741](https://github.com/GetStream/stream-video-js/issues/1741)) ([75e7b66](https://github.com/GetStream/stream-video-js/commit/75e7b66d9a2ae01a157b8969cab5c8ff8a43d84d)), closes [#1736](https://github.com/GetStream/stream-video-js/issues/1736)
|
|
22
|
+
|
|
5
23
|
## [1.13.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.12.11...@stream-io/video-react-sdk-1.13.0) (2025-04-01)
|
|
6
24
|
|
|
7
25
|
### Dependency Updates
|
package/dist/index.cjs.js
CHANGED
|
@@ -100,9 +100,9 @@ const usePersistedDevicePreference = (key, deviceKey, state) => {
|
|
|
100
100
|
const preference = preferences[deviceKey];
|
|
101
101
|
setApplyingState('applying');
|
|
102
102
|
if (preference && !manager.state.selectedDevice) {
|
|
103
|
-
|
|
103
|
+
applyLocalDevicePreference(manager, [preference].flat(), state.devices)
|
|
104
104
|
.catch((err) => {
|
|
105
|
-
console.warn(`Failed to
|
|
105
|
+
console.warn(`Failed to apply ${deviceKey} device preferences`, err);
|
|
106
106
|
})
|
|
107
107
|
.finally(() => setApplyingState('applied'));
|
|
108
108
|
}
|
|
@@ -173,18 +173,24 @@ const patchLocalDevicePreference = (key, deviceKey, state) => {
|
|
|
173
173
|
].slice(0, 3),
|
|
174
174
|
}));
|
|
175
175
|
};
|
|
176
|
-
const
|
|
176
|
+
const applyLocalDevicePreference = async (manager, preference, devices) => {
|
|
177
|
+
let muted;
|
|
177
178
|
for (const p of preference) {
|
|
179
|
+
muted ?? (muted = p.muted);
|
|
178
180
|
if (p.selectedDeviceId === defaultDevice) {
|
|
179
|
-
|
|
181
|
+
break;
|
|
180
182
|
}
|
|
181
183
|
const device = devices.find((d) => d.deviceId === p.selectedDeviceId) ??
|
|
182
184
|
devices.find((d) => d.label === p.selectedDeviceLabel);
|
|
183
185
|
if (device) {
|
|
184
186
|
await manager.select(device.deviceId);
|
|
185
|
-
|
|
187
|
+
muted = p.muted;
|
|
188
|
+
break;
|
|
186
189
|
}
|
|
187
190
|
}
|
|
191
|
+
if (typeof muted === 'boolean') {
|
|
192
|
+
await manager[muted ? 'disable' : 'enable']?.();
|
|
193
|
+
}
|
|
188
194
|
};
|
|
189
195
|
const getSelectedDevicePreference = (devices, selectedDevice) => ({
|
|
190
196
|
selectedDeviceId: selectedDevice || defaultDevice,
|
|
@@ -2668,7 +2674,7 @@ const LivestreamPlayer = (props) => {
|
|
|
2668
2674
|
return (jsxRuntime.jsx(StreamCall, { call: call, children: jsxRuntime.jsx(LivestreamLayout, { ...layoutProps }) }));
|
|
2669
2675
|
};
|
|
2670
2676
|
|
|
2671
|
-
const [major, minor, patch] = ("1.13.
|
|
2677
|
+
const [major, minor, patch] = ("1.13.2").split('.');
|
|
2672
2678
|
videoClient.setSdkInfo({
|
|
2673
2679
|
type: videoClient.SfuModels.SdkType.REACT,
|
|
2674
2680
|
major,
|