@100mslive/roomkit-react 0.1.4 → 0.1.6-alpha.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/dist/{HLSView-CTAJQUU4.js → HLSView-PY2FKWX3.js} +191 -123
- package/dist/HLSView-PY2FKWX3.js.map +7 -0
- package/dist/Prebuilt/App.d.ts +3 -0
- package/dist/Prebuilt/AppContext.d.ts +13 -0
- package/dist/Prebuilt/common/PeersSorter.d.ts +21 -0
- package/dist/Prebuilt/components/Footer/Footer.d.ts +6 -0
- package/dist/Prebuilt/components/Header/Header.d.ts +2 -0
- package/dist/Prebuilt/components/InsetTile.d.ts +2 -0
- package/dist/Prebuilt/components/Leave/DesktopLeaveRoom.d.ts +7 -0
- package/dist/Prebuilt/components/Leave/EndSessionContent.d.ts +8 -0
- package/dist/Prebuilt/components/Leave/LeaveAtoms.d.ts +2196 -0
- package/dist/Prebuilt/components/Leave/LeaveCard.d.ts +12 -0
- package/dist/Prebuilt/components/Leave/LeaveRoom.d.ts +5 -0
- package/dist/Prebuilt/components/Leave/LeaveSessionContent.d.ts +6 -0
- package/dist/Prebuilt/components/Leave/MwebLeaveRoom.d.ts +7 -0
- package/dist/Prebuilt/components/MoreSettings/MoreSettings.d.ts +6 -0
- package/dist/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.d.ts +6 -0
- package/dist/Prebuilt/components/Pagination.d.ts +6 -0
- package/dist/Prebuilt/components/Preview/PreviewForm.d.ts +10 -0
- package/dist/Prebuilt/components/SecondaryTiles.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/EqualProminence.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/Grid.d.ts +5 -0
- package/dist/Prebuilt/components/VideoLayouts/GridLayout.d.ts +10 -0
- package/dist/Prebuilt/components/VideoLayouts/ProminenceLayout.d.ts +12 -0
- package/dist/Prebuilt/components/VideoLayouts/RoleProminence.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/ScreenshareLayout.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/interface.d.ts +8 -0
- package/dist/Prebuilt/components/hooks/useRoleProminencePeers.d.ts +5 -0
- package/dist/Prebuilt/components/hooks/useTileLayout.d.ts +12 -0
- package/dist/Prebuilt/components/hooks/useVideoTileLayout.d.ts +11 -0
- package/dist/Prebuilt/layouts/SidePane.d.ts +6 -0
- package/dist/Prebuilt/layouts/VideoStreamingSection.d.ts +6 -0
- package/dist/Prebuilt/plugins/whiteboard/ToggleWhiteboard.d.ts +5 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.d.ts +1 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.d.ts +1 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.d.ts +17 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/index.d.ts +6 -1
- package/dist/{VirtualBackground-GGGBJYVY.js → VirtualBackground-AYDHYLIZ.js} +5 -11
- package/dist/VirtualBackground-AYDHYLIZ.js.map +7 -0
- package/dist/{chunk-TJNDX446.js → chunk-E2M2ZSOL.js} +8 -5
- package/dist/chunk-E2M2ZSOL.js.map +7 -0
- package/dist/chunk-GQD2AGWW.js +888 -0
- package/dist/chunk-GQD2AGWW.js.map +7 -0
- package/dist/{chunk-L2SX7GBO.js → chunk-RXTHJUMZ.js} +2462 -4738
- package/dist/chunk-RXTHJUMZ.js.map +7 -0
- package/dist/conference-V2XZGTKU.js +5927 -0
- package/dist/conference-V2XZGTKU.js.map +7 -0
- package/dist/index.cjs.js +9414 -15534
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +2 -2
- package/dist/meta.cjs.json +2156 -3347
- package/dist/meta.esbuild.json +2601 -3885
- package/package.json +7 -7
- package/src/Button/Button.tsx +2 -2
- package/src/Prebuilt/App.tsx +49 -33
- package/src/Prebuilt/{AppContext.jsx → AppContext.tsx} +11 -3
- package/src/Prebuilt/IconButton.jsx +1 -0
- package/src/Prebuilt/Prebuilt.stories.tsx +1 -0
- package/src/Prebuilt/common/{PeersSorter.js → PeersSorter.ts} +15 -10
- package/src/Prebuilt/common/constants.js +3 -112
- package/src/Prebuilt/common/hooks.js +34 -1
- package/src/Prebuilt/common/utils.js +0 -8
- package/src/Prebuilt/components/AppData/AppData.jsx +3 -13
- package/src/Prebuilt/components/AppData/useUISettings.js +0 -4
- package/src/Prebuilt/components/AudioVideoToggle.jsx +6 -0
- package/src/Prebuilt/components/AuthToken.jsx +11 -42
- package/src/Prebuilt/components/Chat/Chat.jsx +57 -26
- package/src/Prebuilt/components/Chat/ChatBody.jsx +92 -32
- package/src/Prebuilt/components/Chat/ChatFooter.jsx +72 -48
- package/src/Prebuilt/components/Chat/ChatParticipantHeader.jsx +73 -0
- package/src/Prebuilt/components/Chat/ChatSelector.jsx +16 -17
- package/src/Prebuilt/components/Chat/ChatSelectorContainer.jsx +81 -0
- package/src/Prebuilt/components/Connection/TileConnection.jsx +30 -12
- package/src/Prebuilt/components/EmojiReaction.jsx +18 -17
- package/src/Prebuilt/components/Footer/ChatToggle.jsx +1 -7
- package/src/Prebuilt/components/Footer/Footer.tsx +89 -0
- package/src/Prebuilt/components/Footer/ParticipantList.jsx +213 -173
- package/src/Prebuilt/components/Footer/RoleAccordion.jsx +78 -0
- package/src/Prebuilt/components/HMSVideo/Controls.jsx +2 -2
- package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx +33 -10
- package/src/Prebuilt/components/HMSVideo/PlayButton.jsx +1 -1
- package/src/Prebuilt/components/HMSVideo/VideoTime.jsx +3 -3
- package/src/Prebuilt/components/HMSVideo/VolumeControl.jsx +38 -9
- package/src/Prebuilt/components/Header/{ConferencingHeader.jsx → Header.tsx} +9 -7
- package/src/Prebuilt/components/Header/HeaderComponents.jsx +13 -4
- package/src/Prebuilt/components/Header/StreamActions.jsx +33 -60
- package/src/Prebuilt/components/Header/index.tsx +1 -0
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +17 -3
- package/src/Prebuilt/components/InsetTile.tsx +122 -0
- package/src/Prebuilt/components/{MoreSettings/SplitComponents/DesktopLeaveRoom.jsx → Leave/DesktopLeaveRoom.tsx} +50 -18
- package/src/Prebuilt/components/{EndSessionContent.jsx → Leave/EndSessionContent.tsx} +19 -9
- package/src/Prebuilt/components/Leave/LeaveAtoms.tsx +26 -0
- package/src/Prebuilt/components/{LeaveCard.jsx → Leave/LeaveCard.tsx} +22 -3
- package/src/Prebuilt/components/Leave/LeaveRoom.tsx +63 -0
- package/src/Prebuilt/components/{LeaveSessionContent.jsx → Leave/LeaveSessionContent.tsx} +13 -5
- package/src/Prebuilt/components/{MoreSettings/SplitComponents/MwebLeaveRoom.jsx → Leave/MwebLeaveRoom.tsx} +38 -13
- package/src/Prebuilt/components/MetaActions.jsx +15 -23
- package/src/Prebuilt/components/MoreSettings/ActionTile.jsx +5 -0
- package/src/Prebuilt/components/MoreSettings/ChangeNameContent.jsx +12 -7
- package/src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx +1 -1
- package/src/Prebuilt/components/MoreSettings/FullScreenItem.jsx +1 -4
- package/src/Prebuilt/components/MoreSettings/MoreSettings.tsx +27 -0
- package/src/Prebuilt/components/MoreSettings/SplitComponents/{DesktopOptions.jsx → DesktopOptions.tsx} +86 -75
- package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.jsx +20 -19
- package/src/Prebuilt/components/Notifications/HLSFailureModal.jsx +3 -1
- package/src/Prebuilt/components/Notifications/Notifications.jsx +18 -11
- package/src/Prebuilt/components/Notifications/PeerNotifications.jsx +14 -2
- package/src/Prebuilt/components/Notifications/PermissionErrorModal.jsx +10 -4
- package/src/Prebuilt/components/PIP/PIPComponent.jsx +7 -16
- package/src/Prebuilt/components/PIP/PIPManager.js +1 -0
- package/src/Prebuilt/components/{Pagination.jsx → Pagination.tsx} +35 -6
- package/src/Prebuilt/components/Playlist/Playlist.jsx +1 -6
- package/src/Prebuilt/components/PostLeave.jsx +7 -7
- package/src/Prebuilt/components/Preview/PreviewContainer.jsx +5 -13
- package/src/Prebuilt/components/Preview/{PreviewForm.jsx → PreviewForm.tsx} +14 -4
- package/src/Prebuilt/components/Preview/PreviewJoin.jsx +9 -7
- package/src/Prebuilt/components/RaiseHand.jsx +0 -7
- package/src/Prebuilt/components/RoleChangeRequestModal.jsx +82 -6
- package/src/Prebuilt/components/ScreenshareDisplay.jsx +4 -10
- package/src/Prebuilt/components/ScreenshareTile.jsx +41 -33
- package/src/Prebuilt/components/SecondaryTiles.tsx +34 -0
- package/src/Prebuilt/components/Settings/LayoutSettings.jsx +2 -12
- package/src/Prebuilt/components/Settings/NotificationSettings.jsx +3 -9
- package/src/Prebuilt/components/Settings/SettingsModal.jsx +3 -9
- package/src/Prebuilt/components/StatsForNerds.jsx +3 -1
- package/src/Prebuilt/components/TileMenu/TileMenu.jsx +15 -16
- package/src/Prebuilt/components/TileMenu/TileMenuContent.jsx +21 -19
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +53 -11
- package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +62 -0
- package/src/Prebuilt/components/VideoLayouts/Grid.tsx +41 -0
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +92 -0
- package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +60 -0
- package/src/Prebuilt/components/VideoLayouts/RoleProminence.tsx +56 -0
- package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +36 -0
- package/src/Prebuilt/components/VideoLayouts/interface.ts +9 -0
- package/src/Prebuilt/components/VideoTile.jsx +93 -43
- package/src/Prebuilt/components/conference.jsx +24 -20
- package/src/Prebuilt/components/hooks/useMetadata.jsx +7 -0
- package/src/Prebuilt/components/hooks/useRoleProminencePeers.tsx +38 -0
- package/src/Prebuilt/components/hooks/useTileLayout.tsx +121 -0
- package/src/Prebuilt/components/hooks/useVideoTileLayout.ts +22 -0
- package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +5 -72
- package/src/Prebuilt/components/pdfAnnotator/submitPdf.jsx +4 -45
- package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +2 -17
- package/src/Prebuilt/components/peerTileUtils.jsx +1 -1
- package/src/Prebuilt/images/empty-chat.svg +12 -0
- package/src/Prebuilt/layouts/EmbedView.jsx +17 -40
- package/src/Prebuilt/layouts/HLSView.jsx +83 -66
- package/src/Prebuilt/layouts/PDFView.jsx +1 -11
- package/src/Prebuilt/layouts/SidePane.tsx +96 -0
- package/src/Prebuilt/layouts/{mainView.jsx → VideoStreamingSection.tsx} +38 -47
- package/src/Prebuilt/layouts/WhiteboardView.jsx +10 -34
- package/src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx +1 -4
- package/src/Prebuilt/plugins/whiteboard/{ToggleWhiteboard.jsx → ToggleWhiteboard.tsx} +5 -9
- package/src/Prebuilt/primitives/DialogContent.jsx +15 -11
- package/src/Prebuilt/provider/roomLayoutProvider/constants/index.ts +17 -2
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts +36 -13
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.ts +10 -0
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts +65 -0
- package/src/Prebuilt/provider/roomLayoutProvider/index.tsx +17 -6
- package/dist/HLSView-CTAJQUU4.js.map +0 -7
- package/dist/PinnedTrackView-CQKONH4O.js +0 -102
- package/dist/PinnedTrackView-CQKONH4O.js.map +0 -7
- package/dist/VirtualBackground-GGGBJYVY.js.map +0 -7
- package/dist/chunk-I2FJWE74.js +0 -827
- package/dist/chunk-I2FJWE74.js.map +0 -7
- package/dist/chunk-L2SX7GBO.js.map +0 -7
- package/dist/chunk-NOKIGB6Y.js +0 -1100
- package/dist/chunk-NOKIGB6Y.js.map +0 -7
- package/dist/chunk-TJNDX446.js.map +0 -7
- package/dist/conference-OEO7VOJD.js +0 -8995
- package/dist/conference-OEO7VOJD.js.map +0 -7
- package/src/Prebuilt/components/Chat/ChatHeader.jsx +0 -67
- package/src/Prebuilt/components/EqualProminence.jsx +0 -180
- package/src/Prebuilt/components/FirstPersonDisplay.jsx +0 -50
- package/src/Prebuilt/components/Footer/Footer.jsx +0 -73
- package/src/Prebuilt/components/Header/Header.jsx +0 -8
- package/src/Prebuilt/components/Header/StreamingHeader.jsx +0 -54
- package/src/Prebuilt/components/LeaveRoom.jsx +0 -94
- package/src/Prebuilt/components/MoreSettings/MoreSettings.jsx +0 -10
- package/src/Prebuilt/components/Notifications/MessageNotifications.jsx +0 -25
- package/src/Prebuilt/components/gridView.jsx +0 -85
- package/src/Prebuilt/components/hooks/useFeatures.js +0 -22
- package/src/Prebuilt/components/hooks/useNavigation.js +0 -19
- package/src/Prebuilt/components/hooks/useSkipPreview.jsx +0 -20
- package/src/Prebuilt/components/pdfAnnotator/pdfErrorView.jsx +0 -29
- package/src/Prebuilt/images/Logo.svg +0 -8
- package/src/Prebuilt/layouts/ActiveSpeakerView.jsx +0 -34
- package/src/Prebuilt/layouts/InsetView.jsx +0 -260
- package/src/Prebuilt/layouts/PinnedTrackView.jsx +0 -59
- package/src/Prebuilt/layouts/SidePane.jsx +0 -52
- package/src/Prebuilt/layouts/mainGridView.jsx +0 -98
- package/src/Prebuilt/layouts/screenShareView.jsx +0 -183
- /package/{src/Prebuilt/components/Header/index.jsx → dist/Prebuilt/components/Header/index.d.ts} +0 -0
- /package/src/Prebuilt/components/{ScreenShare.jsx → ScreenShareToggle.jsx} +0 -0
- /package/src/{assets → Prebuilt/images}/android-perm-1.png +0 -0
- /package/src/{assets → Prebuilt/images}/ios-perm-0.png +0 -0
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Box, Flex } from '
|
|
3
|
-
import { Text } from '
|
|
2
|
+
import { Box, Flex } from '../../../Layout';
|
|
3
|
+
import { Text } from '../../../Text';
|
|
4
|
+
import { CSS } from '../../../Theme';
|
|
4
5
|
|
|
5
|
-
export const LeaveCard = ({
|
|
6
|
+
export const LeaveCard = ({
|
|
7
|
+
icon,
|
|
8
|
+
title,
|
|
9
|
+
subtitle,
|
|
10
|
+
onClick,
|
|
11
|
+
bg,
|
|
12
|
+
titleColor,
|
|
13
|
+
subtitleColor,
|
|
14
|
+
css = {},
|
|
15
|
+
}: {
|
|
16
|
+
icon: React.JSX.Element;
|
|
17
|
+
title: string;
|
|
18
|
+
subtitle: string;
|
|
19
|
+
onClick: () => void;
|
|
20
|
+
titleColor: string;
|
|
21
|
+
subtitleColor: string;
|
|
22
|
+
bg: string;
|
|
23
|
+
css?: CSS;
|
|
24
|
+
}) => {
|
|
6
25
|
return (
|
|
7
26
|
<Flex css={{ p: '$10', flexGrow: 1, gap: '$8', bg, ...css }} onClick={onClick}>
|
|
8
27
|
<Box css={{ color: titleColor }}>{icon}</Box>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useNavigate, useParams } from 'react-router-dom';
|
|
3
|
+
import { useMedia } from 'react-use';
|
|
4
|
+
import { ConferencingScreen } from '@100mslive/types-prebuilt';
|
|
5
|
+
import { selectIsConnectedToRoom, selectPermissions, useHMSActions, useHMSStore } from '@100mslive/react-sdk';
|
|
6
|
+
import { config as cssConfig } from '../../../Theme';
|
|
7
|
+
// @ts-ignore: No implicit Any
|
|
8
|
+
import { useHMSPrebuiltContext } from '../../AppContext';
|
|
9
|
+
// @ts-ignore: No implicit Any
|
|
10
|
+
import { PictureInPicture } from '../PIP/PIPManager';
|
|
11
|
+
// @ts-ignore: No implicit Any
|
|
12
|
+
import { ToastManager } from '../Toast/ToastManager';
|
|
13
|
+
import { DesktopLeaveRoom } from './DesktopLeaveRoom';
|
|
14
|
+
import { MwebLeaveRoom } from './MwebLeaveRoom';
|
|
15
|
+
import { useRoomLayoutLeaveScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
|
16
|
+
|
|
17
|
+
export const LeaveRoom = ({ screenType }: { screenType: keyof ConferencingScreen }) => {
|
|
18
|
+
const navigate = useNavigate();
|
|
19
|
+
const params = useParams();
|
|
20
|
+
const isConnected = useHMSStore(selectIsConnectedToRoom);
|
|
21
|
+
const permissions = useHMSStore(selectPermissions);
|
|
22
|
+
const isMobile = useMedia(cssConfig.media.md);
|
|
23
|
+
const hmsActions = useHMSActions();
|
|
24
|
+
const { onLeave } = useHMSPrebuiltContext();
|
|
25
|
+
const { isLeaveScreenEnabled } = useRoomLayoutLeaveScreen();
|
|
26
|
+
|
|
27
|
+
const stopStream = async () => {
|
|
28
|
+
try {
|
|
29
|
+
console.log('Stopping HLS stream');
|
|
30
|
+
await hmsActions.stopHLSStreaming();
|
|
31
|
+
ToastManager.addToast({ title: 'Stopping the stream' });
|
|
32
|
+
} catch (e) {
|
|
33
|
+
console.error('Error stopping stream', e);
|
|
34
|
+
ToastManager.addToast({ title: 'Error in stopping the stream', type: 'error' });
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const redirectToLeavePage = () => {
|
|
39
|
+
const prefix = isLeaveScreenEnabled ? '/leave/' : '/';
|
|
40
|
+
if (params.role) {
|
|
41
|
+
navigate(prefix + params.roomId + '/' + params.role);
|
|
42
|
+
} else {
|
|
43
|
+
navigate(prefix + params.roomId);
|
|
44
|
+
}
|
|
45
|
+
PictureInPicture.stop().catch(() => console.error('stopping pip'));
|
|
46
|
+
ToastManager.clearAllToast();
|
|
47
|
+
onLeave?.();
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const leaveRoom = () => {
|
|
51
|
+
hmsActions.leave();
|
|
52
|
+
redirectToLeavePage();
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
if (!permissions || !isConnected) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return isMobile ? (
|
|
59
|
+
<MwebLeaveRoom leaveRoom={leaveRoom} stopStream={stopStream} screenType={screenType} />
|
|
60
|
+
) : (
|
|
61
|
+
<DesktopLeaveRoom leaveRoom={leaveRoom} stopStream={stopStream} screenType={screenType} />
|
|
62
|
+
);
|
|
63
|
+
};
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AlertTriangleIcon, CrossIcon } from '@100mslive/react-icons';
|
|
3
|
-
import { Button } from '
|
|
4
|
-
import { Box, Flex } from '
|
|
5
|
-
import { Text } from '
|
|
3
|
+
import { Button } from '../../../Button';
|
|
4
|
+
import { Box, Flex } from '../../../Layout';
|
|
5
|
+
import { Text } from '../../../Text';
|
|
6
6
|
|
|
7
|
-
export const LeaveSessionContent = ({
|
|
7
|
+
export const LeaveSessionContent = ({
|
|
8
|
+
setShowLeaveRoomAlert,
|
|
9
|
+
leaveRoom,
|
|
10
|
+
isModal = false,
|
|
11
|
+
}: {
|
|
12
|
+
setShowLeaveRoomAlert: (value: boolean) => void;
|
|
13
|
+
leaveRoom: () => void;
|
|
14
|
+
isModal?: boolean;
|
|
15
|
+
}) => {
|
|
8
16
|
return (
|
|
9
17
|
<Box>
|
|
10
18
|
<Flex
|
|
@@ -24,7 +32,7 @@ export const LeaveSessionContent = ({ setShowLeaveRoomAlert, leaveRoom, isModal
|
|
|
24
32
|
</Box>
|
|
25
33
|
)}
|
|
26
34
|
</Flex>
|
|
27
|
-
<Text variant="sm" css={{ color: '$
|
|
35
|
+
<Text variant="sm" css={{ color: '$on_surface_low', mb: '$8', mt: '$4' }}>
|
|
28
36
|
Others will continue after you leave. You can join the session again.
|
|
29
37
|
</Text>
|
|
30
38
|
<Flex align="center" justify="between" css={{ w: '100%', gap: '$8' }}>
|
|
@@ -1,24 +1,34 @@
|
|
|
1
1
|
import React, { Fragment, useState } from 'react';
|
|
2
|
+
import { ConferencingScreen } from '@100mslive/types-prebuilt';
|
|
2
3
|
import { selectIsConnectedToRoom, selectPermissions, useHMSStore, useRecordingStreaming } from '@100mslive/react-sdk';
|
|
3
4
|
import { ExitIcon, StopIcon } from '@100mslive/react-icons';
|
|
4
|
-
import { Box } from '
|
|
5
|
-
import { Sheet } from '
|
|
6
|
-
import { Tooltip } from '
|
|
7
|
-
import { EndSessionContent } from '
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { Box } from '../../../Layout';
|
|
6
|
+
import { Sheet } from '../../../Sheet';
|
|
7
|
+
import { Tooltip } from '../../../Tooltip';
|
|
8
|
+
import { EndSessionContent } from './EndSessionContent';
|
|
9
|
+
import { LeaveIconButton } from './LeaveAtoms';
|
|
10
|
+
import { LeaveCard } from './LeaveCard';
|
|
11
|
+
import { LeaveSessionContent } from './LeaveSessionContent';
|
|
12
|
+
// @ts-ignore: No implicit Any
|
|
13
|
+
import { useDropdownList } from '../hooks/useDropdownList';
|
|
11
14
|
|
|
12
|
-
export const MwebLeaveRoom = ({
|
|
15
|
+
export const MwebLeaveRoom = ({
|
|
16
|
+
leaveRoom,
|
|
17
|
+
stopStream,
|
|
18
|
+
screenType,
|
|
19
|
+
}: {
|
|
20
|
+
leaveRoom: () => void;
|
|
21
|
+
stopStream: () => Promise<void>;
|
|
22
|
+
screenType: keyof ConferencingScreen;
|
|
23
|
+
}) => {
|
|
13
24
|
const [open, setOpen] = useState(false);
|
|
25
|
+
const [showLeaveRoomAlert, setShowLeaveRoomAlert] = useState(false);
|
|
14
26
|
const [showEndStreamAlert, setShowEndStreamAlert] = useState(false);
|
|
15
27
|
const isConnected = useHMSStore(selectIsConnectedToRoom);
|
|
16
28
|
const permissions = useHMSStore(selectPermissions);
|
|
17
29
|
const { isStreamingOn } = useRecordingStreaming();
|
|
18
30
|
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
const showStream = showStreamingUI && isStreamingOn;
|
|
31
|
+
const showStream = permissions?.hlsStreaming && isStreamingOn;
|
|
22
32
|
useDropdownList({ open, name: 'LeaveRoom' });
|
|
23
33
|
|
|
24
34
|
if (!permissions || !isConnected) {
|
|
@@ -31,7 +41,6 @@ export const MwebLeaveRoom = ({ leaveIconButton: LeaveIconButton, leaveRoom, sto
|
|
|
31
41
|
<Sheet.Root open={open} onOpenChange={setOpen}>
|
|
32
42
|
<Sheet.Trigger asChild>
|
|
33
43
|
<LeaveIconButton
|
|
34
|
-
variant="danger"
|
|
35
44
|
key="LeaveRoom"
|
|
36
45
|
data-testid="leave_room_btn"
|
|
37
46
|
css={{
|
|
@@ -78,7 +87,15 @@ export const MwebLeaveRoom = ({ leaveIconButton: LeaveIconButton, leaveRoom, sto
|
|
|
78
87
|
</Sheet.Content>
|
|
79
88
|
</Sheet.Root>
|
|
80
89
|
) : (
|
|
81
|
-
<LeaveIconButton
|
|
90
|
+
<LeaveIconButton
|
|
91
|
+
key="LeaveRoom"
|
|
92
|
+
data-testid="leave_room_btn"
|
|
93
|
+
onClick={() => {
|
|
94
|
+
if (screenType === 'hls_live_streaming') {
|
|
95
|
+
setShowLeaveRoomAlert(true);
|
|
96
|
+
}
|
|
97
|
+
}}
|
|
98
|
+
>
|
|
82
99
|
<Tooltip title="Leave Room">
|
|
83
100
|
<Box>
|
|
84
101
|
<ExitIcon style={{ transform: 'rotate(180deg)' }} />
|
|
@@ -92,9 +109,17 @@ export const MwebLeaveRoom = ({ leaveIconButton: LeaveIconButton, leaveRoom, sto
|
|
|
92
109
|
setShowEndStreamAlert={setShowEndStreamAlert}
|
|
93
110
|
stopStream={stopStream}
|
|
94
111
|
leaveRoom={leaveRoom}
|
|
112
|
+
isStreamingOn={isStreamingOn}
|
|
95
113
|
/>
|
|
96
114
|
</Sheet.Content>
|
|
97
115
|
</Sheet.Root>
|
|
116
|
+
{screenType === 'hls_live_streaming' ? (
|
|
117
|
+
<Sheet.Root open={showLeaveRoomAlert} onOpenChange={setShowLeaveRoomAlert}>
|
|
118
|
+
<Sheet.Content css={{ bg: '$surface_dim', p: '$10', pb: '$12' }}>
|
|
119
|
+
<LeaveSessionContent setShowLeaveRoomAlert={setShowLeaveRoomAlert} leaveRoom={leaveRoom} />
|
|
120
|
+
</Sheet.Content>
|
|
121
|
+
</Sheet.Root>
|
|
122
|
+
) : null}
|
|
98
123
|
</Fragment>
|
|
99
124
|
);
|
|
100
125
|
};
|
|
@@ -4,40 +4,32 @@ import { BrbIcon, HandIcon } from '@100mslive/react-icons';
|
|
|
4
4
|
import { Flex } from '../../Layout';
|
|
5
5
|
import { Tooltip } from '../../Tooltip';
|
|
6
6
|
import IconButton from '../IconButton';
|
|
7
|
-
import { useIsFeatureEnabled } from './hooks/useFeatures';
|
|
8
7
|
import { useMyMetadata } from './hooks/useMetadata';
|
|
9
|
-
import { FEATURE_LIST } from '../common/constants';
|
|
10
8
|
|
|
11
9
|
const MetaActions = ({ isMobile = false, compact = false }) => {
|
|
12
10
|
const isConnected = useHMSStore(selectIsConnectedToRoom);
|
|
13
11
|
const { isHandRaised, isBRBOn, toggleHandRaise, toggleBRB } = useMyMetadata();
|
|
14
|
-
const isHandRaiseEnabled = useIsFeatureEnabled(FEATURE_LIST.HAND_RAISE);
|
|
15
|
-
const isBRBEnabled = useIsFeatureEnabled(FEATURE_LIST.BRB);
|
|
16
12
|
|
|
17
|
-
if (!isConnected
|
|
13
|
+
if (!isConnected) {
|
|
18
14
|
return null;
|
|
19
15
|
}
|
|
20
16
|
|
|
21
17
|
return (
|
|
22
18
|
<Flex align="center" css={{ gap: compact ? '$4' : '$8' }}>
|
|
23
|
-
{
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<BrbIcon />
|
|
38
|
-
</IconButton>
|
|
39
|
-
</Tooltip>
|
|
40
|
-
)}
|
|
19
|
+
<Tooltip title={`${!isHandRaised ? 'Raise' : 'Unraise'} hand`}>
|
|
20
|
+
<IconButton
|
|
21
|
+
onClick={toggleHandRaise}
|
|
22
|
+
active={!isHandRaised}
|
|
23
|
+
data-testid={isMobile ? 'raise_hand_btn_mobile' : 'raise_hand_btn'}
|
|
24
|
+
>
|
|
25
|
+
<HandIcon />
|
|
26
|
+
</IconButton>
|
|
27
|
+
</Tooltip>
|
|
28
|
+
<Tooltip title={isBRBOn ? `I'm back` : `I'll be right back`}>
|
|
29
|
+
<IconButton onClick={toggleBRB} active={!isBRBOn} data-testid="brb_btn">
|
|
30
|
+
<BrbIcon />
|
|
31
|
+
</IconButton>
|
|
32
|
+
</Tooltip>
|
|
41
33
|
</Flex>
|
|
42
34
|
);
|
|
43
35
|
};
|
|
@@ -36,9 +36,14 @@ const ActionTileCount = styled(Text, {
|
|
|
36
36
|
fontWeight: '$semiBold',
|
|
37
37
|
color: '$on_surface_high',
|
|
38
38
|
p: '$1 $2',
|
|
39
|
+
minWidth: '$9',
|
|
40
|
+
textAlign: 'center',
|
|
41
|
+
boxSizing: 'border-box',
|
|
39
42
|
bg: '$surface_bright',
|
|
40
43
|
r: '$round',
|
|
44
|
+
letterSpacing: '1.5px',
|
|
41
45
|
fontSize: '$tiny !important',
|
|
46
|
+
lineHeight: '$tiny !important',
|
|
42
47
|
});
|
|
43
48
|
|
|
44
49
|
const ActionTileTitle = styled(Text, {
|
|
@@ -27,22 +27,27 @@ export const ChangeNameContent = ({
|
|
|
27
27
|
color: '$on_surface_high',
|
|
28
28
|
fontWeight: '$semiBold',
|
|
29
29
|
display: 'flex',
|
|
30
|
-
|
|
31
|
-
pb: '$6',
|
|
32
|
-
mb: '$8',
|
|
33
|
-
px: isMobile ? '$8' : '',
|
|
30
|
+
'@md': { px: '$8', borderBottom: '1px solid $border_default' },
|
|
34
31
|
}}
|
|
35
32
|
>
|
|
36
33
|
{isMobile ? <ChevronLeftIcon onClick={onBackClick} style={{ marginRight: '0.5rem' }} /> : null}
|
|
37
34
|
Change Name
|
|
38
|
-
<Box
|
|
35
|
+
<Box
|
|
36
|
+
css={{ color: 'inherit', ml: 'auto', '&:hover': { color: '$on_surface_medium', cursor: 'pointer' } }}
|
|
37
|
+
onClick={onExit}
|
|
38
|
+
>
|
|
39
39
|
<CrossIcon />
|
|
40
40
|
</Box>
|
|
41
41
|
</Text>
|
|
42
|
-
<
|
|
42
|
+
<Text variant="sm" css={{ color: '$on_surface_medium', pb: '$6', mb: '$8', '@md': { px: '$8', mt: '$4' } }}>
|
|
43
|
+
Your name will be visible to other participants in the session.
|
|
44
|
+
</Text>
|
|
45
|
+
<Flex justify="center" align="center" css={{ my: '$8', w: '100%', '@md': { px: '$8' } }}>
|
|
43
46
|
<Input
|
|
44
47
|
css={{ width: '100%', bg: '$surface_default' }}
|
|
45
48
|
value={currentName}
|
|
49
|
+
// Prevents popup from showing up on chrome mweb
|
|
50
|
+
type={isMobile ? 'search' : 'text'}
|
|
46
51
|
onChange={e => {
|
|
47
52
|
setCurrentName(e.target.value);
|
|
48
53
|
}}
|
|
@@ -65,7 +70,7 @@ export const ChangeNameContent = ({
|
|
|
65
70
|
width: '100%',
|
|
66
71
|
gap: '$md',
|
|
67
72
|
mt: '$10',
|
|
68
|
-
|
|
73
|
+
'@md': { px: '$4' },
|
|
69
74
|
}}
|
|
70
75
|
>
|
|
71
76
|
{isMobile ? null : (
|
|
@@ -49,7 +49,7 @@ export const ChangeNameModal = ({ onOpenChange, openParentSheet = null }) => {
|
|
|
49
49
|
if (isMobile) {
|
|
50
50
|
return (
|
|
51
51
|
<Sheet.Root defaultOpen onOpenChange={onOpenChange}>
|
|
52
|
-
<Sheet.Content css={{ bg: '$surface_dim',
|
|
52
|
+
<Sheet.Content css={{ bg: '$surface_dim', p: '$8 0' }}>
|
|
53
53
|
<ChangeNameContent {...props} />
|
|
54
54
|
</Sheet.Content>
|
|
55
55
|
</Sheet.Root>
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExpandIcon } from '@100mslive/react-icons';
|
|
3
3
|
import { Dropdown, Text } from '../../../';
|
|
4
|
-
import { useIsFeatureEnabled } from '../hooks/useFeatures';
|
|
5
4
|
import { useFullscreen } from '../hooks/useFullscreen';
|
|
6
|
-
import { FEATURE_LIST } from '../../common/constants';
|
|
7
5
|
|
|
8
6
|
export const FullScreenItem = () => {
|
|
9
7
|
const { allowed, isFullscreen, toggleFullscreen } = useFullscreen();
|
|
10
|
-
const isFullscreenEnabled = useIsFeatureEnabled(FEATURE_LIST.FULLSCREEN);
|
|
11
8
|
|
|
12
|
-
if (!
|
|
9
|
+
if (!allowed) {
|
|
13
10
|
return null;
|
|
14
11
|
}
|
|
15
12
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useMedia } from 'react-use';
|
|
3
|
+
import {
|
|
4
|
+
ConferencingScreen,
|
|
5
|
+
DefaultConferencingScreen_Elements,
|
|
6
|
+
HLSLiveStreamingScreen_Elements,
|
|
7
|
+
} from '@100mslive/types-prebuilt';
|
|
8
|
+
// @ts-ignore: No implicit Any
|
|
9
|
+
import { DesktopOptions } from './SplitComponents/DesktopOptions';
|
|
10
|
+
// @ts-ignore: No implicit Any
|
|
11
|
+
import { MwebOptions } from './SplitComponents/MwebOptions';
|
|
12
|
+
import { config as cssConfig } from '../../..';
|
|
13
|
+
|
|
14
|
+
export const MoreSettings = ({
|
|
15
|
+
elements,
|
|
16
|
+
screenType,
|
|
17
|
+
}: {
|
|
18
|
+
elements: DefaultConferencingScreen_Elements | HLSLiveStreamingScreen_Elements;
|
|
19
|
+
screenType: keyof ConferencingScreen;
|
|
20
|
+
}) => {
|
|
21
|
+
const isMobile = useMedia(cssConfig.media.md);
|
|
22
|
+
return isMobile ? (
|
|
23
|
+
<MwebOptions elements={elements} streamType={screenType} />
|
|
24
|
+
) : (
|
|
25
|
+
<DesktopOptions elements={elements} screenType={screenType} />
|
|
26
|
+
);
|
|
27
|
+
};
|
|
@@ -1,30 +1,39 @@
|
|
|
1
1
|
import React, { Fragment, useState } from 'react';
|
|
2
2
|
import { HMSHLSPlayer } from '@100mslive/hls-player';
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from '@100mslive/react-sdk';
|
|
4
|
+
ConferencingScreen,
|
|
5
|
+
DefaultConferencingScreen_Elements,
|
|
6
|
+
HLSLiveStreamingScreen_Elements,
|
|
7
|
+
} from '@100mslive/types-prebuilt';
|
|
8
|
+
import { selectAppData, selectLocalPeerID, useHMSActions, useHMSStore } from '@100mslive/react-sdk';
|
|
10
9
|
import { BrbIcon, CheckIcon, DragHandleIcon, HandIcon, InfoIcon, PipIcon, SettingsIcon } from '@100mslive/react-icons';
|
|
11
|
-
import { Checkbox, Dropdown, Flex, Text, Tooltip } from '
|
|
10
|
+
import { Checkbox, Dropdown, Flex, Text, Tooltip } from '../../../..';
|
|
11
|
+
// @ts-ignore: No implicit any
|
|
12
12
|
import IconButton from '../../../IconButton';
|
|
13
|
+
// @ts-ignore: No implicit any
|
|
13
14
|
import { PIP } from '../../PIP';
|
|
15
|
+
// @ts-ignore: No implicit any
|
|
16
|
+
import { PictureInPicture } from '../../PIP/PIPManager';
|
|
17
|
+
// @ts-ignore: No implicit any
|
|
14
18
|
import { RoleChangeModal } from '../../RoleChangeModal';
|
|
19
|
+
// @ts-ignore: No implicit any
|
|
15
20
|
import SettingsModal from '../../Settings/SettingsModal';
|
|
21
|
+
// @ts-ignore: No implicit any
|
|
16
22
|
import StartRecording from '../../Settings/StartRecording';
|
|
23
|
+
// @ts-ignore: No implicit any
|
|
17
24
|
import { StatsForNerds } from '../../StatsForNerds';
|
|
18
|
-
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
import {
|
|
25
|
+
// @ts-ignore: No implicit any
|
|
26
|
+
import { BulkRoleChangeModal } from '../BulkRoleChangeModal';
|
|
27
|
+
// @ts-ignore: No implicit any
|
|
28
|
+
import { FullScreenItem } from '../FullScreenItem';
|
|
29
|
+
// @ts-ignore: No implicit any
|
|
30
|
+
import { MuteAllModal } from '../MuteAllModal';
|
|
31
|
+
// @ts-ignore: No implicit any
|
|
22
32
|
import { useDropdownList } from '../../hooks/useDropdownList';
|
|
23
|
-
|
|
33
|
+
// @ts-ignore: No implicit any
|
|
24
34
|
import { useMyMetadata } from '../../hooks/useMetadata';
|
|
25
|
-
|
|
26
|
-
import {
|
|
27
|
-
import { APP_DATA, FEATURE_LIST, isMacOS } from '../../../common/constants';
|
|
35
|
+
// @ts-ignore: No implicit any
|
|
36
|
+
import { APP_DATA, isMacOS } from '../../../common/constants';
|
|
28
37
|
|
|
29
38
|
const MODALS = {
|
|
30
39
|
CHANGE_NAME: 'changeName',
|
|
@@ -38,24 +47,24 @@ const MODALS = {
|
|
|
38
47
|
EMBED_URL: 'embedUrl',
|
|
39
48
|
};
|
|
40
49
|
|
|
41
|
-
export const DesktopOptions = (
|
|
50
|
+
export const DesktopOptions = ({
|
|
51
|
+
elements,
|
|
52
|
+
screenType,
|
|
53
|
+
}: {
|
|
54
|
+
elements: DefaultConferencingScreen_Elements & HLSLiveStreamingScreen_Elements;
|
|
55
|
+
screenType: keyof ConferencingScreen;
|
|
56
|
+
}) => {
|
|
42
57
|
const localPeerId = useHMSStore(selectLocalPeerID);
|
|
43
|
-
const localPeerRole = useHMSStore(selectLocalPeerRoleName);
|
|
44
58
|
const hmsActions = useHMSActions();
|
|
45
59
|
const enablHlsStats = useHMSStore(selectAppData(APP_DATA.hlsStats));
|
|
46
|
-
const isSFNEnabled = useIsFeatureEnabled(FEATURE_LIST.STARTS_FOR_NERDS);
|
|
47
60
|
const [openModals, setOpenModals] = useState(new Set());
|
|
48
61
|
const { isHandRaised, isBRBOn, toggleHandRaise, toggleBRB } = useMyMetadata();
|
|
49
|
-
const
|
|
50
|
-
const isBRBEnabled =
|
|
51
|
-
const showStreamingUI = useShowStreamingUI();
|
|
52
|
-
const hlsViewerRole = useHLSViewerRole();
|
|
53
|
-
const isHlsViewer = hlsViewerRole === localPeerRole;
|
|
54
|
-
const isPIPEnabled = useIsFeatureEnabled(FEATURE_LIST.PICTURE_IN_PICTURE);
|
|
62
|
+
const isPipOn = PictureInPicture.isOn();
|
|
63
|
+
const isBRBEnabled = !!elements?.brb;
|
|
55
64
|
|
|
56
65
|
useDropdownList({ open: openModals.size > 0, name: 'MoreSettings' });
|
|
57
66
|
|
|
58
|
-
const updateState = (modalName, value) => {
|
|
67
|
+
const updateState = (modalName: string, value: boolean) => {
|
|
59
68
|
setOpenModals(modals => {
|
|
60
69
|
const copy = new Set(modals);
|
|
61
70
|
if (value) {
|
|
@@ -96,7 +105,7 @@ export const DesktopOptions = () => {
|
|
|
96
105
|
},
|
|
97
106
|
}}
|
|
98
107
|
>
|
|
99
|
-
{
|
|
108
|
+
{screenType !== 'hls_live_streaming' ? (
|
|
100
109
|
<Dropdown.Item onClick={toggleHandRaise} data-testid="raise_hand_btn">
|
|
101
110
|
<HandIcon />
|
|
102
111
|
<Text variant="sm" css={{ ml: '$4', color: '$on_surface_high' }}>
|
|
@@ -108,7 +117,7 @@ export const DesktopOptions = () => {
|
|
|
108
117
|
</Dropdown.Item>
|
|
109
118
|
) : null}
|
|
110
119
|
|
|
111
|
-
{isBRBEnabled &&
|
|
120
|
+
{isBRBEnabled && screenType === 'hls_live_streaming' ? (
|
|
112
121
|
<Dropdown.Item onClick={toggleBRB} data-testid="brb_btn">
|
|
113
122
|
<BrbIcon />
|
|
114
123
|
<Text variant="sm" css={{ ml: '$4', color: '$on_surface_high' }}>
|
|
@@ -120,18 +129,16 @@ export const DesktopOptions = () => {
|
|
|
120
129
|
</Dropdown.Item>
|
|
121
130
|
) : null}
|
|
122
131
|
|
|
123
|
-
{
|
|
124
|
-
<Dropdown.ItemSeparator css={{ mx: '0' }} />
|
|
125
|
-
) : null}
|
|
132
|
+
{isBRBEnabled && screenType === 'hls_live_streaming' ? <Dropdown.ItemSeparator css={{ mx: '0' }} /> : null}
|
|
126
133
|
|
|
127
|
-
{
|
|
134
|
+
{screenType !== 'hls_live_streaming' ? (
|
|
128
135
|
<Dropdown.Item>
|
|
129
136
|
<PIP
|
|
130
137
|
content={
|
|
131
138
|
<Flex css={{ w: '100%' }}>
|
|
132
139
|
<PipIcon />
|
|
133
140
|
<Text variant="sm" css={{ ml: '$4' }}>
|
|
134
|
-
|
|
141
|
+
{isPipOn ? 'Disable' : 'Enable'} Picture-in-Picture
|
|
135
142
|
</Text>
|
|
136
143
|
</Flex>
|
|
137
144
|
}
|
|
@@ -153,63 +160,67 @@ export const DesktopOptions = () => {
|
|
|
153
160
|
</Text>
|
|
154
161
|
</Dropdown.Item>
|
|
155
162
|
|
|
156
|
-
{
|
|
157
|
-
|
|
158
|
-
(localPeerRole === 'hls-viewer' ? (
|
|
159
|
-
HMSHLSPlayer.isSupported() ? (
|
|
160
|
-
<Dropdown.Item
|
|
161
|
-
onClick={() => hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats)}
|
|
162
|
-
data-testid="hls_stats"
|
|
163
|
-
>
|
|
164
|
-
<Checkbox.Root
|
|
165
|
-
css={{ margin: '$2' }}
|
|
166
|
-
checked={enablHlsStats}
|
|
167
|
-
onCheckedChange={() => hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats)}
|
|
168
|
-
>
|
|
169
|
-
<Checkbox.Indicator>
|
|
170
|
-
<CheckIcon width={16} height={16} />
|
|
171
|
-
</Checkbox.Indicator>
|
|
172
|
-
</Checkbox.Root>
|
|
173
|
-
<Flex justify="between" css={{ width: '100%' }}>
|
|
174
|
-
<Text variant="sm" css={{ ml: '$4' }}>
|
|
175
|
-
Show HLS Stats
|
|
176
|
-
</Text>
|
|
177
|
-
|
|
178
|
-
<Text variant="sm" css={{ ml: '$4' }}>
|
|
179
|
-
{`${isMacOS ? '⌘' : 'ctrl'} + ]`}
|
|
180
|
-
</Text>
|
|
181
|
-
</Flex>
|
|
182
|
-
</Dropdown.Item>
|
|
183
|
-
) : null
|
|
184
|
-
) : (
|
|
163
|
+
{screenType === 'hls_live_streaming' ? (
|
|
164
|
+
HMSHLSPlayer.isSupported() ? (
|
|
185
165
|
<Dropdown.Item
|
|
186
|
-
onClick={() =>
|
|
187
|
-
data-testid="
|
|
166
|
+
onClick={() => hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats)}
|
|
167
|
+
data-testid="hls_stats"
|
|
188
168
|
>
|
|
189
|
-
<
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
169
|
+
<Checkbox.Root
|
|
170
|
+
css={{ margin: '$2' }}
|
|
171
|
+
checked={enablHlsStats}
|
|
172
|
+
onCheckedChange={() => hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats)}
|
|
173
|
+
>
|
|
174
|
+
<Checkbox.Indicator>
|
|
175
|
+
<CheckIcon width={16} height={16} />
|
|
176
|
+
</Checkbox.Indicator>
|
|
177
|
+
</Checkbox.Root>
|
|
178
|
+
<Flex justify="between" css={{ width: '100%' }}>
|
|
179
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
|
180
|
+
Show HLS Stats
|
|
181
|
+
</Text>
|
|
182
|
+
|
|
183
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
|
184
|
+
{`${isMacOS ? '⌘' : 'ctrl'} + ]`}
|
|
185
|
+
</Text>
|
|
186
|
+
</Flex>
|
|
193
187
|
</Dropdown.Item>
|
|
194
|
-
)
|
|
188
|
+
) : null
|
|
189
|
+
) : (
|
|
190
|
+
<Dropdown.Item onClick={() => updateState(MODALS.STATS_FOR_NERDS, true)} data-testid="stats_for_nreds_btn">
|
|
191
|
+
<InfoIcon />
|
|
192
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
|
193
|
+
Stats for Nerds
|
|
194
|
+
</Text>
|
|
195
|
+
</Dropdown.Item>
|
|
196
|
+
)}
|
|
195
197
|
</Dropdown.Content>
|
|
196
198
|
</Dropdown.Root>
|
|
197
199
|
{openModals.has(MODALS.BULK_ROLE_CHANGE) && (
|
|
198
|
-
<BulkRoleChangeModal onOpenChange={value => updateState(MODALS.BULK_ROLE_CHANGE, value)} />
|
|
200
|
+
<BulkRoleChangeModal onOpenChange={(value: boolean) => updateState(MODALS.BULK_ROLE_CHANGE, value)} />
|
|
201
|
+
)}
|
|
202
|
+
{openModals.has(MODALS.MUTE_ALL) && (
|
|
203
|
+
<MuteAllModal onOpenChange={(value: boolean) => updateState(MODALS.MUTE_ALL, value)} />
|
|
199
204
|
)}
|
|
200
|
-
{openModals.has(MODALS.MUTE_ALL) && <MuteAllModal onOpenChange={value => updateState(MODALS.MUTE_ALL, value)} />}
|
|
201
205
|
|
|
202
206
|
{openModals.has(MODALS.START_RECORDING) && (
|
|
203
|
-
<StartRecording open onOpenChange={value => updateState(MODALS.START_RECORDING, value)} />
|
|
207
|
+
<StartRecording open onOpenChange={(value: boolean) => updateState(MODALS.START_RECORDING, value)} />
|
|
204
208
|
)}
|
|
205
209
|
{openModals.has(MODALS.DEVICE_SETTINGS) && (
|
|
206
|
-
<SettingsModal
|
|
210
|
+
<SettingsModal
|
|
211
|
+
open
|
|
212
|
+
onOpenChange={(value: boolean) => updateState(MODALS.DEVICE_SETTINGS, value)}
|
|
213
|
+
screenType={screenType}
|
|
214
|
+
/>
|
|
207
215
|
)}
|
|
208
|
-
{
|
|
209
|
-
<StatsForNerds open onOpenChange={value => updateState(MODALS.STATS_FOR_NERDS, value)} />
|
|
216
|
+
{openModals.has(MODALS.STATS_FOR_NERDS) && (
|
|
217
|
+
<StatsForNerds open onOpenChange={(value: boolean) => updateState(MODALS.STATS_FOR_NERDS, value)} />
|
|
210
218
|
)}
|
|
211
219
|
{openModals.has(MODALS.SELF_ROLE_CHANGE) && (
|
|
212
|
-
<RoleChangeModal
|
|
220
|
+
<RoleChangeModal
|
|
221
|
+
peerId={localPeerId}
|
|
222
|
+
onOpenChange={(value: boolean) => updateState(MODALS.SELF_ROLE_CHANGE, value)}
|
|
223
|
+
/>
|
|
213
224
|
)}
|
|
214
225
|
{/* {openModals.has(MODALS.EMBED_URL) && (
|
|
215
226
|
<EmbedUrlModal onOpenChange={value => updateState(MODALS.EMBED_URL, value)} />
|