@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 CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ### [1.2.6](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.2.5...@stream-io/video-react-sdk-1.2.6) (2024-06-24)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * default onMenuToggle behavior shouldn't be overridden ([#1417](https://github.com/GetStream/stream-video-js/issues/1417)) ([3529e40](https://github.com/GetStream/stream-video-js/commit/3529e40b338c64e61ecbc7460e97c3c878771434))
11
+
12
+ ### [1.2.5](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.2.4...@stream-io/video-react-sdk-1.2.5) (2024-06-20)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * remove `isBlurringEnabled` prop ([#1411](https://github.com/GetStream/stream-video-js/issues/1411)) ([23bafe0](https://github.com/GetStream/stream-video-js/commit/23bafe0cc6a3bf0bcdff2e0339904dae5778c560))
18
+
5
19
  ### [1.2.4](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.2.3...@stream-io/video-react-sdk-1.2.4) (2024-06-19)
6
20
 
7
21
  ### Dependency Updates
package/dist/index.cjs.js CHANGED
@@ -72,7 +72,7 @@ const useBackgroundFilters = () => {
72
72
  * in your project before using this component.
73
73
  */
74
74
  const BackgroundFiltersProvider = (props) => {
75
- const { children, isBlurringEnabled = true, backgroundImages = [], backgroundFilter: bgFilterFromProps = undefined, backgroundImage: bgImageFromProps = undefined, backgroundBlurLevel: bgBlurLevelFromProps = 'high', tfFilePath, modelFilePath, basePath, } = props;
75
+ const { children, backgroundImages = [], backgroundFilter: bgFilterFromProps = undefined, backgroundImage: bgImageFromProps = undefined, backgroundBlurLevel: bgBlurLevelFromProps = 'high', tfFilePath, modelFilePath, basePath, } = props;
76
76
  const [backgroundFilter, setBackgroundFilter] = react.useState(bgFilterFromProps);
77
77
  const [backgroundImage, setBackgroundImage] = react.useState(bgImageFromProps);
78
78
  const [backgroundBlurLevel, setBackgroundBlurLevel] = react.useState(bgBlurLevelFromProps);
@@ -112,7 +112,6 @@ const BackgroundFiltersProvider = (props) => {
112
112
  applyBackgroundBlurFilter,
113
113
  applyBackgroundImageFilter,
114
114
  backgroundImages,
115
- isBlurringEnabled,
116
115
  tfFilePath,
117
116
  modelFilePath,
118
117
  basePath,
@@ -1085,7 +1084,7 @@ const ToggleDeviceSettingsMenuButton = react.forwardRef(function ToggleDeviceSet
1085
1084
  });
1086
1085
 
1087
1086
  const ToggleAudioPreviewButton = (props) => {
1088
- const { caption, Menu, menuPlacement, ...restCompositeButtonProps } = props;
1087
+ const { caption, onMenuToggle, ...restCompositeButtonProps } = props;
1089
1088
  const { t } = videoReactBindings.useI18n();
1090
1089
  const { useMicrophoneState } = videoReactBindings.useCallStateHooks();
1091
1090
  const { microphone, optimisticIsMute, hasBrowserPermission } = useMicrophoneState();
@@ -1095,11 +1094,14 @@ const ToggleAudioPreviewButton = (props) => {
1095
1094
  ? t('Check your browser audio permissions')
1096
1095
  : caption ?? t('Mic'), tooltipDisabled: tooltipDisabled, children: jsxRuntime.jsxs(CompositeButton, { active: optimisticIsMute, caption: caption, className: clsx(!hasBrowserPermission && 'str-video__device-unavailable'), variant: "secondary", disabled: !hasBrowserPermission, "data-testid": optimisticIsMute
1097
1096
  ? 'preview-audio-unmute-button'
1098
- : 'preview-audio-mute-button', onClick: handleClick, Menu: Menu, menuPlacement: menuPlacement, onMenuToggle: (shown) => setTooltipDisabled(shown), ...restCompositeButtonProps, children: [jsxRuntime.jsx(Icon, { icon: !optimisticIsMute ? 'mic' : 'mic-off' }), !hasBrowserPermission && (jsxRuntime.jsx("span", { className: "str-video__no-media-permission", title: t('Check your browser audio permissions'), children: "!" }))] }) }));
1097
+ : 'preview-audio-mute-button', onClick: handleClick, ...restCompositeButtonProps, onMenuToggle: (shown) => {
1098
+ setTooltipDisabled(shown);
1099
+ onMenuToggle?.(shown);
1100
+ }, children: [jsxRuntime.jsx(Icon, { icon: !optimisticIsMute ? 'mic' : 'mic-off' }), !hasBrowserPermission && (jsxRuntime.jsx("span", { className: "str-video__no-media-permission", title: t('Check your browser audio permissions'), children: "!" }))] }) }));
1099
1101
  };
1100
1102
  const ToggleAudioPublishingButton = (props) => {
1101
1103
  const { t } = videoReactBindings.useI18n();
1102
- const { caption, Menu = jsxRuntime.jsx(DeviceSelectorAudioInput, { visualType: "list" }), menuPlacement = 'top', ...restCompositeButtonProps } = props;
1104
+ const { caption, Menu = jsxRuntime.jsx(DeviceSelectorAudioInput, { visualType: "list" }), menuPlacement = 'top', onMenuToggle, ...restCompositeButtonProps } = props;
1103
1105
  const { hasPermission, requestPermission, isAwaitingPermission } = useRequestPermission(videoClient.OwnCapability.SEND_AUDIO);
1104
1106
  const { useMicrophoneState } = videoReactBindings.useCallStateHooks();
1105
1107
  const { microphone, optimisticIsMute, hasBrowserPermission } = useMicrophoneState();
@@ -1116,11 +1118,14 @@ const ToggleAudioPublishingButton = (props) => {
1116
1118
  ? t('You have no permission to share your audio')
1117
1119
  : !hasBrowserPermission
1118
1120
  ? t('Check your browser mic permissions')
1119
- : caption ?? t('Mic'), tooltipDisabled: tooltipDisabled, children: jsxRuntime.jsxs(CompositeButton, { active: optimisticIsMute, caption: caption, variant: "secondary", disabled: !hasBrowserPermission || !hasPermission, "data-testid": optimisticIsMute ? 'audio-unmute-button' : 'audio-mute-button', onClick: handleClick, Menu: Menu, menuPlacement: menuPlacement, menuOffset: 16, onMenuToggle: (shown) => setTooltipDisabled(shown), ...restCompositeButtonProps, children: [jsxRuntime.jsx(Icon, { icon: optimisticIsMute ? 'mic-off' : 'mic' }), (!hasBrowserPermission || !hasPermission) && (jsxRuntime.jsx("span", { className: "str-video__no-media-permission", children: "!" }))] }) }) }) }));
1121
+ : caption ?? t('Mic'), tooltipDisabled: tooltipDisabled, children: jsxRuntime.jsxs(CompositeButton, { active: optimisticIsMute, caption: caption, variant: "secondary", disabled: !hasBrowserPermission || !hasPermission, "data-testid": optimisticIsMute ? 'audio-unmute-button' : 'audio-mute-button', onClick: handleClick, Menu: Menu, menuPlacement: menuPlacement, menuOffset: 16, ...restCompositeButtonProps, onMenuToggle: (shown) => {
1122
+ setTooltipDisabled(shown);
1123
+ onMenuToggle?.(shown);
1124
+ }, children: [jsxRuntime.jsx(Icon, { icon: optimisticIsMute ? 'mic-off' : 'mic' }), (!hasBrowserPermission || !hasPermission) && (jsxRuntime.jsx("span", { className: "str-video__no-media-permission", children: "!" }))] }) }) }) }));
1120
1125
  };
1121
1126
 
1122
1127
  const ToggleVideoPreviewButton = (props) => {
1123
- const { caption, Menu = DeviceSelectorVideo, menuPlacement = 'top', ...restCompositeButtonProps } = props;
1128
+ const { caption, Menu = DeviceSelectorVideo, menuPlacement = 'top', onMenuToggle, ...restCompositeButtonProps } = props;
1124
1129
  const { t } = videoReactBindings.useI18n();
1125
1130
  const { useCameraState } = videoReactBindings.useCallStateHooks();
1126
1131
  const { camera, optimisticIsMute, hasBrowserPermission } = useCameraState();
@@ -1130,11 +1135,14 @@ const ToggleVideoPreviewButton = (props) => {
1130
1135
  ? t('Check your browser video permissions')
1131
1136
  : caption ?? t('Video'), tooltipDisabled: tooltipDisabled, children: jsxRuntime.jsxs(CompositeButton, { active: optimisticIsMute, caption: caption, className: clsx(!hasBrowserPermission && 'str-video__device-unavailable'), variant: "secondary", "data-testid": optimisticIsMute
1132
1137
  ? 'preview-video-unmute-button'
1133
- : 'preview-video-mute-button', onClick: handleClick, disabled: !hasBrowserPermission, Menu: Menu, menuPlacement: menuPlacement, onMenuToggle: (shown) => setTooltipDisabled(shown), ...restCompositeButtonProps, children: [jsxRuntime.jsx(Icon, { icon: !optimisticIsMute ? 'camera' : 'camera-off' }), !hasBrowserPermission && (jsxRuntime.jsx("span", { className: "str-video__no-media-permission", title: t('Check your browser video permissions'), children: "!" }))] }) }));
1138
+ : 'preview-video-mute-button', onClick: handleClick, disabled: !hasBrowserPermission, Menu: Menu, menuPlacement: menuPlacement, ...restCompositeButtonProps, onMenuToggle: (shown) => {
1139
+ setTooltipDisabled(shown);
1140
+ onMenuToggle?.(shown);
1141
+ }, children: [jsxRuntime.jsx(Icon, { icon: !optimisticIsMute ? 'camera' : 'camera-off' }), !hasBrowserPermission && (jsxRuntime.jsx("span", { className: "str-video__no-media-permission", title: t('Check your browser video permissions'), children: "!" }))] }) }));
1134
1142
  };
1135
1143
  const ToggleVideoPublishingButton = (props) => {
1136
1144
  const { t } = videoReactBindings.useI18n();
1137
- const { caption, Menu = jsxRuntime.jsx(DeviceSelectorVideo, { visualType: "list" }), menuPlacement = 'top', ...restCompositeButtonProps } = props;
1145
+ const { caption, Menu = jsxRuntime.jsx(DeviceSelectorVideo, { visualType: "list" }), menuPlacement = 'top', onMenuToggle, ...restCompositeButtonProps } = props;
1138
1146
  const { hasPermission, requestPermission, isAwaitingPermission } = useRequestPermission(videoClient.OwnCapability.SEND_VIDEO);
1139
1147
  const { useCameraState, useCallSettings } = videoReactBindings.useCallStateHooks();
1140
1148
  const { camera, optimisticIsMute, hasBrowserPermission } = useCameraState();
@@ -1157,7 +1165,10 @@ const ToggleVideoPublishingButton = (props) => {
1157
1165
  ? t('Video publishing is disabled by the system')
1158
1166
  : caption || t('Video'), tooltipDisabled: tooltipDisabled, children: jsxRuntime.jsxs(CompositeButton, { active: optimisticIsMute, caption: caption, variant: "secondary", disabled: !hasBrowserPermission ||
1159
1167
  !hasPermission ||
1160
- !isPublishingVideoAllowed, "data-testid": optimisticIsMute ? 'video-unmute-button' : 'video-mute-button', onClick: handleClick, Menu: Menu, menuPlacement: menuPlacement, menuOffset: 16, onMenuToggle: (shown) => setTooltipDisabled(shown), ...restCompositeButtonProps, children: [jsxRuntime.jsx(Icon, { icon: optimisticIsMute ? 'camera-off' : 'camera' }), (!hasBrowserPermission ||
1168
+ !isPublishingVideoAllowed, "data-testid": optimisticIsMute ? 'video-unmute-button' : 'video-mute-button', onClick: handleClick, Menu: Menu, menuPlacement: menuPlacement, menuOffset: 16, ...restCompositeButtonProps, onMenuToggle: (shown) => {
1169
+ setTooltipDisabled(shown);
1170
+ onMenuToggle?.(shown);
1171
+ }, children: [jsxRuntime.jsx(Icon, { icon: optimisticIsMute ? 'camera-off' : 'camera' }), (!hasBrowserPermission ||
1161
1172
  !hasPermission ||
1162
1173
  !isPublishingVideoAllowed) && (jsxRuntime.jsx("span", { className: "str-video__no-media-permission", children: "!" }))] }) }) }) }));
1163
1174
  };
@@ -2601,7 +2612,7 @@ const LivestreamPlayer = (props) => {
2601
2612
  return (jsxRuntime.jsx(StreamCall, { call: call, children: jsxRuntime.jsx(LivestreamLayout, { ...layoutProps }) }));
2602
2613
  };
2603
2614
 
2604
- const [major, minor, patch] = ("1.2.4" ).split('.');
2615
+ const [major, minor, patch] = ("1.2.6" ).split('.');
2605
2616
  videoClient.setSdkInfo({
2606
2617
  type: videoClient.SfuModels.SdkType.REACT,
2607
2618
  major,