@100mslive/roomkit-react 0.1.5 → 0.1.6-alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-P57IRMAR.js → HLSView-HNVYG5VE.js} +309 -151
- package/dist/HLSView-HNVYG5VE.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/Chat/ChatFooter.d.ts +7 -0
- package/dist/Prebuilt/components/Connection/ConnectionIndicator.d.ts +6 -0
- package/dist/Prebuilt/components/Connection/TileConnection.d.ts +10 -0
- package/dist/Prebuilt/components/Footer/ChatToggle.d.ts +4 -0
- package/dist/Prebuilt/components/Footer/Footer.d.ts +6 -0
- package/dist/Prebuilt/components/Footer/RoleAccordion.d.ts +14 -0
- package/dist/Prebuilt/components/Footer/RoleOptions.d.ts +6 -0
- package/dist/Prebuilt/components/Header/Header.d.ts +2 -0
- package/dist/Prebuilt/components/Header/StreamActions.d.ts +11 -0
- package/dist/Prebuilt/components/InsetTile.d.ts +2 -0
- package/dist/Prebuilt/components/Leave/DesktopLeaveRoom.d.ts +8 -0
- package/dist/Prebuilt/components/Leave/EndSessionContent.d.ts +9 -0
- package/dist/Prebuilt/components/Leave/LeaveAtoms.d.ts +2196 -0
- package/dist/Prebuilt/components/Leave/LeaveCard.d.ts +11 -0
- package/dist/Prebuilt/components/Leave/LeaveRoom.d.ts +5 -0
- package/dist/Prebuilt/components/Leave/LeaveSessionContent.d.ts +8 -0
- package/dist/Prebuilt/components/Leave/MwebLeaveRoom.d.ts +8 -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/MoreSettings/SplitComponents/MwebOptions.d.ts +6 -0
- package/dist/Prebuilt/components/Pagination.d.ts +6 -0
- package/dist/Prebuilt/components/Preview/PreviewContainer.d.ts +3 -0
- package/dist/Prebuilt/components/Preview/PreviewForm.d.ts +10 -0
- package/dist/Prebuilt/components/Preview/PreviewJoin.d.ts +16 -0
- package/dist/Prebuilt/components/RoleChangeRequestModal.d.ts +2 -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 +6 -0
- package/dist/Prebuilt/components/VideoLayouts/GridLayout.d.ts +12 -0
- package/dist/Prebuilt/components/VideoLayouts/ProminenceLayout.d.ts +15 -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 +9 -0
- package/dist/Prebuilt/components/hooks/useAutoStartStreaming.d.ts +1 -0
- package/dist/Prebuilt/components/hooks/useRedirectToLeave.d.ts +3 -0
- package/dist/Prebuilt/components/hooks/useRoleProminencePeers.d.ts +5 -0
- package/dist/Prebuilt/components/hooks/useTileLayout.d.ts +13 -0
- package/dist/Prebuilt/components/hooks/useVideoTileLayout.d.ts +13 -0
- package/dist/Prebuilt/layouts/SidePane.d.ts +9 -0
- package/dist/Prebuilt/layouts/VideoStreamingSection.d.ts +7 -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-GGCQJ5JM.js → VirtualBackground-UM2FOUHQ.js} +5 -11
- package/dist/VirtualBackground-UM2FOUHQ.js.map +7 -0
- package/dist/{chunk-P5X32KOD.js → chunk-364HP22I.js} +8 -5
- package/dist/chunk-364HP22I.js.map +7 -0
- package/dist/{chunk-OSM4QEQG.js → chunk-LYSAET4G.js} +3742 -5462
- package/dist/chunk-LYSAET4G.js.map +7 -0
- package/dist/chunk-POE7H4IE.js +898 -0
- package/dist/chunk-POE7H4IE.js.map +7 -0
- package/dist/conference-UWLJHMB2.js +5727 -0
- package/dist/conference-UWLJHMB2.js.map +7 -0
- package/dist/index.cjs.js +9655 -15326
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +2 -2
- package/dist/meta.cjs.json +2513 -3456
- package/dist/meta.esbuild.json +2807 -3838
- package/package.json +8 -7
- package/src/Button/Button.tsx +2 -2
- package/src/Prebuilt/App.tsx +58 -53
- package/src/Prebuilt/{AppContext.jsx → AppContext.tsx} +11 -3
- package/src/Prebuilt/IconButton.jsx +11 -0
- package/src/Prebuilt/Prebuilt.stories.tsx +1 -0
- package/src/Prebuilt/common/{PeersSorter.js → PeersSorter.ts} +16 -11
- package/src/Prebuilt/common/constants.js +4 -114
- package/src/Prebuilt/common/hooks.js +34 -1
- package/src/Prebuilt/common/utils.js +1 -9
- package/src/Prebuilt/components/AppData/AppData.jsx +11 -15
- package/src/Prebuilt/components/AppData/useUISettings.js +6 -10
- package/src/Prebuilt/components/AudioVideoToggle.jsx +10 -2
- package/src/Prebuilt/components/AuthToken.jsx +11 -42
- package/src/Prebuilt/components/Chat/Chat.jsx +75 -27
- package/src/Prebuilt/components/Chat/ChatBody.jsx +95 -36
- package/src/Prebuilt/components/Chat/ChatFooter.tsx +199 -0
- package/src/Prebuilt/components/Chat/ChatParticipantHeader.jsx +84 -0
- package/src/Prebuilt/components/Chat/ChatSelector.jsx +16 -17
- package/src/Prebuilt/components/Chat/ChatSelectorContainer.jsx +81 -0
- package/src/Prebuilt/components/Chat/useEmojiPickerStyles.js +5 -4
- package/src/Prebuilt/components/Connection/{ConnectionIndicator.jsx → ConnectionIndicator.tsx} +12 -4
- package/src/Prebuilt/components/Connection/TileConnection.tsx +71 -0
- package/src/Prebuilt/components/EmojiReaction.jsx +19 -22
- package/src/Prebuilt/components/Footer/{ChatToggle.jsx → ChatToggle.tsx} +13 -9
- package/src/Prebuilt/components/Footer/Footer.tsx +98 -0
- package/src/Prebuilt/components/Footer/ParticipantList.jsx +187 -179
- package/src/Prebuilt/components/Footer/RoleAccordion.tsx +94 -0
- package/src/Prebuilt/components/Footer/RoleOptions.tsx +155 -0
- package/src/Prebuilt/components/FullPageProgress.jsx +3 -3
- package/src/Prebuilt/components/HMSVideo/Controls.jsx +3 -2
- package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx +63 -18
- package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +2 -2
- package/src/Prebuilt/components/HMSVideo/PlayButton.jsx +1 -1
- package/src/Prebuilt/components/HMSVideo/VideoProgress.jsx +5 -6
- 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 → StreamActions.tsx} +54 -67
- package/src/Prebuilt/components/Header/common.jsx +5 -2
- package/src/Prebuilt/components/Header/index.tsx +1 -0
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +23 -4
- package/src/Prebuilt/components/InsetTile.tsx +128 -0
- package/src/Prebuilt/components/{MoreSettings/SplitComponents/DesktopLeaveRoom.jsx → Leave/DesktopLeaveRoom.tsx} +67 -25
- package/src/Prebuilt/components/{EndSessionContent.jsx → Leave/EndSessionContent.tsx} +18 -11
- package/src/Prebuilt/components/Leave/LeaveAtoms.tsx +26 -0
- package/src/Prebuilt/components/Leave/LeaveCard.tsx +36 -0
- package/src/Prebuilt/components/Leave/LeaveRoom.tsx +66 -0
- package/src/Prebuilt/components/{LeaveSessionContent.jsx → Leave/LeaveSessionContent.tsx} +20 -6
- package/src/Prebuilt/components/{MoreSettings/SplitComponents/MwebLeaveRoom.jsx → Leave/MwebLeaveRoom.tsx} +43 -18
- package/src/Prebuilt/components/MetaActions.jsx +15 -23
- package/src/Prebuilt/components/MoreSettings/ActionTile.jsx +5 -0
- package/src/Prebuilt/components/MoreSettings/ChangeNameContent.jsx +16 -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.tsx +216 -0
- package/src/Prebuilt/components/MoreSettings/SplitComponents/{MwebOptions.jsx → MwebOptions.tsx} +107 -45
- package/src/Prebuilt/components/Notifications/HLSFailureModal.jsx +3 -1
- package/src/Prebuilt/components/Notifications/Notifications.jsx +46 -30
- package/src/Prebuilt/components/Notifications/PeerNotifications.jsx +14 -2
- package/src/Prebuilt/components/Notifications/PermissionErrorModal.jsx +10 -4
- package/src/Prebuilt/components/Notifications/ReconnectNotifications.jsx +5 -11
- package/src/Prebuilt/components/PIP/PIPComponent.jsx +7 -16
- package/src/Prebuilt/components/PIP/PIPManager.js +1 -0
- package/src/Prebuilt/components/Pagination.tsx +60 -0
- package/src/Prebuilt/components/Playlist/Playlist.jsx +1 -6
- package/src/Prebuilt/components/PostLeave.jsx +7 -7
- package/src/Prebuilt/components/Preview/{PreviewContainer.jsx → PreviewContainer.tsx} +16 -15
- package/src/Prebuilt/components/Preview/{PreviewForm.jsx → PreviewForm.tsx} +16 -8
- package/src/Prebuilt/components/Preview/{PreviewJoin.jsx → PreviewJoin.tsx} +48 -22
- package/src/Prebuilt/components/RaiseHand.jsx +0 -7
- package/src/Prebuilt/components/RoleChangeRequestModal.tsx +119 -0
- package/src/Prebuilt/components/ScreenshareDisplay.jsx +4 -10
- package/src/Prebuilt/components/ScreenshareTile.jsx +43 -36
- package/src/Prebuilt/components/SecondaryTiles.tsx +36 -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 +16 -17
- package/src/Prebuilt/components/TileMenu/TileMenuContent.jsx +33 -27
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +58 -15
- package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +65 -0
- package/src/Prebuilt/components/VideoLayouts/Grid.tsx +43 -0
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +110 -0
- package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +74 -0
- package/src/Prebuilt/components/VideoLayouts/RoleProminence.tsx +59 -0
- package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +52 -0
- package/src/Prebuilt/components/VideoLayouts/interface.ts +10 -0
- package/src/Prebuilt/components/VideoTile.jsx +116 -74
- package/src/Prebuilt/components/conference.jsx +86 -85
- package/src/Prebuilt/components/hooks/useAutoStartStreaming.tsx +57 -0
- package/src/Prebuilt/components/hooks/useMetadata.jsx +19 -3
- package/src/Prebuilt/components/hooks/useRedirectToLeave.tsx +34 -0
- package/src/Prebuilt/components/hooks/useRoleProminencePeers.tsx +38 -0
- package/src/Prebuilt/components/hooks/useTileLayout.tsx +127 -0
- package/src/Prebuilt/components/hooks/useVideoTileLayout.ts +26 -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 -50
- package/src/Prebuilt/layouts/HLSView.jsx +138 -51
- package/src/Prebuilt/layouts/PDFView.jsx +1 -11
- package/src/Prebuilt/layouts/SidePane.tsx +108 -0
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +96 -0
- package/src/Prebuilt/layouts/WhiteboardView.jsx +10 -34
- package/src/Prebuilt/plugins/FlyingEmoji.jsx +14 -2
- 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/src/Prebuilt/services/FeatureFlags.jsx +0 -1
- package/src/VideoTile/StyledVideoTile.tsx +1 -0
- package/dist/HLSView-P57IRMAR.js.map +0 -7
- package/dist/PinnedTrackView-4FYJEBTB.js +0 -102
- package/dist/PinnedTrackView-4FYJEBTB.js.map +0 -7
- package/dist/VirtualBackground-GGCQJ5JM.js.map +0 -7
- package/dist/chunk-IVTWKQI3.js +0 -827
- package/dist/chunk-IVTWKQI3.js.map +0 -7
- package/dist/chunk-OSM4QEQG.js.map +0 -7
- package/dist/chunk-P5X32KOD.js.map +0 -7
- package/dist/chunk-RVCZPPTL.js +0 -1100
- package/dist/chunk-RVCZPPTL.js.map +0 -7
- package/dist/conference-P6I6ESVF.js +0 -8995
- package/dist/conference-P6I6ESVF.js.map +0 -7
- package/src/Prebuilt/components/AudioLevel/BeamSpeakerLabelsLogging.jsx +0 -16
- package/src/Prebuilt/components/Chat/ChatFooter.jsx +0 -150
- package/src/Prebuilt/components/Chat/ChatHeader.jsx +0 -67
- package/src/Prebuilt/components/Connection/TileConnection.jsx +0 -39
- 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/LeaveCard.jsx +0 -19
- package/src/Prebuilt/components/LeaveRoom.jsx +0 -94
- package/src/Prebuilt/components/MoreSettings/MoreSettings.jsx +0 -10
- package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.jsx +0 -219
- package/src/Prebuilt/components/Notifications/MessageNotifications.jsx +0 -25
- package/src/Prebuilt/components/Pagination.jsx +0 -29
- package/src/Prebuilt/components/RoleChangeRequestModal.jsx +0 -26
- package/src/Prebuilt/components/VideoList.jsx +0 -73
- 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/mainView.jsx +0 -141
- 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
@@ -0,0 +1,36 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Box, Flex } from '../../../Layout';
|
3
|
+
import { Text } from '../../../Text';
|
4
|
+
import { CSS } from '../../../Theme';
|
5
|
+
|
6
|
+
export const LeaveCard = ({
|
7
|
+
icon,
|
8
|
+
title,
|
9
|
+
subtitle,
|
10
|
+
onClick,
|
11
|
+
bg,
|
12
|
+
titleColor,
|
13
|
+
css = {},
|
14
|
+
}: {
|
15
|
+
icon: React.JSX.Element;
|
16
|
+
title: string;
|
17
|
+
subtitle: string;
|
18
|
+
onClick: () => void;
|
19
|
+
titleColor: string;
|
20
|
+
bg: string;
|
21
|
+
css?: CSS;
|
22
|
+
}) => {
|
23
|
+
return (
|
24
|
+
<Flex css={{ p: '$10', flexGrow: 1, gap: '$8', bg, ...css }} onClick={onClick}>
|
25
|
+
<Box css={{ color: titleColor }}>{icon}</Box>
|
26
|
+
<Box css={{ gap: '$2' }}>
|
27
|
+
<Text variant="lg" css={{ color: titleColor }}>
|
28
|
+
{title}
|
29
|
+
</Text>
|
30
|
+
<Text variant="sm" css={{ c: 'inherit' }}>
|
31
|
+
{subtitle}
|
32
|
+
</Text>
|
33
|
+
</Box>
|
34
|
+
</Flex>
|
35
|
+
);
|
36
|
+
};
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { useMedia } from 'react-use';
|
3
|
+
import { ConferencingScreen } from '@100mslive/types-prebuilt';
|
4
|
+
import {
|
5
|
+
HMSPeer,
|
6
|
+
HMSRole,
|
7
|
+
selectHLSState,
|
8
|
+
selectIsConnectedToRoom,
|
9
|
+
selectPeersByCondition,
|
10
|
+
selectPermissions,
|
11
|
+
selectRolesMap,
|
12
|
+
useHMSActions,
|
13
|
+
useHMSStore,
|
14
|
+
} from '@100mslive/react-sdk';
|
15
|
+
import { config as cssConfig } from '../../../Theme';
|
16
|
+
// @ts-ignore: No implicit Any
|
17
|
+
// @ts-ignore: No implicit Any
|
18
|
+
import { ToastManager } from '../Toast/ToastManager';
|
19
|
+
import { DesktopLeaveRoom } from './DesktopLeaveRoom';
|
20
|
+
import { MwebLeaveRoom } from './MwebLeaveRoom';
|
21
|
+
import { useRedirectToLeave } from '../hooks/useRedirectToLeave';
|
22
|
+
|
23
|
+
export const LeaveRoom = ({ screenType }: { screenType: keyof ConferencingScreen }) => {
|
24
|
+
const isConnected = useHMSStore(selectIsConnectedToRoom);
|
25
|
+
const permissions = useHMSStore(selectPermissions);
|
26
|
+
const isMobile = useMedia(cssConfig.media.md);
|
27
|
+
const rolesMap: Record<string, HMSRole> = useHMSStore(selectRolesMap);
|
28
|
+
const streamingPermissionRoles = Object.keys(rolesMap).filter(roleName => {
|
29
|
+
const roleObj = rolesMap[roleName];
|
30
|
+
return roleObj.permissions.hlsStreaming;
|
31
|
+
});
|
32
|
+
const peersWithStreamingRights = useHMSStore(
|
33
|
+
selectPeersByCondition((peer: HMSPeer) => streamingPermissionRoles.includes(peer.roleName || '')),
|
34
|
+
);
|
35
|
+
const hlsState = useHMSStore(selectHLSState);
|
36
|
+
const hmsActions = useHMSActions();
|
37
|
+
const { redirectToLeave } = useRedirectToLeave();
|
38
|
+
|
39
|
+
const stopStream = async () => {
|
40
|
+
try {
|
41
|
+
console.log('Stopping HLS stream');
|
42
|
+
await hmsActions.stopHLSStreaming();
|
43
|
+
ToastManager.addToast({ title: 'Stopping the stream' });
|
44
|
+
} catch (e) {
|
45
|
+
console.error('Error stopping stream', e);
|
46
|
+
ToastManager.addToast({ title: 'Error in stopping the stream', type: 'error' });
|
47
|
+
}
|
48
|
+
};
|
49
|
+
|
50
|
+
const leaveRoom = async ({ endstream = false }) => {
|
51
|
+
if (endstream || (hlsState.running && peersWithStreamingRights.length === 1)) {
|
52
|
+
await stopStream();
|
53
|
+
}
|
54
|
+
hmsActions.leave();
|
55
|
+
redirectToLeave();
|
56
|
+
};
|
57
|
+
|
58
|
+
if (!permissions || !isConnected) {
|
59
|
+
return null;
|
60
|
+
}
|
61
|
+
return isMobile ? (
|
62
|
+
<MwebLeaveRoom leaveRoom={leaveRoom} screenType={screenType} />
|
63
|
+
) : (
|
64
|
+
<DesktopLeaveRoom leaveRoom={leaveRoom} screenType={screenType} />
|
65
|
+
);
|
66
|
+
};
|
@@ -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: (args: { endstream: boolean }) => 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' }}>
|
@@ -36,7 +44,13 @@ export const LeaveSessionContent = ({ setShowLeaveRoomAlert, leaveRoom, isModal
|
|
36
44
|
>
|
37
45
|
Cancel
|
38
46
|
</Button>
|
39
|
-
<Button
|
47
|
+
<Button
|
48
|
+
variant="danger"
|
49
|
+
css={{ w: '100%' }}
|
50
|
+
onClick={() => leaveRoom({ endstream: false })}
|
51
|
+
id="leaveRoom"
|
52
|
+
data-testid="leave_room"
|
53
|
+
>
|
40
54
|
Leave Session
|
41
55
|
</Button>
|
42
56
|
</Flex>
|
@@ -1,24 +1,34 @@
|
|
1
1
|
import React, { Fragment, useState } from 'react';
|
2
|
+
import { ConferencingScreen } from '@100mslive/types-prebuilt';
|
3
|
+
// @ts-ignore: No implicit Any
|
2
4
|
import { selectIsConnectedToRoom, selectPermissions, useHMSStore, useRecordingStreaming } from '@100mslive/react-sdk';
|
5
|
+
// @ts-ignore: No implicit Any
|
3
6
|
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 {
|
7
|
+
import { Box } from '../../../Layout';
|
8
|
+
import { Sheet } from '../../../Sheet';
|
9
|
+
import { Tooltip } from '../../../Tooltip';
|
10
|
+
import { EndSessionContent } from './EndSessionContent';
|
11
|
+
import { LeaveIconButton } from './LeaveAtoms';
|
12
|
+
import { LeaveCard } from './LeaveCard';
|
13
|
+
import { LeaveSessionContent } from './LeaveSessionContent';
|
14
|
+
// @ts-ignore: No implicit Any
|
15
|
+
import { useDropdownList } from '../hooks/useDropdownList';
|
11
16
|
|
12
|
-
export const MwebLeaveRoom = ({
|
17
|
+
export const MwebLeaveRoom = ({
|
18
|
+
leaveRoom,
|
19
|
+
screenType,
|
20
|
+
}: {
|
21
|
+
leaveRoom: (args: { endstream: boolean }) => 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={{
|
@@ -54,10 +63,9 @@ export const MwebLeaveRoom = ({ leaveIconButton: LeaveIconButton, leaveRoom, sto
|
|
54
63
|
} again.`}
|
55
64
|
bg="$surface_default"
|
56
65
|
titleColor="$on_surface_high"
|
57
|
-
subtitleColor="$on_surface_low"
|
58
66
|
icon={<ExitIcon height={24} width={24} style={{ transform: 'rotate(180deg)' }} />}
|
59
|
-
onClick={leaveRoom}
|
60
|
-
css={{ pt: 0, mt: '$10' }}
|
67
|
+
onClick={() => leaveRoom({ endstream: false })}
|
68
|
+
css={{ pt: 0, mt: '$10', color: '$on_surface_low', '&:hover': { color: '$on_surface_high' } }}
|
61
69
|
/>
|
62
70
|
{isStreamingOn && permissions?.hlsStreaming ? (
|
63
71
|
<LeaveCard
|
@@ -67,7 +75,7 @@ export const MwebLeaveRoom = ({ leaveIconButton: LeaveIconButton, leaveRoom, sto
|
|
67
75
|
} for everyone. You can't undo this action.`}
|
68
76
|
bg="$alert_error_dim"
|
69
77
|
titleColor="$alert_error_brighter"
|
70
|
-
|
78
|
+
css={{ color: '$alert_error_bright', '&:hover': { color: '$alert_error_brighter' } }}
|
71
79
|
icon={<StopIcon height={24} width={24} />}
|
72
80
|
onClick={() => {
|
73
81
|
setOpen(false);
|
@@ -78,7 +86,17 @@ export const MwebLeaveRoom = ({ leaveIconButton: LeaveIconButton, leaveRoom, sto
|
|
78
86
|
</Sheet.Content>
|
79
87
|
</Sheet.Root>
|
80
88
|
) : (
|
81
|
-
<LeaveIconButton
|
89
|
+
<LeaveIconButton
|
90
|
+
key="LeaveRoom"
|
91
|
+
data-testid="leave_room_btn"
|
92
|
+
onClick={() => {
|
93
|
+
if (screenType === 'hls_live_streaming') {
|
94
|
+
setShowLeaveRoomAlert(true);
|
95
|
+
} else {
|
96
|
+
leaveRoom({ endstream: false });
|
97
|
+
}
|
98
|
+
}}
|
99
|
+
>
|
82
100
|
<Tooltip title="Leave Room">
|
83
101
|
<Box>
|
84
102
|
<ExitIcon style={{ transform: 'rotate(180deg)' }} />
|
@@ -90,11 +108,18 @@ export const MwebLeaveRoom = ({ leaveIconButton: LeaveIconButton, leaveRoom, sto
|
|
90
108
|
<Sheet.Content css={{ bg: '$surface_dim', p: '$10', pb: '$12' }}>
|
91
109
|
<EndSessionContent
|
92
110
|
setShowEndStreamAlert={setShowEndStreamAlert}
|
93
|
-
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,28 @@ export const ChangeNameContent = ({
|
|
27
27
|
color: '$on_surface_high',
|
28
28
|
fontWeight: '$semiBold',
|
29
29
|
display: 'flex',
|
30
|
-
|
31
|
-
|
32
|
-
mb: '$8',
|
33
|
-
px: isMobile ? '$8' : '',
|
30
|
+
pb: '$4',
|
31
|
+
'@md': { px: '$8', borderBottom: '1px solid $border_default' },
|
34
32
|
}}
|
35
33
|
>
|
36
34
|
{isMobile ? <ChevronLeftIcon onClick={onBackClick} style={{ marginRight: '0.5rem' }} /> : null}
|
37
35
|
Change Name
|
38
|
-
<Box
|
36
|
+
<Box
|
37
|
+
css={{ color: 'inherit', ml: 'auto', '&:hover': { color: '$on_surface_medium', cursor: 'pointer' } }}
|
38
|
+
onClick={onExit}
|
39
|
+
>
|
39
40
|
<CrossIcon />
|
40
41
|
</Box>
|
41
42
|
</Text>
|
42
|
-
<
|
43
|
+
<Text variant="sm" css={{ color: '$on_surface_medium', pb: '$6', mb: '$8', '@md': { px: '$8', mt: '$4' } }}>
|
44
|
+
Your name will be visible to other participants in the session.
|
45
|
+
</Text>
|
46
|
+
<Flex justify="center" align="center" css={{ my: '$8', w: '100%', '@md': { px: '$8' } }}>
|
43
47
|
<Input
|
44
48
|
css={{ width: '100%', bg: '$surface_default' }}
|
45
49
|
value={currentName}
|
50
|
+
// Prevents popup from showing up on chrome mweb
|
51
|
+
type={isMobile ? 'search' : 'text'}
|
46
52
|
onChange={e => {
|
47
53
|
setCurrentName(e.target.value);
|
48
54
|
}}
|
@@ -52,6 +58,9 @@ export const ChangeNameContent = ({
|
|
52
58
|
onKeyDown={async e => {
|
53
59
|
if (e.key === 'Enter' && currentName.trim().length > 0 && currentName !== localPeerName) {
|
54
60
|
e.preventDefault();
|
61
|
+
if (isMobile) {
|
62
|
+
return;
|
63
|
+
}
|
55
64
|
changeName();
|
56
65
|
}
|
57
66
|
}}
|
@@ -65,7 +74,7 @@ export const ChangeNameContent = ({
|
|
65
74
|
width: '100%',
|
66
75
|
gap: '$md',
|
67
76
|
mt: '$10',
|
68
|
-
|
77
|
+
'@md': { px: '$4' },
|
69
78
|
}}
|
70
79
|
>
|
71
80
|
{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} screenType={screenType} />
|
24
|
+
) : (
|
25
|
+
<DesktopOptions elements={elements} screenType={screenType} />
|
26
|
+
);
|
27
|
+
};
|
@@ -0,0 +1,216 @@
|
|
1
|
+
import React, { Fragment, useState } from 'react';
|
2
|
+
import { HMSHLSPlayer } from '@100mslive/hls-player';
|
3
|
+
import {
|
4
|
+
ConferencingScreen,
|
5
|
+
DefaultConferencingScreen_Elements,
|
6
|
+
HLSLiveStreamingScreen_Elements,
|
7
|
+
} from '@100mslive/types-prebuilt';
|
8
|
+
import { selectAppData, selectLocalPeerID, useHMSActions, useHMSStore } from '@100mslive/react-sdk';
|
9
|
+
import { BrbIcon, CheckIcon, DragHandleIcon, InfoIcon, PipIcon, SettingsIcon } from '@100mslive/react-icons';
|
10
|
+
import { Checkbox, Dropdown, Flex, Text, Tooltip } from '../../../..';
|
11
|
+
// @ts-ignore: No implicit any
|
12
|
+
import IconButton from '../../../IconButton';
|
13
|
+
// @ts-ignore: No implicit any
|
14
|
+
import { PIP } from '../../PIP';
|
15
|
+
// @ts-ignore: No implicit any
|
16
|
+
import { PictureInPicture } from '../../PIP/PIPManager';
|
17
|
+
// @ts-ignore: No implicit any
|
18
|
+
import { RoleChangeModal } from '../../RoleChangeModal';
|
19
|
+
// @ts-ignore: No implicit any
|
20
|
+
import SettingsModal from '../../Settings/SettingsModal';
|
21
|
+
// @ts-ignore: No implicit any
|
22
|
+
import StartRecording from '../../Settings/StartRecording';
|
23
|
+
// @ts-ignore: No implicit any
|
24
|
+
import { StatsForNerds } from '../../StatsForNerds';
|
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
|
32
|
+
import { useDropdownList } from '../../hooks/useDropdownList';
|
33
|
+
// @ts-ignore: No implicit any
|
34
|
+
import { useMyMetadata } from '../../hooks/useMetadata';
|
35
|
+
// @ts-ignore: No implicit any
|
36
|
+
import { APP_DATA, isMacOS } from '../../../common/constants';
|
37
|
+
|
38
|
+
const MODALS = {
|
39
|
+
CHANGE_NAME: 'changeName',
|
40
|
+
SELF_ROLE_CHANGE: 'selfRoleChange',
|
41
|
+
MORE_SETTINGS: 'moreSettings',
|
42
|
+
START_RECORDING: 'startRecording',
|
43
|
+
DEVICE_SETTINGS: 'deviceSettings',
|
44
|
+
STATS_FOR_NERDS: 'statsForNerds',
|
45
|
+
BULK_ROLE_CHANGE: 'bulkRoleChange',
|
46
|
+
MUTE_ALL: 'muteAll',
|
47
|
+
EMBED_URL: 'embedUrl',
|
48
|
+
};
|
49
|
+
|
50
|
+
export const DesktopOptions = ({
|
51
|
+
elements,
|
52
|
+
screenType,
|
53
|
+
}: {
|
54
|
+
elements: DefaultConferencingScreen_Elements & HLSLiveStreamingScreen_Elements;
|
55
|
+
screenType: keyof ConferencingScreen;
|
56
|
+
}) => {
|
57
|
+
const localPeerId = useHMSStore(selectLocalPeerID);
|
58
|
+
const hmsActions = useHMSActions();
|
59
|
+
const enablHlsStats = useHMSStore(selectAppData(APP_DATA.hlsStats));
|
60
|
+
const [openModals, setOpenModals] = useState(new Set());
|
61
|
+
const { isBRBOn, toggleBRB } = useMyMetadata();
|
62
|
+
const isPipOn = PictureInPicture.isOn();
|
63
|
+
const isBRBEnabled = !!elements?.brb;
|
64
|
+
|
65
|
+
useDropdownList({ open: openModals.size > 0, name: 'MoreSettings' });
|
66
|
+
|
67
|
+
const updateState = (modalName: string, value: boolean) => {
|
68
|
+
setOpenModals(modals => {
|
69
|
+
const copy = new Set(modals);
|
70
|
+
if (value) {
|
71
|
+
// avoiding extra set state trigger which removes currently open dialog by clearing set.
|
72
|
+
copy.clear();
|
73
|
+
copy.add(modalName);
|
74
|
+
} else {
|
75
|
+
copy.delete(modalName);
|
76
|
+
}
|
77
|
+
return copy;
|
78
|
+
});
|
79
|
+
};
|
80
|
+
|
81
|
+
return (
|
82
|
+
<Fragment>
|
83
|
+
<Dropdown.Root
|
84
|
+
open={openModals.has(MODALS.MORE_SETTINGS)}
|
85
|
+
onOpenChange={value => updateState(MODALS.MORE_SETTINGS, value)}
|
86
|
+
modal={false}
|
87
|
+
>
|
88
|
+
<Tooltip title="More options">
|
89
|
+
<Dropdown.Trigger asChild data-testid="more_settings_btn">
|
90
|
+
<IconButton>
|
91
|
+
<DragHandleIcon />
|
92
|
+
</IconButton>
|
93
|
+
</Dropdown.Trigger>
|
94
|
+
</Tooltip>
|
95
|
+
|
96
|
+
<Dropdown.Content
|
97
|
+
sideOffset={5}
|
98
|
+
align="end"
|
99
|
+
css={{
|
100
|
+
py: '$0',
|
101
|
+
maxHeight: 'unset',
|
102
|
+
'@md': { w: '$64' },
|
103
|
+
"div[role='separator']:first-child": {
|
104
|
+
display: 'none',
|
105
|
+
},
|
106
|
+
}}
|
107
|
+
>
|
108
|
+
{isBRBEnabled && screenType !== 'hls_live_streaming' ? (
|
109
|
+
<Dropdown.Item onClick={toggleBRB} data-testid="brb_btn">
|
110
|
+
<BrbIcon />
|
111
|
+
<Text variant="sm" css={{ ml: '$4', color: '$on_surface_high' }}>
|
112
|
+
Be Right Back
|
113
|
+
</Text>
|
114
|
+
<Flex justify="end" css={{ color: '$on_surface_high', flexGrow: '1' }}>
|
115
|
+
{isBRBOn ? <CheckIcon /> : null}
|
116
|
+
</Flex>
|
117
|
+
</Dropdown.Item>
|
118
|
+
) : null}
|
119
|
+
|
120
|
+
{screenType !== 'hls_live_streaming' ? (
|
121
|
+
<Dropdown.Item>
|
122
|
+
<PIP
|
123
|
+
content={
|
124
|
+
<Flex css={{ w: '100%' }}>
|
125
|
+
<PipIcon />
|
126
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
127
|
+
{isPipOn ? 'Disable' : 'Enable'} Picture-in-Picture
|
128
|
+
</Text>
|
129
|
+
</Flex>
|
130
|
+
}
|
131
|
+
/>
|
132
|
+
</Dropdown.Item>
|
133
|
+
) : null}
|
134
|
+
|
135
|
+
<FullScreenItem />
|
136
|
+
{/* {isAllowedToPublish.screen && isEmbedEnabled && (
|
137
|
+
<EmbedUrl setShowOpenUrl={() => updateState(MODALS.EMBED_URL, true)} />
|
138
|
+
)} */}
|
139
|
+
|
140
|
+
<Dropdown.ItemSeparator css={{ mx: 0 }} />
|
141
|
+
|
142
|
+
<Dropdown.Item onClick={() => updateState(MODALS.DEVICE_SETTINGS, true)} data-testid="device_settings_btn">
|
143
|
+
<SettingsIcon />
|
144
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
145
|
+
Settings
|
146
|
+
</Text>
|
147
|
+
</Dropdown.Item>
|
148
|
+
|
149
|
+
{screenType === 'hls_live_streaming' ? (
|
150
|
+
HMSHLSPlayer.isSupported() ? (
|
151
|
+
<Dropdown.Item
|
152
|
+
onClick={() => hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats)}
|
153
|
+
data-testid="hls_stats"
|
154
|
+
>
|
155
|
+
<Checkbox.Root
|
156
|
+
css={{ margin: '$2' }}
|
157
|
+
checked={enablHlsStats}
|
158
|
+
onCheckedChange={() => hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats)}
|
159
|
+
>
|
160
|
+
<Checkbox.Indicator>
|
161
|
+
<CheckIcon width={16} height={16} />
|
162
|
+
</Checkbox.Indicator>
|
163
|
+
</Checkbox.Root>
|
164
|
+
<Flex justify="between" css={{ width: '100%' }}>
|
165
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
166
|
+
Show HLS Stats
|
167
|
+
</Text>
|
168
|
+
|
169
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
170
|
+
{`${isMacOS ? '⌘' : 'ctrl'} + ]`}
|
171
|
+
</Text>
|
172
|
+
</Flex>
|
173
|
+
</Dropdown.Item>
|
174
|
+
) : null
|
175
|
+
) : (
|
176
|
+
<Dropdown.Item onClick={() => updateState(MODALS.STATS_FOR_NERDS, true)} data-testid="stats_for_nreds_btn">
|
177
|
+
<InfoIcon />
|
178
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
179
|
+
Stats for Nerds
|
180
|
+
</Text>
|
181
|
+
</Dropdown.Item>
|
182
|
+
)}
|
183
|
+
</Dropdown.Content>
|
184
|
+
</Dropdown.Root>
|
185
|
+
{openModals.has(MODALS.BULK_ROLE_CHANGE) && (
|
186
|
+
<BulkRoleChangeModal onOpenChange={(value: boolean) => updateState(MODALS.BULK_ROLE_CHANGE, value)} />
|
187
|
+
)}
|
188
|
+
{openModals.has(MODALS.MUTE_ALL) && (
|
189
|
+
<MuteAllModal onOpenChange={(value: boolean) => updateState(MODALS.MUTE_ALL, value)} />
|
190
|
+
)}
|
191
|
+
|
192
|
+
{openModals.has(MODALS.START_RECORDING) && (
|
193
|
+
<StartRecording open onOpenChange={(value: boolean) => updateState(MODALS.START_RECORDING, value)} />
|
194
|
+
)}
|
195
|
+
{openModals.has(MODALS.DEVICE_SETTINGS) && (
|
196
|
+
<SettingsModal
|
197
|
+
open
|
198
|
+
onOpenChange={(value: boolean) => updateState(MODALS.DEVICE_SETTINGS, value)}
|
199
|
+
screenType={screenType}
|
200
|
+
/>
|
201
|
+
)}
|
202
|
+
{openModals.has(MODALS.STATS_FOR_NERDS) && (
|
203
|
+
<StatsForNerds open onOpenChange={(value: boolean) => updateState(MODALS.STATS_FOR_NERDS, value)} />
|
204
|
+
)}
|
205
|
+
{openModals.has(MODALS.SELF_ROLE_CHANGE) && (
|
206
|
+
<RoleChangeModal
|
207
|
+
peerId={localPeerId}
|
208
|
+
onOpenChange={(value: boolean) => updateState(MODALS.SELF_ROLE_CHANGE, value)}
|
209
|
+
/>
|
210
|
+
)}
|
211
|
+
{/* {openModals.has(MODALS.EMBED_URL) && (
|
212
|
+
<EmbedUrlModal onOpenChange={value => updateState(MODALS.EMBED_URL, value)} />
|
213
|
+
)} */}
|
214
|
+
</Fragment>
|
215
|
+
);
|
216
|
+
};
|