@stream-io/video-react-sdk 1.2.5 → 1.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-react-sdk",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.es.js",
@@ -29,9 +29,9 @@
29
29
  ],
30
30
  "dependencies": {
31
31
  "@floating-ui/react": "^0.26.5",
32
- "@stream-io/video-client": "1.4.1",
32
+ "@stream-io/video-client": "1.4.2",
33
33
  "@stream-io/video-filters-web": "0.1.2",
34
- "@stream-io/video-react-bindings": "0.4.45",
34
+ "@stream-io/video-react-bindings": "0.4.46",
35
35
  "chart.js": "^4.4.1",
36
36
  "clsx": "^2.0.0",
37
37
  "react-chartjs-2": "^5.2.0"
@@ -27,7 +27,7 @@ export type ToggleAudioPreviewButtonProps = PropsWithErrorHandler<
27
27
  export const ToggleAudioPreviewButton = (
28
28
  props: ToggleAudioPreviewButtonProps,
29
29
  ) => {
30
- const { caption, Menu, menuPlacement, ...restCompositeButtonProps } = props;
30
+ const { caption, onMenuToggle, ...restCompositeButtonProps } = props;
31
31
  const { t } = useI18n();
32
32
  const { useMicrophoneState } = useCallStateHooks();
33
33
  const { microphone, optimisticIsMute, hasBrowserPermission } =
@@ -60,10 +60,11 @@ export const ToggleAudioPreviewButton = (
60
60
  : 'preview-audio-mute-button'
61
61
  }
62
62
  onClick={handleClick}
63
- Menu={Menu}
64
- menuPlacement={menuPlacement}
65
- onMenuToggle={(shown) => setTooltipDisabled(shown)}
66
63
  {...restCompositeButtonProps}
64
+ onMenuToggle={(shown) => {
65
+ setTooltipDisabled(shown);
66
+ onMenuToggle?.(shown);
67
+ }}
67
68
  >
68
69
  <Icon icon={!optimisticIsMute ? 'mic' : 'mic-off'} />
69
70
  {!hasBrowserPermission && (
@@ -93,6 +94,7 @@ export const ToggleAudioPublishingButton = (
93
94
  caption,
94
95
  Menu = <DeviceSelectorAudioInput visualType="list" />,
95
96
  menuPlacement = 'top',
97
+ onMenuToggle,
96
98
  ...restCompositeButtonProps
97
99
  } = props;
98
100
 
@@ -142,8 +144,11 @@ export const ToggleAudioPublishingButton = (
142
144
  Menu={Menu}
143
145
  menuPlacement={menuPlacement}
144
146
  menuOffset={16}
145
- onMenuToggle={(shown) => setTooltipDisabled(shown)}
146
147
  {...restCompositeButtonProps}
148
+ onMenuToggle={(shown) => {
149
+ setTooltipDisabled(shown);
150
+ onMenuToggle?.(shown);
151
+ }}
147
152
  >
148
153
  <Icon icon={optimisticIsMute ? 'mic-off' : 'mic'} />
149
154
  {(!hasBrowserPermission || !hasPermission) && (
@@ -31,6 +31,7 @@ export const ToggleVideoPreviewButton = (
31
31
  caption,
32
32
  Menu = DeviceSelectorVideo,
33
33
  menuPlacement = 'top',
34
+ onMenuToggle,
34
35
  ...restCompositeButtonProps
35
36
  } = props;
36
37
  const { t } = useI18n();
@@ -64,8 +65,11 @@ export const ToggleVideoPreviewButton = (
64
65
  disabled={!hasBrowserPermission}
65
66
  Menu={Menu}
66
67
  menuPlacement={menuPlacement}
67
- onMenuToggle={(shown) => setTooltipDisabled(shown)}
68
68
  {...restCompositeButtonProps}
69
+ onMenuToggle={(shown) => {
70
+ setTooltipDisabled(shown);
71
+ onMenuToggle?.(shown);
72
+ }}
69
73
  >
70
74
  <Icon icon={!optimisticIsMute ? 'camera' : 'camera-off'} />
71
75
  {!hasBrowserPermission && (
@@ -95,6 +99,7 @@ export const ToggleVideoPublishingButton = (
95
99
  caption,
96
100
  Menu = <DeviceSelectorVideo visualType="list" />,
97
101
  menuPlacement = 'top',
102
+ onMenuToggle,
98
103
  ...restCompositeButtonProps
99
104
  } = props;
100
105
 
@@ -153,8 +158,11 @@ export const ToggleVideoPublishingButton = (
153
158
  Menu={Menu}
154
159
  menuPlacement={menuPlacement}
155
160
  menuOffset={16}
156
- onMenuToggle={(shown) => setTooltipDisabled(shown)}
157
161
  {...restCompositeButtonProps}
162
+ onMenuToggle={(shown) => {
163
+ setTooltipDisabled(shown);
164
+ onMenuToggle?.(shown);
165
+ }}
158
166
  >
159
167
  <Icon icon={optimisticIsMute ? 'camera-off' : 'camera'} />
160
168
  {(!hasBrowserPermission ||