@stream-io/video-react-sdk 1.2.14 → 1.2.16
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 +12 -0
- package/dist/css/styles.css.map +1 -1
- package/dist/index.cjs.js +7 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +7 -3
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/CallControls/ToggleAudioOutputButton.d.ts +1 -1
- package/package.json +2 -2
- package/src/components/CallControls/ToggleAudioOutputButton.tsx +20 -8
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IconButtonWithMenuProps } from '../Button';
|
|
2
|
-
export type ToggleAudioOutputButtonProps = Pick<IconButtonWithMenuProps, 'caption' | 'Menu' | 'menuPlacement'>;
|
|
2
|
+
export type ToggleAudioOutputButtonProps = Pick<IconButtonWithMenuProps, 'caption' | 'Menu' | 'menuPlacement' | 'onMenuToggle'>;
|
|
3
3
|
export declare const ToggleAudioOutputButton: (props: ToggleAudioOutputButtonProps) => import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.16",
|
|
4
4
|
"packageManager": "yarn@3.2.4",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@rollup/plugin-replace": "^5.0.5",
|
|
46
46
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
47
47
|
"@stream-io/audio-filters-web": "^0.2.1",
|
|
48
|
-
"@stream-io/video-styling": "^1.0.
|
|
48
|
+
"@stream-io/video-styling": "^1.0.6",
|
|
49
49
|
"@types/react": "^18.3.2",
|
|
50
50
|
"@types/react-dom": "^18.3.0",
|
|
51
51
|
"react": "^18.3.1",
|
|
@@ -2,10 +2,12 @@ import { CompositeButton, IconButtonWithMenuProps } from '../Button';
|
|
|
2
2
|
import { useI18n } from '@stream-io/video-react-bindings';
|
|
3
3
|
import { Icon } from '../Icon';
|
|
4
4
|
import { DeviceSelectorAudioOutput } from '../DeviceSettings';
|
|
5
|
+
import { WithTooltip } from '../Tooltip';
|
|
6
|
+
import { useState } from 'react';
|
|
5
7
|
|
|
6
8
|
export type ToggleAudioOutputButtonProps = Pick<
|
|
7
9
|
IconButtonWithMenuProps,
|
|
8
|
-
'caption' | 'Menu' | 'menuPlacement'
|
|
10
|
+
'caption' | 'Menu' | 'menuPlacement' | 'onMenuToggle'
|
|
9
11
|
>;
|
|
10
12
|
|
|
11
13
|
export const ToggleAudioOutputButton = (
|
|
@@ -16,17 +18,27 @@ export const ToggleAudioOutputButton = (
|
|
|
16
18
|
caption,
|
|
17
19
|
Menu = DeviceSelectorAudioOutput,
|
|
18
20
|
menuPlacement = 'top',
|
|
21
|
+
onMenuToggle,
|
|
19
22
|
} = props;
|
|
23
|
+
const [tooltipDisabled, setTooltipDisabled] = useState(false);
|
|
20
24
|
|
|
21
25
|
return (
|
|
22
|
-
<
|
|
23
|
-
Menu={Menu}
|
|
24
|
-
menuPlacement={menuPlacement}
|
|
25
|
-
caption={caption}
|
|
26
|
+
<WithTooltip
|
|
26
27
|
title={caption || t('Speakers')}
|
|
27
|
-
|
|
28
|
+
tooltipDisabled={tooltipDisabled}
|
|
28
29
|
>
|
|
29
|
-
<
|
|
30
|
-
|
|
30
|
+
<CompositeButton
|
|
31
|
+
Menu={Menu}
|
|
32
|
+
menuPlacement={menuPlacement}
|
|
33
|
+
caption={caption}
|
|
34
|
+
data-testid="audio-output-button"
|
|
35
|
+
onMenuToggle={(shown) => {
|
|
36
|
+
setTooltipDisabled(shown);
|
|
37
|
+
onMenuToggle?.(shown);
|
|
38
|
+
}}
|
|
39
|
+
>
|
|
40
|
+
<Icon icon="speaker" />
|
|
41
|
+
</CompositeButton>
|
|
42
|
+
</WithTooltip>
|
|
31
43
|
);
|
|
32
44
|
};
|