@stream-io/video-react-sdk 1.19.2 → 1.19.4

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.
@@ -4,7 +4,6 @@ export * from './Button';
4
4
  export * from './CallControls';
5
5
  export * from './CallParticipantsList';
6
6
  export * from './CallPreview';
7
- export * from './CallStats';
8
7
  export * from './CallRecordingList';
9
8
  export * from './CallStats';
10
9
  export * from './DeviceSettings';
@@ -14,9 +13,10 @@ export * from './LoadingIndicator';
14
13
  export * from './Menu';
15
14
  export * from './NoiseCancellation';
16
15
  export * from './Notification';
16
+ export * from './Reaction';
17
17
  export * from './RingingCall';
18
18
  export * from './Permissions';
19
- export * from './StreamTheme';
20
19
  export * from './Search';
20
+ export * from './StreamTheme';
21
21
  export * from './Tooltip';
22
22
  export * from './VideoPreview';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-react-sdk",
3
- "version": "1.19.2",
3
+ "version": "1.19.4",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/index.d.ts",
@@ -30,9 +30,9 @@
30
30
  ],
31
31
  "dependencies": {
32
32
  "@floating-ui/react": "^0.27.6",
33
- "@stream-io/video-client": "1.27.1",
33
+ "@stream-io/video-client": "1.27.2",
34
34
  "@stream-io/video-filters-web": "0.2.1",
35
- "@stream-io/video-react-bindings": "1.7.10",
35
+ "@stream-io/video-react-bindings": "1.7.11",
36
36
  "chart.js": "^4.4.4",
37
37
  "clsx": "^2.0.0",
38
38
  "react-chartjs-2": "^5.3.0"
@@ -4,7 +4,6 @@ export * from './Button';
4
4
  export * from './CallControls';
5
5
  export * from './CallParticipantsList';
6
6
  export * from './CallPreview';
7
- export * from './CallStats';
8
7
  export * from './CallRecordingList';
9
8
  export * from './CallStats';
10
9
  export * from './DeviceSettings';
@@ -14,9 +13,10 @@ export * from './LoadingIndicator';
14
13
  export * from './Menu';
15
14
  export * from './NoiseCancellation';
16
15
  export * from './Notification';
16
+ export * from './Reaction';
17
17
  export * from './RingingCall';
18
18
  export * from './Permissions';
19
- export * from './StreamTheme';
20
19
  export * from './Search';
20
+ export * from './StreamTheme';
21
21
  export * from './Tooltip';
22
22
  export * from './VideoPreview';
@@ -75,10 +75,11 @@ export const usePersistedDevicePreferences = (
75
75
  setApplyingState('applying');
76
76
 
77
77
  (async () => {
78
- for (const [deviceKey, state, defaultMuted] of [
79
- ['microphone', microphoneState, !settings.audio.mic_default_on],
80
- ['camera', cameraState, !settings.video.camera_default_on],
81
- ['speaker', speakerState, false],
78
+ const { audio, video } = settings;
79
+ for (const [deviceKey, state, defaultMuted, enabledInCallType] of [
80
+ ['microphone', microphoneState, !audio.mic_default_on, true],
81
+ ['camera', cameraState, !video.camera_default_on, video.enabled],
82
+ ['speaker', speakerState, false, true],
82
83
  ] as const) {
83
84
  const preferences = parseLocalDevicePreferences(key);
84
85
  const preference = preferences[deviceKey];
@@ -91,8 +92,9 @@ export const usePersistedDevicePreferences = (
91
92
  manager,
92
93
  [preference].flat(),
93
94
  state.devices,
95
+ enabledInCallType,
94
96
  )
95
- : applyMutedState(manager, defaultMuted);
97
+ : applyMutedState(manager, defaultMuted, enabledInCallType);
96
98
 
97
99
  await applyPromise.catch((err) => {
98
100
  console.warn(
@@ -327,6 +329,7 @@ const applyLocalDevicePreference = async (
327
329
  manager: DeviceManagerLike,
328
330
  preference: LocalDevicePreference[],
329
331
  devices: MediaDeviceInfo[],
332
+ enabledInCallType: boolean,
330
333
  ): Promise<void> => {
331
334
  let muted: boolean | undefined;
332
335
 
@@ -352,12 +355,16 @@ const applyLocalDevicePreference = async (
352
355
  }
353
356
 
354
357
  if (typeof muted === 'boolean') {
355
- await applyMutedState(manager, muted);
358
+ await applyMutedState(manager, muted, enabledInCallType);
356
359
  }
357
360
  };
358
361
 
359
- const applyMutedState = async (manager: DeviceManagerLike, muted: boolean) => {
360
- if (!manager.state.status) {
362
+ const applyMutedState = async (
363
+ manager: DeviceManagerLike,
364
+ muted: boolean,
365
+ enabledInCallType: boolean,
366
+ ) => {
367
+ if (enabledInCallType && !manager.state.status) {
361
368
  await manager[muted ? 'disable' : 'enable']?.();
362
369
  }
363
370
  };