@stream-io/video-react-sdk 1.40.1 → 1.41.0
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 +27 -0
- package/dist/background-filters-D2U5UBbH.es.js.map +1 -1
- package/dist/background-filters-folwWrgs.cjs.js.map +1 -1
- package/dist/embedded-BackgroundFilters-D2U5UBbH.es.js.map +1 -1
- package/dist/embedded-BackgroundFilters-folwWrgs.cjs.js.map +1 -1
- package/dist/embedded.cjs.js +27 -26
- package/dist/embedded.cjs.js.map +1 -1
- package/dist/embedded.es.js +28 -27
- package/dist/embedded.es.js.map +1 -1
- package/dist/index.cjs.js +26 -25
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +27 -26
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/Avatar/Avatar.d.ts +2 -2
- package/dist/src/components/BackgroundFilters/BackgroundFilters.d.ts +1 -1
- package/dist/src/components/BackgroundFilters/BackgroundFiltersProvider.d.ts +1 -1
- package/dist/src/components/Button/TextButton.d.ts +1 -1
- package/dist/src/components/CallControls/AcceptCallButton.d.ts +1 -1
- package/dist/src/components/CallControls/CallControls.d.ts +1 -1
- package/dist/src/components/CallControls/CallStatsButton.d.ts +1 -1
- package/dist/src/components/CallControls/CancelCallButton.d.ts +2 -2
- package/dist/src/components/CallControls/ReactionsButton.d.ts +2 -2
- package/dist/src/components/CallControls/RecordCallButton.d.ts +2 -2
- package/dist/src/components/CallControls/ScreenShareButton.d.ts +1 -1
- package/dist/src/components/CallControls/ToggleAudioButton.d.ts +2 -2
- package/dist/src/components/CallControls/ToggleAudioOutputButton.d.ts +1 -1
- package/dist/src/components/CallControls/ToggleVideoButton.d.ts +2 -2
- package/dist/src/components/CallParticipantsList/BlockedUserListing.d.ts +1 -1
- package/dist/src/components/CallParticipantsList/CallParticipantListHeader.d.ts +1 -1
- package/dist/src/components/CallParticipantsList/CallParticipantListing.d.ts +1 -1
- package/dist/src/components/CallParticipantsList/CallParticipantListingItem.d.ts +1 -1
- package/dist/src/components/CallParticipantsList/CallParticipantsList.d.ts +1 -1
- package/dist/src/components/CallParticipantsList/EmptyParticipantSearchList.d.ts +1 -1
- package/dist/src/components/CallPreview/CallPreview.d.ts +1 -1
- package/dist/src/components/CallRecordingList/CallRecordingList.d.ts +1 -1
- package/dist/src/components/CallRecordingList/CallRecordingListHeader.d.ts +1 -1
- package/dist/src/components/CallRecordingList/CallRecordingListItem.d.ts +1 -1
- package/dist/src/components/CallRecordingList/EmptyCallRecordingListing.d.ts +1 -1
- package/dist/src/components/CallRecordingList/LoadingCallRecordingListing.d.ts +1 -1
- package/dist/src/components/CallStats/CallStats.d.ts +2 -2
- package/dist/src/components/CallStats/CallStatsLatencyChart.d.ts +1 -1
- package/dist/src/components/DeviceSettings/AudioVolumeIndicator.d.ts +1 -1
- package/dist/src/components/DeviceSettings/DeviceAudioPreviewItem.d.ts +1 -1
- package/dist/src/components/DeviceSettings/DeviceSelector.d.ts +1 -1
- package/dist/src/components/DeviceSettings/DeviceSelectorAudio.d.ts +2 -2
- package/dist/src/components/DeviceSettings/DeviceSelectorVideo.d.ts +1 -1
- package/dist/src/components/DeviceSettings/DeviceSettings.d.ts +1 -1
- package/dist/src/components/DeviceSettings/DeviceVideoPreviewItem.d.ts +1 -1
- package/dist/src/components/DeviceSettings/SpeakerTest.d.ts +1 -1
- package/dist/src/components/DropdownSelect/DropdownSelect.d.ts +2 -2
- package/dist/src/components/Icon/Icon.d.ts +1 -1
- package/dist/src/components/LoadingIndicator/LoadingIndicator.d.ts +1 -1
- package/dist/src/components/Menu/GenericMenu.d.ts +2 -2
- package/dist/src/components/Menu/MenuToggle.d.ts +1 -1
- package/dist/src/components/NoiseCancellation/NoiseCancellationProvider.d.ts +1 -1
- package/dist/src/components/Notification/MicCaptureErrorNotification.d.ts +1 -1
- package/dist/src/components/Notification/Notification.d.ts +1 -1
- package/dist/src/components/Notification/PermissionNotification.d.ts +1 -1
- package/dist/src/components/Notification/RecordingInProgressNotification.d.ts +1 -1
- package/dist/src/components/Notification/SpeakingWhileMutedNotification.d.ts +1 -1
- package/dist/src/components/Permissions/PermissionRequests.d.ts +1 -1
- package/dist/src/components/Reaction/Reaction.d.ts +1 -1
- package/dist/src/components/RingingCall/RingingCall.d.ts +1 -1
- package/dist/src/components/RingingCall/RingingCallControls.d.ts +1 -1
- package/dist/src/components/Search/SearchInput.d.ts +1 -1
- package/dist/src/components/Search/SearchResults.d.ts +1 -1
- package/dist/src/components/StreamTheme/StreamTheme.d.ts +1 -1
- package/dist/src/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/src/components/Tooltip/WithTooltip.d.ts +1 -1
- package/dist/src/components/VideoPreview/VideoPreview.d.ts +1 -1
- package/dist/src/core/components/Audio/Audio.d.ts +1 -1
- package/dist/src/core/components/Audio/ParticipantsAudio.d.ts +1 -1
- package/dist/src/core/components/CallLayout/LivestreamLayout.d.ts +2 -2
- package/dist/src/core/components/CallLayout/PaginatedGridLayout.d.ts +1 -1
- package/dist/src/core/components/CallLayout/PipLayout/Grid.d.ts +1 -1
- package/dist/src/core/components/CallLayout/PipLayout/Host.d.ts +1 -1
- package/dist/src/core/components/CallLayout/PipLayout/Pip.d.ts +1 -1
- package/dist/src/core/components/CallLayout/PipLayout/index.d.ts +3 -3
- package/dist/src/core/components/CallLayout/SpeakerLayout.d.ts +1 -1
- package/dist/src/core/components/ParticipantView/DefaultParticipantViewUI.d.ts +5 -5
- package/dist/src/core/components/ParticipantView/ParticipantActionsContextMenu.d.ts +1 -1
- package/dist/src/core/components/StreamVideo/StreamVideo.d.ts +1 -1
- package/dist/src/core/components/Video/Video.d.ts +1 -1
- package/dist/src/embedded/EmbeddedClientProvider.d.ts +1 -1
- package/dist/src/embedded/call/CallControls.d.ts +1 -1
- package/dist/src/embedded/call/CallHeader.d.ts +1 -1
- package/dist/src/embedded/call/CallLayout.d.ts +1 -1
- package/dist/src/embedded/call/CallStateRouter.d.ts +1 -1
- package/dist/src/embedded/call/EmbeddedCall.d.ts +1 -1
- package/dist/src/embedded/context/ConfigurationContext.d.ts +1 -1
- package/dist/src/embedded/livestream/EmbeddedLivestream.d.ts +1 -1
- package/dist/src/embedded/livestream/LivestreamUI.d.ts +1 -1
- package/dist/src/embedded/livestream/host/HostLayout.d.ts +1 -1
- package/dist/src/embedded/livestream/host/HostStateRouter.d.ts +1 -1
- package/dist/src/embedded/livestream/viewer/ViewerLayout.d.ts +1 -1
- package/dist/src/embedded/livestream/viewer/ViewerLobby.d.ts +1 -1
- package/dist/src/embedded/livestream/viewer/ViewerStateRouter.d.ts +1 -1
- package/dist/src/embedded/shared/BlurToggleButton/BlurToggleButton.d.ts +2 -2
- package/dist/src/embedded/shared/CallFeedback/CallEndedScreen.d.ts +1 -1
- package/dist/src/embedded/shared/CallFeedback/CallFeedback.d.ts +1 -1
- package/dist/src/embedded/shared/CallFeedback/RatingScreen.d.ts +1 -1
- package/dist/src/embedded/shared/CallFeedback/StarRating.d.ts +1 -1
- package/dist/src/embedded/shared/CallFeedback/ThankYouScreen.d.ts +1 -1
- package/dist/src/embedded/shared/ConnectionNotification/ConnectionNotification.d.ts +1 -1
- package/dist/src/embedded/shared/EmbeddedParticipantViewUI/EmbeddedParticipantViewUI.d.ts +1 -1
- package/dist/src/embedded/shared/JoinError/JoinError.d.ts +1 -1
- package/dist/src/embedded/shared/Lobby/DeviceControls.d.ts +1 -1
- package/dist/src/embedded/shared/Lobby/DisabledDeviceButton.d.ts +1 -1
- package/dist/src/embedded/shared/Lobby/Lobby.d.ts +1 -1
- package/dist/src/embedded/shared/Lobby/ToggleCameraButton.d.ts +1 -1
- package/dist/src/embedded/shared/Lobby/ToggleMicButton.d.ts +1 -1
- package/dist/src/embedded/shared/Lobby/VideoPreviewFallbacks.d.ts +2 -2
- package/dist/src/embedded/shared/ViewersCount/ViewersCount.d.ts +1 -1
- package/dist/src/hooks/useRequestPermission.d.ts +2 -2
- package/dist/src/wrappers/LivestreamPlayer/LivestreamPlayer.d.ts +1 -1
- package/package.json +13 -13
- package/src/components/BackgroundFilters/BackgroundFilters.tsx +2 -4
- package/src/components/Button/CompositeButton.tsx +2 -2
- package/src/components/Button/IconButton.tsx +1 -1
- package/src/components/CallControls/CallStatsButton.tsx +1 -1
- package/src/components/CallControls/CancelCallButton.tsx +1 -1
- package/src/components/CallControls/ReactionsButton.tsx +1 -1
- package/src/components/CallControls/RecordCallButton.tsx +1 -1
- package/src/components/CallControls/ScreenShareButton.tsx +5 -2
- package/src/components/CallControls/ToggleAudioButton.tsx +6 -2
- package/src/components/CallControls/ToggleVideoButton.tsx +6 -2
- package/src/components/CallParticipantsList/CallParticipantListingItem.tsx +2 -2
- package/src/components/CallParticipantsList/CallParticipantsList.tsx +1 -1
- package/src/components/DeviceSettings/DeviceSettings.tsx +1 -1
- package/src/components/Permissions/PermissionRequests.tsx +1 -1
- package/src/core/components/Audio/Audio.tsx +1 -1
- package/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx +1 -1
- package/src/core/components/ParticipantView/ParticipantActionsContextMenu.tsx +16 -12
- package/src/core/components/ParticipantView/ParticipantView.tsx +124 -120
- package/src/core/components/Video/BaseVideo.tsx +1 -1
- package/src/core/components/Video/DefaultPictureInPicturePlaceholder.tsx +1 -1
- package/src/core/components/Video/DefaultVideoPlaceholder.tsx +1 -1
- package/src/embedded/shared/Lobby/ToggleCameraButton.tsx +1 -1
- package/src/embedded/shared/Lobby/ToggleMicButton.tsx +1 -1
- package/src/embedded/types.ts +1 -3
- package/src/hooks/useRequestPermission.ts +4 -2
package/dist/embedded.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { memo, useState, useEffect, Fragment as Fragment$1, createContext, useContext, useCallback, useMemo, useRef, isValidElement, forwardRef, useLayoutEffect, lazy, Suspense } from 'react';
|
|
3
3
|
import { useCall, useCallStateHooks, useI18n, Restricted, useToggleCallRecording, useConnectedUser, useEffectEvent, useIsAudioConnecting, useIsVideoConnecting, StreamCallProvider, StreamVideoProvider, useSpeakerLayoutSortPreset } from '@stream-io/video-react-bindings';
|
|
4
|
-
import { hasAudio, hasScreenShareAudio, hasVideo, hasScreenShare, OwnCapability, Browsers, VisibilityState, hasPausedTrack, createSoundDetector, SfuModels, isPinned, name, NoiseCancellationSettingsModeEnum, CallingState, paginatedLayoutSortPreset, CallTypes, defaultSortPreset, humanize, StreamVideoClient } from '@stream-io/video-client';
|
|
4
|
+
import { hasAudio, hasScreenShareAudio, hasVideo, hasScreenShare, OwnCapability, Browsers, VisibilityState, hasPausedTrack, RequestPermissionRequestPermissionsEnum, createSoundDetector, SfuModels, isPinned, name, NoiseCancellationSettingsModeEnum, CallingState, paginatedLayoutSortPreset, CallTypes, defaultSortPreset, humanize, StreamVideoClient } from '@stream-io/video-client';
|
|
5
5
|
import { useFloating, offset, shift, flip, size, autoUpdate, FloatingOverlay, FloatingPortal, arrow, FloatingArrow, useListItem, useListNavigation, useTypeahead, useClick, useDismiss, useRole, useInteractions, FloatingFocusManager, FloatingList } from '@floating-ui/react';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
|
|
8
|
-
const Audio = memo(function
|
|
8
|
+
const Audio = memo(function AudioRender({ participant, trackType = 'audioTrack', ...rest }) {
|
|
9
9
|
const call = useCall();
|
|
10
10
|
const [audioElement, setAudioElement] = useState(null);
|
|
11
11
|
const { userId, sessionId } = participant;
|
|
@@ -533,7 +533,7 @@ const normalizeString = (value) => value
|
|
|
533
533
|
* @description Extends video element with `stream` property
|
|
534
534
|
* (`srcObject`) to reactively handle stream changes
|
|
535
535
|
*/
|
|
536
|
-
const BaseVideo = forwardRef(function
|
|
536
|
+
const BaseVideo = forwardRef(function BaseVideoRender({ stream, ...rest }, ref) {
|
|
537
537
|
const [videoElement, setVideoElement] = useState(null);
|
|
538
538
|
useEffect(() => {
|
|
539
539
|
if (!videoElement || !stream)
|
|
@@ -579,12 +579,12 @@ const InitialsFallback = (props) => {
|
|
|
579
579
|
return (jsx("div", { className: "str-video__video-placeholder__initials-fallback", children: initials }));
|
|
580
580
|
};
|
|
581
581
|
|
|
582
|
-
const DefaultVideoPlaceholder = forwardRef(function
|
|
582
|
+
const DefaultVideoPlaceholder = forwardRef(function DefaultVideoPlaceholderRender(props, ref) {
|
|
583
583
|
const { t } = useI18n();
|
|
584
584
|
return (jsx(BaseVideoPlaceholder, { ref: ref, ...props, children: t('Video is disabled') }));
|
|
585
585
|
});
|
|
586
586
|
|
|
587
|
-
const DefaultPictureInPicturePlaceholder = forwardRef(function
|
|
587
|
+
const DefaultPictureInPicturePlaceholder = forwardRef(function DefaultPictureInPicturePlaceholderRender(props, ref) {
|
|
588
588
|
const { t } = useI18n();
|
|
589
589
|
return (jsx(BaseVideoPlaceholder, { ref: ref, ...props, children: t('Video is playing in a popup') }));
|
|
590
590
|
});
|
|
@@ -711,7 +711,7 @@ const BackgroundFiltersProvider = (props) => {
|
|
|
711
711
|
return (jsx(Suspense, { fallback: SuspenseFallback, children: jsx(BackgroundFiltersProviderImpl, { ...filterProps, ContextProvider: BackgroundFiltersContext }) }));
|
|
712
712
|
};
|
|
713
713
|
|
|
714
|
-
const IconButton = forwardRef(function
|
|
714
|
+
const IconButton = forwardRef(function IconButtonRender(props, ref) {
|
|
715
715
|
const { icon, enabled, variant, onClick, className, ...rest } = props;
|
|
716
716
|
return (jsx("button", { className: clsx('str-video__call-controls__button', className, {
|
|
717
717
|
[`str-video__call-controls__button--variant-${variant}`]: variant,
|
|
@@ -722,7 +722,7 @@ const IconButton = forwardRef(function IconButton(props, ref) {
|
|
|
722
722
|
}, ref: ref, ...rest, children: jsx(Icon, { icon: icon }) }));
|
|
723
723
|
});
|
|
724
724
|
|
|
725
|
-
const CompositeButton = forwardRef(function
|
|
725
|
+
const CompositeButton = forwardRef(function CompositeButtonRender({ disabled, caption, children, className, active, Menu, menuPlacement, menuOffset, title, ToggleMenuButton = DefaultToggleMenuButton, variant, onClick, onMenuToggle, ...restButtonProps }, ref) {
|
|
726
726
|
return (jsxs("div", { className: clsx('str-video__composite-button', className, {
|
|
727
727
|
'str-video__composite-button--caption': caption,
|
|
728
728
|
'str-video__composite-button--menu': Menu,
|
|
@@ -736,7 +736,7 @@ const CompositeButton = forwardRef(function CompositeButton({ disabled, caption,
|
|
|
736
736
|
onClick?.(e);
|
|
737
737
|
}, disabled: disabled, ...restButtonProps, children: children }), Menu && (jsx(MenuToggle, { offset: menuOffset, placement: menuPlacement, ToggleButton: ToggleMenuButton, onToggle: onMenuToggle, children: isComponentType(Menu) ? jsx(Menu, {}) : Menu }))] }), caption && (jsx("div", { className: "str-video__composite-button__caption", children: caption }))] }));
|
|
738
738
|
});
|
|
739
|
-
const DefaultToggleMenuButton = forwardRef(function
|
|
739
|
+
const DefaultToggleMenuButton = forwardRef(function DefaultToggleMenuButtonRender({ menuShown }, ref) {
|
|
740
740
|
return (jsx(IconButton, { className: clsx('str-video__menu-toggle-button', {
|
|
741
741
|
'str-video__menu-toggle-button--active': menuShown,
|
|
742
742
|
}), icon: menuShown ? 'caret-down' : 'caret-up', ref: ref }));
|
|
@@ -895,7 +895,7 @@ const RecordEndConfirmation = (props) => {
|
|
|
895
895
|
const handleClick = createCallControlHandler(props, toggleCallRecording);
|
|
896
896
|
return (jsxs("div", { className: "str-video__end-recording__confirmation", children: [jsxs("div", { className: "str-video__end-recording__header", children: [jsx(Icon, { icon: "recording-on" }), jsx("h2", { className: "str-video__end-recording__heading", children: t('End recording') })] }), jsx("p", { className: "str-video__end-recording__description", children: t('Are you sure you want end the recording?') }), jsxs("div", { className: "str-video__end-recording__actions", children: [jsx(CompositeButton, { variant: "secondary", onClick: close, children: t('Cancel') }), jsx(CompositeButton, { variant: "primary", onClick: isAwaitingResponse ? undefined : handleClick, children: isAwaitingResponse ? jsx(LoadingIndicator, {}) : t('End recording') })] })] }));
|
|
897
897
|
};
|
|
898
|
-
const ToggleEndRecordingMenuButton = forwardRef(function
|
|
898
|
+
const ToggleEndRecordingMenuButton = forwardRef(function ToggleEndRecordingMenuButtonRender(props, ref) {
|
|
899
899
|
return (jsx(CompositeButton, { ref: ref, active: true, variant: "secondary", "data-testid": "recording-stop-button", children: jsx(Icon, { icon: "recording-off" }) }));
|
|
900
900
|
});
|
|
901
901
|
const RecordCallConfirmationButton = (props) => {
|
|
@@ -974,7 +974,7 @@ const defaultReactions = [
|
|
|
974
974
|
const ReactionsButton = ({ reactions = defaultReactions, }) => {
|
|
975
975
|
return (jsx(Restricted, { requiredGrants: [OwnCapability.CREATE_REACTION], children: jsx(MenuToggle, { placement: "top", ToggleButton: ToggleReactionsMenuButton, visualType: MenuVisualType.MENU, children: jsx(DefaultReactionsMenu, { reactions: reactions }) }) }));
|
|
976
976
|
};
|
|
977
|
-
const ToggleReactionsMenuButton = forwardRef(function
|
|
977
|
+
const ToggleReactionsMenuButton = forwardRef(function ToggleReactionsMenuButtonRender({ menuShown }, ref) {
|
|
978
978
|
const { t } = useI18n();
|
|
979
979
|
return (jsx(WithTooltip, { title: t('Reactions'), tooltipDisabled: menuShown, children: jsx(CompositeButton, { ref: ref, active: menuShown, variant: "primary", children: jsx(Icon, { icon: "reactions" }) }) }));
|
|
980
980
|
});
|
|
@@ -995,7 +995,7 @@ const ScreenShareButton = (props) => {
|
|
|
995
995
|
const { caption, optimisticUpdates } = props;
|
|
996
996
|
const { useHasOngoingScreenShare, useScreenShareState, useCallSettings } = useCallStateHooks();
|
|
997
997
|
const isSomeoneScreenSharing = useHasOngoingScreenShare();
|
|
998
|
-
const { hasPermission, requestPermission, isAwaitingPermission } = useRequestPermission(
|
|
998
|
+
const { hasPermission, requestPermission, isAwaitingPermission } = useRequestPermission(RequestPermissionRequestPermissionsEnum.SCREENSHARE);
|
|
999
999
|
const callSettings = useCallSettings();
|
|
1000
1000
|
const isScreenSharingAllowed = callSettings?.screensharing.enabled;
|
|
1001
1001
|
const { screenShare, optionsAwareIsMute, isTogglePending } = useScreenShareState({
|
|
@@ -1208,7 +1208,7 @@ const SpeakerTest = (props) => {
|
|
|
1208
1208
|
const audioElementRef = useRef(null);
|
|
1209
1209
|
const [isPlaying, setIsPlaying] = useState(false);
|
|
1210
1210
|
const { t } = useI18n();
|
|
1211
|
-
const { audioUrl = `https://unpkg.com/${"@stream-io/video-react-sdk"}@${"1.
|
|
1211
|
+
const { audioUrl = `https://unpkg.com/${"@stream-io/video-react-sdk"}@${"1.41.0"}/assets/piano.mp3`, } = props;
|
|
1212
1212
|
// Update audio output device when selection changes
|
|
1213
1213
|
useEffect(() => {
|
|
1214
1214
|
const audio = audioElementRef.current;
|
|
@@ -1307,7 +1307,7 @@ const DeviceSelectorVideo = ({ title, visualType, }) => {
|
|
|
1307
1307
|
}, title: title, visualType: visualType, icon: "camera", PreviewItem: DeviceVideoPreviewItem }));
|
|
1308
1308
|
};
|
|
1309
1309
|
|
|
1310
|
-
forwardRef(function
|
|
1310
|
+
forwardRef(function ToggleDeviceSettingsMenuButtonRender({ menuShown }, ref) {
|
|
1311
1311
|
const { t } = useI18n();
|
|
1312
1312
|
return (jsx(IconButton, { className: clsx('str-video__device-settings__button', {
|
|
1313
1313
|
'str-video__device-settings__button--active': menuShown,
|
|
@@ -1337,7 +1337,7 @@ const ToggleAudioPreviewButton = (props) => {
|
|
|
1337
1337
|
const ToggleAudioPublishingButton = (props) => {
|
|
1338
1338
|
const { t } = useI18n();
|
|
1339
1339
|
const { caption, Menu = jsx(DeviceSelectorAudioInput, { visualType: "list" }), menuPlacement = 'top', onMenuToggle, optimisticUpdates, ...restCompositeButtonProps } = props;
|
|
1340
|
-
const { hasPermission, requestPermission, isAwaitingPermission } = useRequestPermission(
|
|
1340
|
+
const { hasPermission, requestPermission, isAwaitingPermission } = useRequestPermission(RequestPermissionRequestPermissionsEnum.SEND_AUDIO);
|
|
1341
1341
|
const { useMicrophoneState, useLocalParticipant } = useCallStateHooks();
|
|
1342
1342
|
const { microphone, hasBrowserPermission, isPromptingPermission, isTogglePending, optionsAwareIsMute, } = useMicrophoneState({ optimisticUpdates });
|
|
1343
1343
|
const localParticipant = useLocalParticipant();
|
|
@@ -1389,7 +1389,7 @@ const ToggleVideoPreviewButton = (props) => {
|
|
|
1389
1389
|
const ToggleVideoPublishingButton = (props) => {
|
|
1390
1390
|
const { t } = useI18n();
|
|
1391
1391
|
const { caption, Menu = jsx(DeviceSelectorVideo, { visualType: "list" }), menuPlacement = 'top', onMenuToggle, optimisticUpdates, ...restCompositeButtonProps } = props;
|
|
1392
|
-
const { hasPermission, requestPermission, isAwaitingPermission } = useRequestPermission(
|
|
1392
|
+
const { hasPermission, requestPermission, isAwaitingPermission } = useRequestPermission(RequestPermissionRequestPermissionsEnum.SEND_VIDEO);
|
|
1393
1393
|
const { useCameraState, useCallSettings, useLocalParticipant } = useCallStateHooks();
|
|
1394
1394
|
const { camera, optionsAwareIsMute, hasBrowserPermission, isPromptingPermission, isTogglePending, } = useCameraState({ optimisticUpdates });
|
|
1395
1395
|
const localParticipant = useLocalParticipant();
|
|
@@ -1432,7 +1432,7 @@ const EndCallMenu = (props) => {
|
|
|
1432
1432
|
const { t } = useI18n();
|
|
1433
1433
|
return (jsxs("div", { className: "str-video__end-call__confirmation", children: [jsxs("button", { className: "str-video__button str-video__end-call__leave", type: "button", "data-testid": "leave-call-button", onClick: onLeave, children: [jsx(Icon, { className: "str-video__button__icon str-video__end-call__leave-icon", icon: "logout" }), t('Leave call')] }), jsx(Restricted, { requiredGrants: [OwnCapability.END_CALL], children: jsxs("button", { className: "str-video__button str-video__end-call__end", type: "button", "data-testid": "end-call-for-all-button", onClick: onEnd, children: [jsx(Icon, { className: "str-video__button__icon str-video__end-call__end-icon", icon: "call-end" }), t('End call for all')] }) })] }));
|
|
1434
1434
|
};
|
|
1435
|
-
const CancelCallToggleMenuButton = forwardRef(function
|
|
1435
|
+
const CancelCallToggleMenuButton = forwardRef(function CancelCallToggleMenuButtonRender({ menuShown }, ref) {
|
|
1436
1436
|
const { t } = useI18n();
|
|
1437
1437
|
return (jsx(WithTooltip, { title: t('Leave call'), tooltipDisabled: menuShown, children: jsx(IconButton, { icon: menuShown ? 'close' : 'call-end', variant: menuShown ? 'active' : 'danger', "data-testid": "leave-call-button", ref: ref }) }));
|
|
1438
1438
|
});
|
|
@@ -1479,7 +1479,7 @@ var Status;
|
|
|
1479
1479
|
Status["BAD"] = "Bad";
|
|
1480
1480
|
})(Status || (Status = {}));
|
|
1481
1481
|
|
|
1482
|
-
forwardRef(function
|
|
1482
|
+
forwardRef(function ToggleMenuButtonRender(props, ref) {
|
|
1483
1483
|
const { t } = useI18n();
|
|
1484
1484
|
const { caption, menuShown } = props;
|
|
1485
1485
|
return (jsx(CompositeButton, { ref: ref, active: menuShown, caption: caption, title: caption || t('Statistics'), "data-testid": "stats-button", children: jsx(Icon, { icon: "stats" }) }));
|
|
@@ -1507,7 +1507,7 @@ const CallParticipantListHeader = ({ onClose, }) => {
|
|
|
1507
1507
|
return (jsxs("div", { className: "str-video__participant-list-header", children: [jsxs("div", { className: "str-video__participant-list-header__title", children: [t('Participants'), ' ', jsxs("span", { className: "str-video__participant-list-header__title-count", children: ["[", participants.length, "]"] }), anonymousParticipantCount > 0 && (jsx("span", { className: "str-video__participant-list-header__title-anonymous", children: t('Anonymous', { count: anonymousParticipantCount }) }))] }), jsx(IconButton, { onClick: onClose, className: "str-video__participant-list-header__close-button", icon: "close" })] }));
|
|
1508
1508
|
};
|
|
1509
1509
|
|
|
1510
|
-
const CallParticipantListingItem = memo(function
|
|
1510
|
+
const CallParticipantListingItem = memo(function CallParticipantListingItemRender({ participant, DisplayName = DefaultDisplayName, }) {
|
|
1511
1511
|
const isAudioOn = hasAudio(participant);
|
|
1512
1512
|
const isVideoOn = hasVideo(participant);
|
|
1513
1513
|
const isPinnedOn = isPinned(participant);
|
|
@@ -1533,7 +1533,7 @@ const DefaultDisplayName = ({ participant }) => {
|
|
|
1533
1533
|
}
|
|
1534
1534
|
return (jsx(WithTooltip, { className: "str-video__participant-listing-item__display-name", title: displayName, children: displayName }));
|
|
1535
1535
|
};
|
|
1536
|
-
const ToggleButton$2 = forwardRef(function
|
|
1536
|
+
const ToggleButton$2 = forwardRef(function ToggleButtonRender(props, ref) {
|
|
1537
1537
|
return jsx(IconButton, { enabled: props.menuShown, icon: "ellipsis", ref: ref });
|
|
1538
1538
|
});
|
|
1539
1539
|
|
|
@@ -1664,7 +1664,7 @@ const BlockedUsersSearchResults = ({ blockedUsersSearchFn: blockedUsersSearchFnF
|
|
|
1664
1664
|
});
|
|
1665
1665
|
return (jsx(SearchResults, { EmptySearchResultComponent: EmptyParticipantSearchList, LoadingIndicator: LoadingIndicator, searchQueryInProgress: searchQueryInProgress, searchResults: searchQuery ? searchResults : blockedUsers, SearchResultList: BlockedUserListing }));
|
|
1666
1666
|
};
|
|
1667
|
-
const ToggleButton$1 = forwardRef(function
|
|
1667
|
+
const ToggleButton$1 = forwardRef(function ToggleButtonRender(props, ref) {
|
|
1668
1668
|
return jsx(IconButton, { enabled: props.menuShown, icon: "filter", ref: ref });
|
|
1669
1669
|
});
|
|
1670
1670
|
|
|
@@ -1817,7 +1817,7 @@ const PermissionRequests = () => {
|
|
|
1817
1817
|
overflowY: 'auto',
|
|
1818
1818
|
}, permissionRequests: permissionRequests, handleUpdatePermission: handleUpdatePermission }))] }));
|
|
1819
1819
|
};
|
|
1820
|
-
const PermissionRequestList = forwardRef(function
|
|
1820
|
+
const PermissionRequestList = forwardRef(function PermissionRequestListRender(props, ref) {
|
|
1821
1821
|
const { permissionRequests, handleUpdatePermission, ...rest } = props;
|
|
1822
1822
|
const { t } = useI18n();
|
|
1823
1823
|
return (jsx("div", { className: "str-video__permission-requests-list", ref: ref, ...rest, children: permissionRequests.map((request, reqIndex) => {
|
|
@@ -1881,7 +1881,7 @@ const VideoPreview = ({ className, mirror = true, DisabledVideoPreview = Default
|
|
|
1881
1881
|
return (jsx("div", { className: clsx('str-video__video-preview-container', className), children: contents }));
|
|
1882
1882
|
};
|
|
1883
1883
|
|
|
1884
|
-
const ToggleButton = forwardRef(function
|
|
1884
|
+
const ToggleButton = forwardRef(function ToggleButtonRender(props, ref) {
|
|
1885
1885
|
return jsx(IconButton, { enabled: props.menuShown, icon: "ellipsis", ref: ref });
|
|
1886
1886
|
});
|
|
1887
1887
|
const DefaultScreenShareOverlay = () => {
|
|
@@ -1941,14 +1941,14 @@ const SpeechIndicator = () => {
|
|
|
1941
1941
|
return (jsxs("span", { className: clsx('str-video__speech-indicator', isSpeaking && 'str-video__speech-indicator--speaking', isDominantSpeaker && 'str-video__speech-indicator--dominant'), children: [jsx("span", { className: "str-video__speech-indicator__bar" }), jsx("span", { className: "str-video__speech-indicator__bar" }), jsx("span", { className: "str-video__speech-indicator__bar" })] }));
|
|
1942
1942
|
};
|
|
1943
1943
|
|
|
1944
|
-
const ParticipantView = memo(forwardRef(function
|
|
1944
|
+
const ParticipantView = memo(forwardRef(function ParticipantViewRender({ participant, trackType = 'videoTrack', mirror, muteAudio, refs: { setVideoElement, setVideoPlaceholderElement } = {}, className, VideoPlaceholder, PictureInPicturePlaceholder, ParticipantViewUI = DefaultParticipantViewUI, }, ref) {
|
|
1945
1945
|
const { isLocalParticipant, isSpeaking, isDominantSpeaker, sessionId } = participant;
|
|
1946
1946
|
const hasAudioTrack = hasAudio(participant);
|
|
1947
1947
|
const hasVideoTrack = hasVideo(participant);
|
|
1948
1948
|
const hasScreenShareAudioTrack = hasScreenShareAudio(participant);
|
|
1949
1949
|
const [trackedElement, setTrackedElement] = useState(null);
|
|
1950
1950
|
const [contextVideoElement, setContextVideoElement] = useState(null);
|
|
1951
|
-
const [contextVideoPlaceholderElement, setContextVideoPlaceholderElement] = useState(null);
|
|
1951
|
+
const [contextVideoPlaceholderElement, setContextVideoPlaceholderElement,] = useState(null);
|
|
1952
1952
|
useTrackElementVisibility({
|
|
1953
1953
|
sessionId,
|
|
1954
1954
|
trackedElement,
|
|
@@ -1982,7 +1982,8 @@ const ParticipantView = memo(forwardRef(function ParticipantView({ participant,
|
|
|
1982
1982
|
return (jsx("div", { "data-testid": "participant-view", ref: (element) => {
|
|
1983
1983
|
applyElementToRef(ref, element);
|
|
1984
1984
|
setTrackedElement(element);
|
|
1985
|
-
}, className: clsx('str-video__participant-view', isDominantSpeaker &&
|
|
1985
|
+
}, className: clsx('str-video__participant-view', isDominantSpeaker &&
|
|
1986
|
+
'str-video__participant-view--dominant-speaker', isSpeaking && 'str-video__participant-view--speaking', !hasVideoTrack && 'str-video__participant-view--no-video', !hasAudioTrack && 'str-video__participant-view--no-audio', className), children: jsxs(ParticipantViewContext.Provider, { value: participantViewContextValue, children: [!isLocalParticipant && !muteAudio && (jsxs(Fragment, { children: [hasAudioTrack && (jsx(Audio, { participant: participant, trackType: "audioTrack" })), hasScreenShareAudioTrack && (jsx(Audio, { participant: participant, trackType: "screenShareAudioTrack" }))] })), jsx(Video$1, { VideoPlaceholder: VideoPlaceholder, PictureInPicturePlaceholder: PictureInPicturePlaceholder, participant: participant, trackType: trackType, refs: videoRefs, enabled: isLocalParticipant ||
|
|
1986
1987
|
trackType !== 'videoTrack' ||
|
|
1987
1988
|
isParticipantVideoEnabled(participant.sessionId), mirror: mirror, autoPlay: true }), isComponentType(ParticipantViewUI) ? (jsx(ParticipantViewUI, {})) : (ParticipantViewUI)] }) }));
|
|
1988
1989
|
}));
|
|
@@ -2865,7 +2866,7 @@ const JoinError = ({ onJoin }) => {
|
|
|
2865
2866
|
return (jsxs("div", { className: "str-video__embedded-join-error", children: [jsx("h2", { className: "str-video__embedded-join-error__title", children: t('Failed to join the call') }), jsx("p", { className: "str-video__embedded-join-error__message", children: t("We couldn't connect to the server. Please check your connection and try again.") }), jsxs("button", { type: "button", className: "str-video__button", onClick: onJoin, children: [jsx(Icon, { icon: "login" }), t('Try again')] })] }));
|
|
2866
2867
|
};
|
|
2867
2868
|
|
|
2868
|
-
const ToggleMenuButton$1 = forwardRef(function
|
|
2869
|
+
const ToggleMenuButton$1 = forwardRef(function ToggleMenuButtonRender(props, ref) {
|
|
2869
2870
|
const { useMicrophoneState } = useCallStateHooks();
|
|
2870
2871
|
const { selectedDevice: selectedMic, devices: microphones } = useMicrophoneState();
|
|
2871
2872
|
return (jsxs("button", { ref: ref, className: "str-video__embedded-lobby__device-button", children: [jsx(Icon, { className: "str-video__embedded-lobby__device-button-icon", icon: "mic" }), jsx("span", { className: "str-video__embedded-lobby__device-button-label", children: microphones?.find((m) => m.deviceId === selectedMic)
|
|
@@ -2876,7 +2877,7 @@ const ToggleMicButton = () => {
|
|
|
2876
2877
|
return (jsxs(MenuToggle, { placement: "top-start", ToggleButton: ToggleMenuButton$1, visualType: MenuVisualType.MENU, children: [jsx(DeviceSelectorAudioInput, { visualType: "list", title: t('Microphone') }), jsx(DeviceSelectorAudioOutput, { visualType: "list", title: t('Speaker') })] }));
|
|
2877
2878
|
};
|
|
2878
2879
|
|
|
2879
|
-
const ToggleMenuButton = forwardRef(function
|
|
2880
|
+
const ToggleMenuButton = forwardRef(function ToggleMenuButtonRender(props, ref) {
|
|
2880
2881
|
const { useCameraState } = useCallStateHooks();
|
|
2881
2882
|
const { selectedDevice: selectedCamera, devices: cameras } = useCameraState();
|
|
2882
2883
|
return (jsxs("button", { ref: ref, className: "str-video__embedded-lobby__device-button", children: [jsx(Icon, { className: "str-video__embedded-lobby__device-button-icon", icon: "camera" }), jsx("span", { className: "str-video__embedded-lobby__device-button-label", children: cameras?.find((c) => c.deviceId === selectedCamera)
|