@stream-io/video-react-sdk 1.2.5 → 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 +7 -0
- package/dist/index.cjs.js +21 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +21 -9
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CallControls/ToggleAudioButton.tsx +10 -5
- package/src/components/CallControls/ToggleVideoButton.tsx +10 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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
|
+
|
|
5
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)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -1084,7 +1084,7 @@ const ToggleDeviceSettingsMenuButton = react.forwardRef(function ToggleDeviceSet
|
|
|
1084
1084
|
});
|
|
1085
1085
|
|
|
1086
1086
|
const ToggleAudioPreviewButton = (props) => {
|
|
1087
|
-
const { caption,
|
|
1087
|
+
const { caption, onMenuToggle, ...restCompositeButtonProps } = props;
|
|
1088
1088
|
const { t } = videoReactBindings.useI18n();
|
|
1089
1089
|
const { useMicrophoneState } = videoReactBindings.useCallStateHooks();
|
|
1090
1090
|
const { microphone, optimisticIsMute, hasBrowserPermission } = useMicrophoneState();
|
|
@@ -1094,11 +1094,14 @@ const ToggleAudioPreviewButton = (props) => {
|
|
|
1094
1094
|
? t('Check your browser audio permissions')
|
|
1095
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
|
|
1096
1096
|
? 'preview-audio-unmute-button'
|
|
1097
|
-
: 'preview-audio-mute-button', onClick: handleClick,
|
|
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: "!" }))] }) }));
|
|
1098
1101
|
};
|
|
1099
1102
|
const ToggleAudioPublishingButton = (props) => {
|
|
1100
1103
|
const { t } = videoReactBindings.useI18n();
|
|
1101
|
-
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;
|
|
1102
1105
|
const { hasPermission, requestPermission, isAwaitingPermission } = useRequestPermission(videoClient.OwnCapability.SEND_AUDIO);
|
|
1103
1106
|
const { useMicrophoneState } = videoReactBindings.useCallStateHooks();
|
|
1104
1107
|
const { microphone, optimisticIsMute, hasBrowserPermission } = useMicrophoneState();
|
|
@@ -1115,11 +1118,14 @@ const ToggleAudioPublishingButton = (props) => {
|
|
|
1115
1118
|
? t('You have no permission to share your audio')
|
|
1116
1119
|
: !hasBrowserPermission
|
|
1117
1120
|
? t('Check your browser mic permissions')
|
|
1118
|
-
: 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,
|
|
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: "!" }))] }) }) }) }));
|
|
1119
1125
|
};
|
|
1120
1126
|
|
|
1121
1127
|
const ToggleVideoPreviewButton = (props) => {
|
|
1122
|
-
const { caption, Menu = DeviceSelectorVideo, menuPlacement = 'top', ...restCompositeButtonProps } = props;
|
|
1128
|
+
const { caption, Menu = DeviceSelectorVideo, menuPlacement = 'top', onMenuToggle, ...restCompositeButtonProps } = props;
|
|
1123
1129
|
const { t } = videoReactBindings.useI18n();
|
|
1124
1130
|
const { useCameraState } = videoReactBindings.useCallStateHooks();
|
|
1125
1131
|
const { camera, optimisticIsMute, hasBrowserPermission } = useCameraState();
|
|
@@ -1129,11 +1135,14 @@ const ToggleVideoPreviewButton = (props) => {
|
|
|
1129
1135
|
? t('Check your browser video permissions')
|
|
1130
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
|
|
1131
1137
|
? 'preview-video-unmute-button'
|
|
1132
|
-
: 'preview-video-mute-button', onClick: handleClick, disabled: !hasBrowserPermission, Menu: Menu, menuPlacement: menuPlacement,
|
|
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: "!" }))] }) }));
|
|
1133
1142
|
};
|
|
1134
1143
|
const ToggleVideoPublishingButton = (props) => {
|
|
1135
1144
|
const { t } = videoReactBindings.useI18n();
|
|
1136
|
-
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;
|
|
1137
1146
|
const { hasPermission, requestPermission, isAwaitingPermission } = useRequestPermission(videoClient.OwnCapability.SEND_VIDEO);
|
|
1138
1147
|
const { useCameraState, useCallSettings } = videoReactBindings.useCallStateHooks();
|
|
1139
1148
|
const { camera, optimisticIsMute, hasBrowserPermission } = useCameraState();
|
|
@@ -1156,7 +1165,10 @@ const ToggleVideoPublishingButton = (props) => {
|
|
|
1156
1165
|
? t('Video publishing is disabled by the system')
|
|
1157
1166
|
: caption || t('Video'), tooltipDisabled: tooltipDisabled, children: jsxRuntime.jsxs(CompositeButton, { active: optimisticIsMute, caption: caption, variant: "secondary", disabled: !hasBrowserPermission ||
|
|
1158
1167
|
!hasPermission ||
|
|
1159
|
-
!isPublishingVideoAllowed, "data-testid": optimisticIsMute ? 'video-unmute-button' : 'video-mute-button', onClick: handleClick, Menu: Menu, menuPlacement: menuPlacement, menuOffset: 16, onMenuToggle: (shown) =>
|
|
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 ||
|
|
1160
1172
|
!hasPermission ||
|
|
1161
1173
|
!isPublishingVideoAllowed) && (jsxRuntime.jsx("span", { className: "str-video__no-media-permission", children: "!" }))] }) }) }) }));
|
|
1162
1174
|
};
|
|
@@ -2600,7 +2612,7 @@ const LivestreamPlayer = (props) => {
|
|
|
2600
2612
|
return (jsxRuntime.jsx(StreamCall, { call: call, children: jsxRuntime.jsx(LivestreamLayout, { ...layoutProps }) }));
|
|
2601
2613
|
};
|
|
2602
2614
|
|
|
2603
|
-
const [major, minor, patch] = ("1.2.
|
|
2615
|
+
const [major, minor, patch] = ("1.2.6" ).split('.');
|
|
2604
2616
|
videoClient.setSdkInfo({
|
|
2605
2617
|
type: videoClient.SfuModels.SdkType.REACT,
|
|
2606
2618
|
major,
|