@stream-io/video-react-sdk 0.5.6 → 0.5.7
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 +11 -0
- package/dist/index.cjs.js +6 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +7 -3
- package/dist/index.es.js.map +1 -1
- package/package.json +3 -3
- package/src/hooks/usePersistedDevicePreferences.ts +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
### [0.5.7](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-0.5.6...@stream-io/video-react-sdk-0.5.7) (2024-03-29)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `@stream-io/video-client` updated to version `0.6.5`
|
|
10
|
+
* `@stream-io/video-react-bindings` updated to version `0.4.5`
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* various bug fixes and improvements ([#1300](https://github.com/GetStream/stream-video-js/issues/1300)) ([a6186e2](https://github.com/GetStream/stream-video-js/commit/a6186e2406fd0b3e0aaa51a4222fa2e24e9dfac3))
|
|
15
|
+
|
|
5
16
|
### [0.5.6](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-0.5.5...@stream-io/video-react-sdk-0.5.6) (2024-03-28)
|
|
6
17
|
|
|
7
18
|
### Dependency Updates
|
package/dist/index.cjs.js
CHANGED
|
@@ -85,12 +85,15 @@ const useFloatingUIPreset = ({ placement, strategy, offset: offsetInPx = 10, })
|
|
|
85
85
|
*/
|
|
86
86
|
const usePersistDevicePreferences = (key) => {
|
|
87
87
|
const { useMicrophoneState, useCameraState, useSpeakerState, useCallSettings, } = videoReactBindings.useCallStateHooks();
|
|
88
|
+
const call = videoReactBindings.useCall();
|
|
88
89
|
const mic = useMicrophoneState();
|
|
89
90
|
const camera = useCameraState();
|
|
90
91
|
const speaker = useSpeakerState();
|
|
91
92
|
const settings = useCallSettings();
|
|
92
93
|
react.useEffect(() => {
|
|
93
|
-
if (!settings)
|
|
94
|
+
if (!call || !settings)
|
|
95
|
+
return;
|
|
96
|
+
if (call.state.callingState === videoClient.CallingState.LEFT)
|
|
94
97
|
return;
|
|
95
98
|
try {
|
|
96
99
|
const hasPreferences = !!window.localStorage.getItem(key);
|
|
@@ -116,6 +119,7 @@ const usePersistDevicePreferences = (key) => {
|
|
|
116
119
|
console.warn('Failed to save device preferences', err);
|
|
117
120
|
}
|
|
118
121
|
}, [
|
|
122
|
+
call,
|
|
119
123
|
camera.isMute,
|
|
120
124
|
camera.selectedDevice,
|
|
121
125
|
key,
|
|
@@ -2277,7 +2281,7 @@ const VerticalScrollButtons = ({ scrollWrapper, }) => {
|
|
|
2277
2281
|
};
|
|
2278
2282
|
const hasScreenShare = (p) => !!p?.publishedTracks.includes(videoClient.SfuModels.TrackType.SCREEN_SHARE);
|
|
2279
2283
|
|
|
2280
|
-
const [major, minor, patch] = ("0.5.
|
|
2284
|
+
const [major, minor, patch] = ("0.5.7" ).split('.');
|
|
2281
2285
|
videoClient.setSdkInfo({
|
|
2282
2286
|
type: videoClient.SfuModels.SdkType.REACT,
|
|
2283
2287
|
major,
|