@stream-io/video-react-sdk 1.2.4 → 1.2.6
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 +14 -0
- package/dist/index.cjs.js +22 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +22 -11
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/BackgroundFilters/BackgroundFilters.d.ts +1 -6
- package/package.json +1 -1
- package/src/components/BackgroundFilters/BackgroundFilters.tsx +1 -9
- package/src/components/CallControls/ToggleAudioButton.tsx +10 -5
- package/src/components/CallControls/ToggleVideoButton.tsx +10 -2
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { BackgroundBlurLevel, BackgroundFilter } from '@stream-io/video-filters-web';
|
|
3
3
|
export type BackgroundFiltersProps = {
|
|
4
|
-
/**
|
|
5
|
-
* Enables or disables the background-blurring feature.
|
|
6
|
-
* @default true.
|
|
7
|
-
*/
|
|
8
|
-
isBlurringEnabled?: boolean;
|
|
9
4
|
/**
|
|
10
5
|
* A list of URLs to use as background images.
|
|
11
6
|
*/
|
|
12
7
|
backgroundImages?: string[];
|
|
13
8
|
/**
|
|
14
9
|
* The background filter to apply to the video (by default).
|
|
15
|
-
* @default
|
|
10
|
+
* @default undefined no filter applied
|
|
16
11
|
*/
|
|
17
12
|
backgroundFilter?: BackgroundFilter;
|
|
18
13
|
/**
|
package/package.json
CHANGED
|
@@ -20,12 +20,6 @@ import {
|
|
|
20
20
|
} from '@stream-io/video-filters-web';
|
|
21
21
|
|
|
22
22
|
export type BackgroundFiltersProps = {
|
|
23
|
-
/**
|
|
24
|
-
* Enables or disables the background-blurring feature.
|
|
25
|
-
* @default true.
|
|
26
|
-
*/
|
|
27
|
-
isBlurringEnabled?: boolean;
|
|
28
|
-
|
|
29
23
|
/**
|
|
30
24
|
* A list of URLs to use as background images.
|
|
31
25
|
*/
|
|
@@ -33,7 +27,7 @@ export type BackgroundFiltersProps = {
|
|
|
33
27
|
|
|
34
28
|
/**
|
|
35
29
|
* The background filter to apply to the video (by default).
|
|
36
|
-
* @default
|
|
30
|
+
* @default undefined no filter applied
|
|
37
31
|
*/
|
|
38
32
|
backgroundFilter?: BackgroundFilter;
|
|
39
33
|
|
|
@@ -138,7 +132,6 @@ export const BackgroundFiltersProvider = (
|
|
|
138
132
|
) => {
|
|
139
133
|
const {
|
|
140
134
|
children,
|
|
141
|
-
isBlurringEnabled = true,
|
|
142
135
|
backgroundImages = [],
|
|
143
136
|
backgroundFilter: bgFilterFromProps = undefined,
|
|
144
137
|
backgroundImage: bgImageFromProps = undefined,
|
|
@@ -198,7 +191,6 @@ export const BackgroundFiltersProvider = (
|
|
|
198
191
|
applyBackgroundBlurFilter,
|
|
199
192
|
applyBackgroundImageFilter,
|
|
200
193
|
backgroundImages,
|
|
201
|
-
isBlurringEnabled,
|
|
202
194
|
tfFilePath,
|
|
203
195
|
modelFilePath,
|
|
204
196
|
basePath,
|
|
@@ -27,7 +27,7 @@ export type ToggleAudioPreviewButtonProps = PropsWithErrorHandler<
|
|
|
27
27
|
export const ToggleAudioPreviewButton = (
|
|
28
28
|
props: ToggleAudioPreviewButtonProps,
|
|
29
29
|
) => {
|
|
30
|
-
const { caption,
|
|
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 ||
|