@stream-io/video-react-sdk 0.5.0 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-react-sdk",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.es.js",
@@ -29,8 +29,8 @@
29
29
  ],
30
30
  "dependencies": {
31
31
  "@floating-ui/react": "^0.26.5",
32
- "@stream-io/video-client": "^0.6.0",
33
- "@stream-io/video-react-bindings": "^0.4.0",
32
+ "@stream-io/video-client": "^0.6.1",
33
+ "@stream-io/video-react-bindings": "^0.4.1",
34
34
  "chart.js": "^4.4.1",
35
35
  "clsx": "^2.0.0",
36
36
  "react-chartjs-2": "^5.2.0"
@@ -1,6 +1,7 @@
1
1
  import { CompositeButton, IconButtonWithMenuProps } from '../Button';
2
2
  import { useI18n } from '@stream-io/video-react-bindings';
3
3
  import { Icon } from '../Icon';
4
+ import { DeviceSelectorAudioOutput } from '../DeviceSettings';
4
5
 
5
6
  export type ToggleAudioOutputButtonProps = Pick<
6
7
  IconButtonWithMenuProps,
@@ -11,11 +12,16 @@ export const ToggleAudioOutputButton = (
11
12
  props: ToggleAudioOutputButtonProps,
12
13
  ) => {
13
14
  const { t } = useI18n();
14
- const { caption, Menu } = props;
15
+ const {
16
+ caption,
17
+ Menu = DeviceSelectorAudioOutput,
18
+ menuPlacement = 'top',
19
+ } = props;
15
20
 
16
21
  return (
17
22
  <CompositeButton
18
23
  Menu={Menu}
24
+ menuPlacement={menuPlacement}
19
25
  caption={caption}
20
26
  title={caption || t('Speakers')}
21
27
  data-testid="audio-output-button"
@@ -19,7 +19,12 @@ export type ToggleVideoPreviewButtonProps = Pick<
19
19
  export const ToggleVideoPreviewButton = (
20
20
  props: ToggleVideoPreviewButtonProps,
21
21
  ) => {
22
- const { caption, ...restCompositeButtonProps } = props;
22
+ const {
23
+ caption,
24
+ Menu = DeviceSelectorVideo,
25
+ menuPlacement = 'top',
26
+ ...restCompositeButtonProps
27
+ } = props;
23
28
  const { t } = useI18n();
24
29
  const { useCameraState } = useCallStateHooks();
25
30
  const { camera, isMute, hasBrowserPermission } = useCameraState();
@@ -40,6 +45,8 @@ export const ToggleVideoPreviewButton = (
40
45
  }
41
46
  onClick={() => camera.toggle()}
42
47
  disabled={!hasBrowserPermission}
48
+ Menu={Menu}
49
+ menuPlacement={menuPlacement}
43
50
  {...restCompositeButtonProps}
44
51
  >
45
52
  <Icon icon={!isMute ? 'camera' : 'camera-off'} />