@stream-io/video-react-sdk 0.5.5 → 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 CHANGED
@@ -2,6 +2,23 @@
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
+
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)
17
+
18
+ ### Dependency Updates
19
+
20
+ * `@stream-io/video-client` updated to version `0.6.4`
21
+ * `@stream-io/video-react-bindings` updated to version `0.4.4`
5
22
  ### [0.5.5](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-0.5.4...@stream-io/video-react-sdk-0.5.5) (2024-03-25)
6
23
 
7
24
  ### Dependency Updates
package/README.md CHANGED
@@ -75,7 +75,7 @@ Here are some of the features we support:
75
75
  - [x] Performance and bundle-size optimizations
76
76
  - [x] Dynascale 2.0 (f resolution switches, resolution WebRTC handling)
77
77
  - [ ] Dynascale 2.0 (codec switching)
78
- - [ ] Call analytics / stats
78
+ - [x] Call analytics / stats
79
79
 
80
80
  ### 0.6 milestone
81
81
 
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.5" ).split('.');
2284
+ const [major, minor, patch] = ("0.5.7" ).split('.');
2281
2285
  videoClient.setSdkInfo({
2282
2286
  type: videoClient.SfuModels.SdkType.REACT,
2283
2287
  major,