@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.
Files changed (232) hide show
  1. package/dist/{HLSView-P57IRMAR.js → HLSView-HNVYG5VE.js} +309 -151
  2. package/dist/HLSView-HNVYG5VE.js.map +7 -0
  3. package/dist/Prebuilt/App.d.ts +3 -0
  4. package/dist/Prebuilt/AppContext.d.ts +13 -0
  5. package/dist/Prebuilt/common/PeersSorter.d.ts +21 -0
  6. package/dist/Prebuilt/components/Chat/ChatFooter.d.ts +7 -0
  7. package/dist/Prebuilt/components/Connection/ConnectionIndicator.d.ts +6 -0
  8. package/dist/Prebuilt/components/Connection/TileConnection.d.ts +10 -0
  9. package/dist/Prebuilt/components/Footer/ChatToggle.d.ts +4 -0
  10. package/dist/Prebuilt/components/Footer/Footer.d.ts +6 -0
  11. package/dist/Prebuilt/components/Footer/RoleAccordion.d.ts +14 -0
  12. package/dist/Prebuilt/components/Footer/RoleOptions.d.ts +6 -0
  13. package/dist/Prebuilt/components/Header/Header.d.ts +2 -0
  14. package/dist/Prebuilt/components/Header/StreamActions.d.ts +11 -0
  15. package/dist/Prebuilt/components/InsetTile.d.ts +2 -0
  16. package/dist/Prebuilt/components/Leave/DesktopLeaveRoom.d.ts +8 -0
  17. package/dist/Prebuilt/components/Leave/EndSessionContent.d.ts +9 -0
  18. package/dist/Prebuilt/components/Leave/LeaveAtoms.d.ts +2196 -0
  19. package/dist/Prebuilt/components/Leave/LeaveCard.d.ts +11 -0
  20. package/dist/Prebuilt/components/Leave/LeaveRoom.d.ts +5 -0
  21. package/dist/Prebuilt/components/Leave/LeaveSessionContent.d.ts +8 -0
  22. package/dist/Prebuilt/components/Leave/MwebLeaveRoom.d.ts +8 -0
  23. package/dist/Prebuilt/components/MoreSettings/MoreSettings.d.ts +6 -0
  24. package/dist/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.d.ts +6 -0
  25. package/dist/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.d.ts +6 -0
  26. package/dist/Prebuilt/components/Pagination.d.ts +6 -0
  27. package/dist/Prebuilt/components/Preview/PreviewContainer.d.ts +3 -0
  28. package/dist/Prebuilt/components/Preview/PreviewForm.d.ts +10 -0
  29. package/dist/Prebuilt/components/Preview/PreviewJoin.d.ts +16 -0
  30. package/dist/Prebuilt/components/RoleChangeRequestModal.d.ts +2 -0
  31. package/dist/Prebuilt/components/SecondaryTiles.d.ts +3 -0
  32. package/dist/Prebuilt/components/VideoLayouts/EqualProminence.d.ts +3 -0
  33. package/dist/Prebuilt/components/VideoLayouts/Grid.d.ts +6 -0
  34. package/dist/Prebuilt/components/VideoLayouts/GridLayout.d.ts +12 -0
  35. package/dist/Prebuilt/components/VideoLayouts/ProminenceLayout.d.ts +15 -0
  36. package/dist/Prebuilt/components/VideoLayouts/RoleProminence.d.ts +3 -0
  37. package/dist/Prebuilt/components/VideoLayouts/ScreenshareLayout.d.ts +3 -0
  38. package/dist/Prebuilt/components/VideoLayouts/interface.d.ts +9 -0
  39. package/dist/Prebuilt/components/hooks/useAutoStartStreaming.d.ts +1 -0
  40. package/dist/Prebuilt/components/hooks/useRedirectToLeave.d.ts +3 -0
  41. package/dist/Prebuilt/components/hooks/useRoleProminencePeers.d.ts +5 -0
  42. package/dist/Prebuilt/components/hooks/useTileLayout.d.ts +13 -0
  43. package/dist/Prebuilt/components/hooks/useVideoTileLayout.d.ts +13 -0
  44. package/dist/Prebuilt/layouts/SidePane.d.ts +9 -0
  45. package/dist/Prebuilt/layouts/VideoStreamingSection.d.ts +7 -0
  46. package/dist/Prebuilt/plugins/whiteboard/ToggleWhiteboard.d.ts +5 -0
  47. package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.d.ts +1 -0
  48. package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.d.ts +1 -0
  49. package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.d.ts +17 -0
  50. package/dist/Prebuilt/provider/roomLayoutProvider/index.d.ts +6 -1
  51. package/dist/{VirtualBackground-GGCQJ5JM.js → VirtualBackground-UM2FOUHQ.js} +5 -11
  52. package/dist/VirtualBackground-UM2FOUHQ.js.map +7 -0
  53. package/dist/{chunk-P5X32KOD.js → chunk-364HP22I.js} +8 -5
  54. package/dist/chunk-364HP22I.js.map +7 -0
  55. package/dist/{chunk-OSM4QEQG.js → chunk-LYSAET4G.js} +3742 -5462
  56. package/dist/chunk-LYSAET4G.js.map +7 -0
  57. package/dist/chunk-POE7H4IE.js +898 -0
  58. package/dist/chunk-POE7H4IE.js.map +7 -0
  59. package/dist/conference-UWLJHMB2.js +5727 -0
  60. package/dist/conference-UWLJHMB2.js.map +7 -0
  61. package/dist/index.cjs.js +9655 -15326
  62. package/dist/index.cjs.js.map +4 -4
  63. package/dist/index.js +2 -2
  64. package/dist/meta.cjs.json +2513 -3456
  65. package/dist/meta.esbuild.json +2807 -3838
  66. package/package.json +8 -7
  67. package/src/Button/Button.tsx +2 -2
  68. package/src/Prebuilt/App.tsx +58 -53
  69. package/src/Prebuilt/{AppContext.jsx → AppContext.tsx} +11 -3
  70. package/src/Prebuilt/IconButton.jsx +11 -0
  71. package/src/Prebuilt/Prebuilt.stories.tsx +1 -0
  72. package/src/Prebuilt/common/{PeersSorter.js → PeersSorter.ts} +16 -11
  73. package/src/Prebuilt/common/constants.js +4 -114
  74. package/src/Prebuilt/common/hooks.js +34 -1
  75. package/src/Prebuilt/common/utils.js +1 -9
  76. package/src/Prebuilt/components/AppData/AppData.jsx +11 -15
  77. package/src/Prebuilt/components/AppData/useUISettings.js +6 -10
  78. package/src/Prebuilt/components/AudioVideoToggle.jsx +10 -2
  79. package/src/Prebuilt/components/AuthToken.jsx +11 -42
  80. package/src/Prebuilt/components/Chat/Chat.jsx +75 -27
  81. package/src/Prebuilt/components/Chat/ChatBody.jsx +95 -36
  82. package/src/Prebuilt/components/Chat/ChatFooter.tsx +199 -0
  83. package/src/Prebuilt/components/Chat/ChatParticipantHeader.jsx +84 -0
  84. package/src/Prebuilt/components/Chat/ChatSelector.jsx +16 -17
  85. package/src/Prebuilt/components/Chat/ChatSelectorContainer.jsx +81 -0
  86. package/src/Prebuilt/components/Chat/useEmojiPickerStyles.js +5 -4
  87. package/src/Prebuilt/components/Connection/{ConnectionIndicator.jsx → ConnectionIndicator.tsx} +12 -4
  88. package/src/Prebuilt/components/Connection/TileConnection.tsx +71 -0
  89. package/src/Prebuilt/components/EmojiReaction.jsx +19 -22
  90. package/src/Prebuilt/components/Footer/{ChatToggle.jsx → ChatToggle.tsx} +13 -9
  91. package/src/Prebuilt/components/Footer/Footer.tsx +98 -0
  92. package/src/Prebuilt/components/Footer/ParticipantList.jsx +187 -179
  93. package/src/Prebuilt/components/Footer/RoleAccordion.tsx +94 -0
  94. package/src/Prebuilt/components/Footer/RoleOptions.tsx +155 -0
  95. package/src/Prebuilt/components/FullPageProgress.jsx +3 -3
  96. package/src/Prebuilt/components/HMSVideo/Controls.jsx +3 -2
  97. package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx +63 -18
  98. package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +2 -2
  99. package/src/Prebuilt/components/HMSVideo/PlayButton.jsx +1 -1
  100. package/src/Prebuilt/components/HMSVideo/VideoProgress.jsx +5 -6
  101. package/src/Prebuilt/components/HMSVideo/VideoTime.jsx +3 -3
  102. package/src/Prebuilt/components/HMSVideo/VolumeControl.jsx +38 -9
  103. package/src/Prebuilt/components/Header/{ConferencingHeader.jsx → Header.tsx} +9 -7
  104. package/src/Prebuilt/components/Header/HeaderComponents.jsx +13 -4
  105. package/src/Prebuilt/components/Header/{StreamActions.jsx → StreamActions.tsx} +54 -67
  106. package/src/Prebuilt/components/Header/common.jsx +5 -2
  107. package/src/Prebuilt/components/Header/index.tsx +1 -0
  108. package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +23 -4
  109. package/src/Prebuilt/components/InsetTile.tsx +128 -0
  110. package/src/Prebuilt/components/{MoreSettings/SplitComponents/DesktopLeaveRoom.jsx → Leave/DesktopLeaveRoom.tsx} +67 -25
  111. package/src/Prebuilt/components/{EndSessionContent.jsx → Leave/EndSessionContent.tsx} +18 -11
  112. package/src/Prebuilt/components/Leave/LeaveAtoms.tsx +26 -0
  113. package/src/Prebuilt/components/Leave/LeaveCard.tsx +36 -0
  114. package/src/Prebuilt/components/Leave/LeaveRoom.tsx +66 -0
  115. package/src/Prebuilt/components/{LeaveSessionContent.jsx → Leave/LeaveSessionContent.tsx} +20 -6
  116. package/src/Prebuilt/components/{MoreSettings/SplitComponents/MwebLeaveRoom.jsx → Leave/MwebLeaveRoom.tsx} +43 -18
  117. package/src/Prebuilt/components/MetaActions.jsx +15 -23
  118. package/src/Prebuilt/components/MoreSettings/ActionTile.jsx +5 -0
  119. package/src/Prebuilt/components/MoreSettings/ChangeNameContent.jsx +16 -7
  120. package/src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx +1 -1
  121. package/src/Prebuilt/components/MoreSettings/FullScreenItem.jsx +1 -4
  122. package/src/Prebuilt/components/MoreSettings/MoreSettings.tsx +27 -0
  123. package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx +216 -0
  124. package/src/Prebuilt/components/MoreSettings/SplitComponents/{MwebOptions.jsx → MwebOptions.tsx} +107 -45
  125. package/src/Prebuilt/components/Notifications/HLSFailureModal.jsx +3 -1
  126. package/src/Prebuilt/components/Notifications/Notifications.jsx +46 -30
  127. package/src/Prebuilt/components/Notifications/PeerNotifications.jsx +14 -2
  128. package/src/Prebuilt/components/Notifications/PermissionErrorModal.jsx +10 -4
  129. package/src/Prebuilt/components/Notifications/ReconnectNotifications.jsx +5 -11
  130. package/src/Prebuilt/components/PIP/PIPComponent.jsx +7 -16
  131. package/src/Prebuilt/components/PIP/PIPManager.js +1 -0
  132. package/src/Prebuilt/components/Pagination.tsx +60 -0
  133. package/src/Prebuilt/components/Playlist/Playlist.jsx +1 -6
  134. package/src/Prebuilt/components/PostLeave.jsx +7 -7
  135. package/src/Prebuilt/components/Preview/{PreviewContainer.jsx → PreviewContainer.tsx} +16 -15
  136. package/src/Prebuilt/components/Preview/{PreviewForm.jsx → PreviewForm.tsx} +16 -8
  137. package/src/Prebuilt/components/Preview/{PreviewJoin.jsx → PreviewJoin.tsx} +48 -22
  138. package/src/Prebuilt/components/RaiseHand.jsx +0 -7
  139. package/src/Prebuilt/components/RoleChangeRequestModal.tsx +119 -0
  140. package/src/Prebuilt/components/ScreenshareDisplay.jsx +4 -10
  141. package/src/Prebuilt/components/ScreenshareTile.jsx +43 -36
  142. package/src/Prebuilt/components/SecondaryTiles.tsx +36 -0
  143. package/src/Prebuilt/components/Settings/LayoutSettings.jsx +2 -12
  144. package/src/Prebuilt/components/Settings/NotificationSettings.jsx +3 -9
  145. package/src/Prebuilt/components/Settings/SettingsModal.jsx +3 -9
  146. package/src/Prebuilt/components/StatsForNerds.jsx +3 -1
  147. package/src/Prebuilt/components/TileMenu/TileMenu.jsx +16 -17
  148. package/src/Prebuilt/components/TileMenu/TileMenuContent.jsx +33 -27
  149. package/src/Prebuilt/components/Toast/ToastConfig.jsx +58 -15
  150. package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +65 -0
  151. package/src/Prebuilt/components/VideoLayouts/Grid.tsx +43 -0
  152. package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +110 -0
  153. package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +74 -0
  154. package/src/Prebuilt/components/VideoLayouts/RoleProminence.tsx +59 -0
  155. package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +52 -0
  156. package/src/Prebuilt/components/VideoLayouts/interface.ts +10 -0
  157. package/src/Prebuilt/components/VideoTile.jsx +116 -74
  158. package/src/Prebuilt/components/conference.jsx +86 -85
  159. package/src/Prebuilt/components/hooks/useAutoStartStreaming.tsx +57 -0
  160. package/src/Prebuilt/components/hooks/useMetadata.jsx +19 -3
  161. package/src/Prebuilt/components/hooks/useRedirectToLeave.tsx +34 -0
  162. package/src/Prebuilt/components/hooks/useRoleProminencePeers.tsx +38 -0
  163. package/src/Prebuilt/components/hooks/useTileLayout.tsx +127 -0
  164. package/src/Prebuilt/components/hooks/useVideoTileLayout.ts +26 -0
  165. package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +5 -72
  166. package/src/Prebuilt/components/pdfAnnotator/submitPdf.jsx +4 -45
  167. package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +2 -17
  168. package/src/Prebuilt/components/peerTileUtils.jsx +1 -1
  169. package/src/Prebuilt/images/empty-chat.svg +12 -0
  170. package/src/Prebuilt/layouts/EmbedView.jsx +17 -50
  171. package/src/Prebuilt/layouts/HLSView.jsx +138 -51
  172. package/src/Prebuilt/layouts/PDFView.jsx +1 -11
  173. package/src/Prebuilt/layouts/SidePane.tsx +108 -0
  174. package/src/Prebuilt/layouts/VideoStreamingSection.tsx +96 -0
  175. package/src/Prebuilt/layouts/WhiteboardView.jsx +10 -34
  176. package/src/Prebuilt/plugins/FlyingEmoji.jsx +14 -2
  177. package/src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx +1 -4
  178. package/src/Prebuilt/plugins/whiteboard/{ToggleWhiteboard.jsx → ToggleWhiteboard.tsx} +5 -9
  179. package/src/Prebuilt/primitives/DialogContent.jsx +15 -11
  180. package/src/Prebuilt/provider/roomLayoutProvider/constants/index.ts +17 -2
  181. package/src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts +36 -13
  182. package/src/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.ts +10 -0
  183. package/src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts +65 -0
  184. package/src/Prebuilt/provider/roomLayoutProvider/index.tsx +17 -6
  185. package/src/Prebuilt/services/FeatureFlags.jsx +0 -1
  186. package/src/VideoTile/StyledVideoTile.tsx +1 -0
  187. package/dist/HLSView-P57IRMAR.js.map +0 -7
  188. package/dist/PinnedTrackView-4FYJEBTB.js +0 -102
  189. package/dist/PinnedTrackView-4FYJEBTB.js.map +0 -7
  190. package/dist/VirtualBackground-GGCQJ5JM.js.map +0 -7
  191. package/dist/chunk-IVTWKQI3.js +0 -827
  192. package/dist/chunk-IVTWKQI3.js.map +0 -7
  193. package/dist/chunk-OSM4QEQG.js.map +0 -7
  194. package/dist/chunk-P5X32KOD.js.map +0 -7
  195. package/dist/chunk-RVCZPPTL.js +0 -1100
  196. package/dist/chunk-RVCZPPTL.js.map +0 -7
  197. package/dist/conference-P6I6ESVF.js +0 -8995
  198. package/dist/conference-P6I6ESVF.js.map +0 -7
  199. package/src/Prebuilt/components/AudioLevel/BeamSpeakerLabelsLogging.jsx +0 -16
  200. package/src/Prebuilt/components/Chat/ChatFooter.jsx +0 -150
  201. package/src/Prebuilt/components/Chat/ChatHeader.jsx +0 -67
  202. package/src/Prebuilt/components/Connection/TileConnection.jsx +0 -39
  203. package/src/Prebuilt/components/EqualProminence.jsx +0 -180
  204. package/src/Prebuilt/components/FirstPersonDisplay.jsx +0 -50
  205. package/src/Prebuilt/components/Footer/Footer.jsx +0 -73
  206. package/src/Prebuilt/components/Header/Header.jsx +0 -8
  207. package/src/Prebuilt/components/Header/StreamingHeader.jsx +0 -54
  208. package/src/Prebuilt/components/LeaveCard.jsx +0 -19
  209. package/src/Prebuilt/components/LeaveRoom.jsx +0 -94
  210. package/src/Prebuilt/components/MoreSettings/MoreSettings.jsx +0 -10
  211. package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.jsx +0 -219
  212. package/src/Prebuilt/components/Notifications/MessageNotifications.jsx +0 -25
  213. package/src/Prebuilt/components/Pagination.jsx +0 -29
  214. package/src/Prebuilt/components/RoleChangeRequestModal.jsx +0 -26
  215. package/src/Prebuilt/components/VideoList.jsx +0 -73
  216. package/src/Prebuilt/components/gridView.jsx +0 -85
  217. package/src/Prebuilt/components/hooks/useFeatures.js +0 -22
  218. package/src/Prebuilt/components/hooks/useNavigation.js +0 -19
  219. package/src/Prebuilt/components/hooks/useSkipPreview.jsx +0 -20
  220. package/src/Prebuilt/components/pdfAnnotator/pdfErrorView.jsx +0 -29
  221. package/src/Prebuilt/images/Logo.svg +0 -8
  222. package/src/Prebuilt/layouts/ActiveSpeakerView.jsx +0 -34
  223. package/src/Prebuilt/layouts/InsetView.jsx +0 -260
  224. package/src/Prebuilt/layouts/PinnedTrackView.jsx +0 -59
  225. package/src/Prebuilt/layouts/SidePane.jsx +0 -52
  226. package/src/Prebuilt/layouts/mainGridView.jsx +0 -98
  227. package/src/Prebuilt/layouts/mainView.jsx +0 -141
  228. package/src/Prebuilt/layouts/screenShareView.jsx +0 -183
  229. /package/{src/Prebuilt/components/Header/index.jsx → dist/Prebuilt/components/Header/index.d.ts} +0 -0
  230. /package/src/Prebuilt/components/{ScreenShare.jsx → ScreenShareToggle.jsx} +0 -0
  231. /package/src/{assets → Prebuilt/images}/android-perm-1.png +0 -0
  232. /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 '../../Button';
4
- import { Box, Flex } from '../../Layout';
5
- import { Text } from '../../Text';
3
+ import { Button } from '../../../Button';
4
+ import { Box, Flex } from '../../../Layout';
5
+ import { Text } from '../../../Text';
6
6
 
7
- export const LeaveSessionContent = ({ setShowLeaveRoomAlert, leaveRoom, isModal = false }) => {
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: '$on_surface_medium', mb: '$8', mt: '$4' }}>
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 variant="danger" css={{ w: '100%' }} onClick={leaveRoom} id="leaveRoom" data-testid="leave_room">
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 '../../../../Layout';
5
- import { Sheet } from '../../../../Sheet';
6
- import { Tooltip } from '../../../../Tooltip';
7
- import { EndSessionContent } from '../../EndSessionContent';
8
- import { LeaveCard } from '../../LeaveCard';
9
- import { useDropdownList } from '../../hooks/useDropdownList';
10
- import { useShowStreamingUI } from '../../../common/hooks';
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 = ({ leaveIconButton: LeaveIconButton, leaveRoom, stopStream }) => {
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 showStreamingUI = useShowStreamingUI();
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
- subtitleColor="$alert_error_bright"
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 variant="danger" key="LeaveRoom" data-testid="leave_room_btn" onClick={leaveRoom}>
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 || (!isHandRaiseEnabled && !isBRBEnabled)) {
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
- {isHandRaiseEnabled && (
24
- <Tooltip title={`${!isHandRaised ? 'Raise' : 'Unraise'} hand`}>
25
- <IconButton
26
- onClick={toggleHandRaise}
27
- active={!isHandRaised}
28
- data-testid={isMobile ? 'raise_hand_btn_mobile' : 'raise_hand_btn'}
29
- >
30
- <HandIcon />
31
- </IconButton>
32
- </Tooltip>
33
- )}
34
- {isBRBEnabled && (
35
- <Tooltip title={isBRBOn ? `I'm back` : `I'll be right back`}>
36
- <IconButton onClick={toggleBRB} active={!isBRBOn} data-testid="brb_btn">
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
- borderBottom: isMobile ? '1px solid $border_default' : '',
31
- pb: '$6',
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 css={{ color: 'inherit', ml: 'auto' }} onClick={onExit}>
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
- <Flex justify="center" align="center" css={{ my: '$8', w: '100%', px: isMobile ? '$8' : '' }}>
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
- px: isMobile ? '$4' : '',
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', py: '$8', px: 0 }}>
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 (!isFullscreenEnabled || !allowed) {
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
+ };