@100mslive/roomkit-react 0.3.23 → 0.3.24-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.
Files changed (194) hide show
  1. package/dist/Accordion/Accordion.d.ts +134 -322
  2. package/dist/Accordion/index.d.ts +134 -322
  3. package/dist/Avatar/Avatar.d.ts +47 -141
  4. package/dist/Button/Button.d.ts +47 -141
  5. package/dist/Checkbox/Checkbox.d.ts +134 -322
  6. package/dist/Collapsible/Collapsible.d.ts +201 -483
  7. package/dist/ConferenceScreen-CLPW3BGP.css +2780 -0
  8. package/dist/{HLSView-S4NJF7Q2.css.map → ConferenceScreen-CLPW3BGP.css.map} +1 -1
  9. package/dist/ConferenceScreen-M6RBPTAJ.js +1774 -0
  10. package/dist/ConferenceScreen-M6RBPTAJ.js.map +7 -0
  11. package/dist/Divider/Divider.d.ts +134 -322
  12. package/dist/Dropdown/Dropdown.d.ts +804 -1932
  13. package/dist/EmbedView-DDSO7ZCV.js +17 -0
  14. package/dist/EmbedView-DDSO7ZCV.js.map +7 -0
  15. package/dist/EmbedView-HGIUZHKA.css +2780 -0
  16. package/dist/EmbedView-HGIUZHKA.css.map +7 -0
  17. package/dist/EmojiReaction-23JDKJD4.js +11 -0
  18. package/dist/EmojiReaction-23JDKJD4.js.map +7 -0
  19. package/dist/Fieldset/Fieldset.d.ts +47 -141
  20. package/dist/Footer/Footer.d.ts +536 -1288
  21. package/dist/{HLSView-S4NJF7Q2.css → HLSView-OW77EAAO.css} +3 -3
  22. package/dist/HLSView-OW77EAAO.css.map +7 -0
  23. package/dist/{HLSView-HYI6LLL6.js → HLSView-Q6GEB3UM.js} +38 -24
  24. package/dist/HLSView-Q6GEB3UM.js.map +7 -0
  25. package/dist/IconButton/IconButton.d.ts +47 -141
  26. package/dist/Input/Input.d.ts +362 -926
  27. package/dist/Label/Label.d.ts +47 -141
  28. package/dist/Layout/Box.d.ts +47 -141
  29. package/dist/Layout/Flex.d.ts +47 -141
  30. package/dist/LeaveScreen-BYTE73MT.js +556 -0
  31. package/dist/LeaveScreen-BYTE73MT.js.map +7 -0
  32. package/dist/LeaveScreen-P7AATEIF.css +2780 -0
  33. package/dist/LeaveScreen-P7AATEIF.css.map +7 -0
  34. package/dist/Link/Link.d.ts +47 -141
  35. package/dist/Modal/Dialog.d.ts +329 -987
  36. package/dist/Modal/DialogContent.d.ts +469 -1127
  37. package/dist/MoreSettings-LV5X2U6K.css +2780 -0
  38. package/dist/MoreSettings-LV5X2U6K.css.map +7 -0
  39. package/dist/MoreSettings-WSHMMNOC.js +16 -0
  40. package/dist/MoreSettings-WSHMMNOC.js.map +7 -0
  41. package/dist/PDFView-RIPRIIH6.css +2780 -0
  42. package/dist/PDFView-RIPRIIH6.css.map +7 -0
  43. package/dist/PDFView-ZFSG2ESE.js +84 -0
  44. package/dist/PDFView-ZFSG2ESE.js.map +7 -0
  45. package/dist/Pagination/StyledPagination.d.ts +268 -644
  46. package/dist/Polls-QWW5LTTB.js +1584 -0
  47. package/dist/Polls-QWW5LTTB.js.map +7 -0
  48. package/dist/Polls-ULYGUPPF.css +2780 -0
  49. package/dist/Polls-ULYGUPPF.css.map +7 -0
  50. package/dist/Popover/index.d.ts +201 -483
  51. package/dist/Prebuilt/IconButton.d.ts +134 -322
  52. package/dist/Prebuilt/components/Chat/ChatBody.d.ts +134 -322
  53. package/dist/Prebuilt/components/Leave/LeaveAtoms.d.ts +335 -805
  54. package/dist/Prebuilt/components/Notifications/DeviceChangeNotifications.d.ts +1 -0
  55. package/dist/Prebuilt/components/Notifications/ErrorNotifications.d.ts +1 -0
  56. package/dist/Prebuilt/components/Notifications/MessageNotifications.d.ts +1 -0
  57. package/dist/Prebuilt/components/Notifications/PollNotificationModal.d.ts +1 -0
  58. package/dist/Prebuilt/components/Notifications/RoleChangeNotification.d.ts +1 -0
  59. package/dist/Prebuilt/components/Settings/common.d.ts +134 -322
  60. package/dist/Progress/index.d.ts +134 -322
  61. package/dist/RadioGroup/RadioGroup.d.ts +201 -483
  62. package/dist/RaiseHand-K7NFLH7H.js +10 -0
  63. package/dist/RaiseHand-K7NFLH7H.js.map +7 -0
  64. package/dist/ReactSelect/ReactSelect.d.ts +670 -1610
  65. package/dist/RoleProminence-235AFT7F.js +116 -0
  66. package/dist/RoleProminence-235AFT7F.js.map +7 -0
  67. package/dist/RoleProminence-6XN3POS5.css +2780 -0
  68. package/dist/RoleProminence-6XN3POS5.css.map +7 -0
  69. package/dist/RoomDetailsPane-O5TFMTPI.css +2780 -0
  70. package/dist/RoomDetailsPane-O5TFMTPI.css.map +7 -0
  71. package/dist/RoomDetailsPane-RF3D3TDR.js +53 -0
  72. package/dist/RoomDetailsPane-RF3D3TDR.js.map +7 -0
  73. package/dist/ScreenshareLayout-KNEB3AJJ.css +2780 -0
  74. package/dist/ScreenshareLayout-KNEB3AJJ.css.map +7 -0
  75. package/dist/ScreenshareLayout-PSQMS3NC.js +358 -0
  76. package/dist/ScreenshareLayout-PSQMS3NC.js.map +7 -0
  77. package/dist/Select/Select.d.ts +201 -483
  78. package/dist/Sheet/Sheet.d.ts +329 -987
  79. package/dist/SidePaneTabs-I6DECE5R.css +2780 -0
  80. package/dist/SidePaneTabs-I6DECE5R.css.map +7 -0
  81. package/dist/SidePaneTabs-NXHBI2JB.js +1354 -0
  82. package/dist/SidePaneTabs-NXHBI2JB.js.map +7 -0
  83. package/dist/Slider/Slider.d.ts +47 -141
  84. package/dist/Stats/StyledStats.d.ts +402 -966
  85. package/dist/Switch/Switch.d.ts +47 -141
  86. package/dist/Tabs/Tabs.d.ts +268 -644
  87. package/dist/Text/Text.d.ts +47 -141
  88. package/dist/TextArea/TextArea.d.ts +47 -141
  89. package/dist/Theme/base.config.d.ts +26 -78
  90. package/dist/Theme/stitches.config.d.ts +1046 -1493
  91. package/dist/TileMenu/StyledMenuTile.d.ts +469 -1127
  92. package/dist/Toast/Toast.d.ts +382 -946
  93. package/dist/VBPicker-2CQ3IIO7.js +322 -0
  94. package/dist/VBPicker-2CQ3IIO7.js.map +7 -0
  95. package/dist/VBPicker-DCNYGO23.css +2780 -0
  96. package/dist/VBPicker-DCNYGO23.css.map +7 -0
  97. package/dist/Video/Video.d.ts +47 -141
  98. package/dist/VideoList/StyledVideoList.d.ts +201 -483
  99. package/dist/VideoTile/StyledVideoTile.d.ts +670 -1610
  100. package/dist/WaitingView-NZIUOXBI.js +10 -0
  101. package/dist/WaitingView-NZIUOXBI.js.map +7 -0
  102. package/dist/WhiteboardLayout-4YLFM3EY.js +96 -0
  103. package/dist/WhiteboardLayout-4YLFM3EY.js.map +7 -0
  104. package/dist/WhiteboardLayout-JUOBDFKY.css +2780 -0
  105. package/dist/WhiteboardLayout-JUOBDFKY.css.map +7 -0
  106. package/dist/android-perm-1.png +0 -0
  107. package/dist/audio-level.png +0 -0
  108. package/dist/chunk-3C7IESSI.js +254 -0
  109. package/dist/chunk-3C7IESSI.js.map +7 -0
  110. package/dist/chunk-7FD3VT6Q.js +114 -0
  111. package/dist/chunk-7FD3VT6Q.js.map +7 -0
  112. package/dist/chunk-AHI4HCY3.js +62 -0
  113. package/dist/chunk-AHI4HCY3.js.map +7 -0
  114. package/dist/chunk-BGSYLCVD.js +6337 -0
  115. package/dist/chunk-BGSYLCVD.js.map +7 -0
  116. package/dist/chunk-DANANDDE.js +418 -0
  117. package/dist/chunk-DANANDDE.js.map +7 -0
  118. package/dist/chunk-ETRNLEWQ.js +2658 -0
  119. package/dist/chunk-ETRNLEWQ.js.map +7 -0
  120. package/dist/chunk-EWPHJFZJ.js +487 -0
  121. package/dist/chunk-EWPHJFZJ.js.map +7 -0
  122. package/dist/chunk-F63YJBI4.js +98 -0
  123. package/dist/chunk-F63YJBI4.js.map +7 -0
  124. package/dist/chunk-GLAJUP3O.js +576 -0
  125. package/dist/chunk-GLAJUP3O.js.map +7 -0
  126. package/dist/chunk-GOXRTCTY.js +90 -0
  127. package/dist/chunk-GOXRTCTY.js.map +7 -0
  128. package/dist/chunk-HMCBZI3A.js +59 -0
  129. package/dist/chunk-HMCBZI3A.js.map +7 -0
  130. package/dist/chunk-HVYTC3PX.js +171 -0
  131. package/dist/chunk-HVYTC3PX.js.map +7 -0
  132. package/dist/chunk-LJVP6AWF.js +262 -0
  133. package/dist/chunk-LJVP6AWF.js.map +7 -0
  134. package/dist/chunk-LXJGCRKM.js +30 -0
  135. package/dist/chunk-LXJGCRKM.js.map +7 -0
  136. package/dist/chunk-MG3UGW66.js +16800 -0
  137. package/dist/chunk-MG3UGW66.js.map +7 -0
  138. package/dist/chunk-MUKUP7JU.js +161 -0
  139. package/dist/chunk-MUKUP7JU.js.map +7 -0
  140. package/dist/chunk-OV6MVDCL.js +41 -0
  141. package/dist/chunk-OV6MVDCL.js.map +7 -0
  142. package/dist/chunk-P6NV2XO4.js +178 -0
  143. package/dist/chunk-P6NV2XO4.js.map +7 -0
  144. package/dist/chunk-REL3HBSD.js +71 -0
  145. package/dist/chunk-REL3HBSD.js.map +7 -0
  146. package/dist/chunk-U4SQBXPZ.js +830 -0
  147. package/dist/chunk-U4SQBXPZ.js.map +7 -0
  148. package/dist/chunk-YEL5ZTFU.js +136 -0
  149. package/dist/chunk-YEL5ZTFU.js.map +7 -0
  150. package/dist/empty-chat.svg +12 -0
  151. package/dist/index.cjs.css +2 -2
  152. package/dist/index.cjs.css.map +1 -1
  153. package/dist/index.cjs.js +21713 -21508
  154. package/dist/index.cjs.js.map +4 -4
  155. package/dist/index.css +2 -2
  156. package/dist/index.css.map +1 -1
  157. package/dist/index.js +25 -15
  158. package/dist/ios-perm-0.png +0 -0
  159. package/dist/meta.cjs.json +5515 -5153
  160. package/dist/meta.esbuild.json +8998 -6138
  161. package/dist/pdf-share.png +0 -0
  162. package/dist/screen-share.png +0 -0
  163. package/dist/transaction_error.svg +12 -0
  164. package/package.json +8 -8
  165. package/src/Avatar/Avatar.tsx +1 -1
  166. package/src/Popover/Popover.stories.tsx +1 -1
  167. package/src/Prebuilt/App.tsx +6 -2
  168. package/src/Prebuilt/components/Chat/Chat.tsx +12 -8
  169. package/src/Prebuilt/components/Chat/ChatFooter.tsx +1 -1
  170. package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx +14 -1
  171. package/src/Prebuilt/components/Notifications/DeviceChangeNotifications.tsx +18 -0
  172. package/src/Prebuilt/components/Notifications/ErrorNotifications.tsx +56 -0
  173. package/src/Prebuilt/components/Notifications/MessageNotifications.tsx +24 -0
  174. package/src/Prebuilt/components/Notifications/Notifications.tsx +13 -171
  175. package/src/Prebuilt/components/Notifications/PeerNotifications.tsx +9 -2
  176. package/src/Prebuilt/components/Notifications/PollNotificationModal.tsx +71 -0
  177. package/src/Prebuilt/components/Notifications/ReconnectNotifications.tsx +1 -5
  178. package/src/Prebuilt/components/Notifications/RoleChangeNotification.tsx +24 -0
  179. package/src/Prebuilt/components/Notifications/TrackBulkUnmuteModal.tsx +7 -5
  180. package/src/Prebuilt/components/Notifications/TrackNotifications.tsx +23 -1
  181. package/src/Prebuilt/components/Notifications/TrackUnmuteModal.tsx +13 -5
  182. package/src/Prebuilt/components/StatsForNerds.jsx +122 -9
  183. package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +43 -31
  184. package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +2 -2
  185. package/src/Prebuilt/components/VirtualBackground/VBOption.tsx +3 -1
  186. package/src/Prebuilt/components/VirtualBackground/VBPicker.tsx +6 -0
  187. package/src/Prebuilt/layouts/HLSView.jsx +1 -0
  188. package/src/Prebuilt/layouts/PDFView.jsx +1 -0
  189. package/src/Prebuilt/layouts/SidePane.tsx +12 -6
  190. package/src/Prebuilt/layouts/VideoStreamingSection.tsx +35 -34
  191. package/src/Prebuilt/layouts/WaitingView.tsx +2 -2
  192. package/dist/HLSView-HYI6LLL6.js.map +0 -7
  193. package/dist/chunk-LRJSQMZ4.js +0 -34759
  194. package/dist/chunk-LRJSQMZ4.js.map +0 -7
@@ -0,0 +1,24 @@
1
+ import { useEffect } from 'react';
2
+ import { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';
3
+ import { useUpdateRoomLayout } from '../../provider/roomLayoutProvider';
4
+ // @ts-ignore: No implicit Any
5
+ import { ToastManager } from '../Toast/ToastManager';
6
+
7
+ export const RoleChangeNotification = () => {
8
+ const notification = useHMSNotifications(HMSNotificationTypes.ROLE_UPDATED);
9
+ const updateRoomLayoutForRole = useUpdateRoomLayout();
10
+
11
+ useEffect(() => {
12
+ if (!notification?.data) {
13
+ return;
14
+ }
15
+ if (notification.data?.isLocal && notification.data?.roleName) {
16
+ ToastManager.addToast({
17
+ title: `You are now a ${notification.data.roleName}`,
18
+ });
19
+ updateRoomLayoutForRole?.(notification.data.roleName);
20
+ }
21
+ }, [notification]);
22
+
23
+ return null;
24
+ };
@@ -9,14 +9,16 @@ import { MicOnIcon } from '@100mslive/react-icons';
9
9
  // @ts-ignore: No implicit Any
10
10
  import { RequestDialog } from '../../primitives/DialogContent';
11
11
 
12
+ const notificationTypes = [
13
+ HMSNotificationTypes.CHANGE_MULTI_TRACK_STATE_REQUEST,
14
+ HMSNotificationTypes.ROOM_ENDED,
15
+ HMSNotificationTypes.REMOVED_FROM_ROOM,
16
+ ];
17
+
12
18
  export const TrackBulkUnmuteModal = () => {
13
19
  const hmsActions = useHMSActions();
14
20
  const [muteNotification, setMuteNotification] = useState<HMSChangeMultiTrackStateRequest | null>(null);
15
- const notification = useHMSNotifications([
16
- HMSNotificationTypes.CHANGE_MULTI_TRACK_STATE_REQUEST,
17
- HMSNotificationTypes.ROOM_ENDED,
18
- HMSNotificationTypes.REMOVED_FROM_ROOM,
19
- ]);
21
+ const notification = useHMSNotifications(notificationTypes);
20
22
 
21
23
  useEffect(() => {
22
24
  switch (notification?.type) {
@@ -1,17 +1,39 @@
1
1
  import { useEffect } from 'react';
2
2
  import { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';
3
+ // @ts-ignore: No implicit Any
4
+ import { ToastManager } from '../Toast/ToastManager';
3
5
 
4
6
  const notificationTypes = [
5
7
  HMSNotificationTypes.TRACK_ADDED,
6
8
  HMSNotificationTypes.TRACK_REMOVED,
7
9
  HMSNotificationTypes.TRACK_MUTED,
8
10
  HMSNotificationTypes.TRACK_UNMUTED,
11
+ HMSNotificationTypes.CHANGE_TRACK_STATE_REQUEST,
9
12
  ];
13
+
10
14
  export const TrackNotifications = () => {
11
15
  const notification = useHMSNotifications(notificationTypes);
12
16
  useEffect(() => {
13
17
  if (notification) {
14
- console.debug(`[${notification.type}]`, notification);
18
+ switch (notification.type) {
19
+ case HMSNotificationTypes.TRACK_ADDED:
20
+ case HMSNotificationTypes.TRACK_REMOVED:
21
+ case HMSNotificationTypes.TRACK_MUTED:
22
+ case HMSNotificationTypes.TRACK_UNMUTED:
23
+ console.debug(`[${notification.type}]`, notification);
24
+ break;
25
+ case HMSNotificationTypes.CHANGE_TRACK_STATE_REQUEST:
26
+ {
27
+ const track = notification.data?.track;
28
+ if (!notification.data.enabled) {
29
+ ToastManager.addToast({
30
+ title: `Your ${track.source} ${track.type} was muted by
31
+ ${notification.data.requestedBy?.name}.`,
32
+ });
33
+ }
34
+ }
35
+ break;
36
+ }
15
37
  }
16
38
  }, [notification]);
17
39
 
@@ -8,20 +8,28 @@ import {
8
8
  import { MicOnIcon } from '@100mslive/react-icons';
9
9
  // @ts-ignore: No implicit Any
10
10
  import { RequestDialog } from '../../primitives/DialogContent';
11
+ // @ts-ignore: No implicit Any
12
+ import { ToastManager } from '../Toast/ToastManager';
13
+
14
+ const notificationTypes = [
15
+ HMSNotificationTypes.CHANGE_TRACK_STATE_REQUEST,
16
+ HMSNotificationTypes.ROOM_ENDED,
17
+ HMSNotificationTypes.REMOVED_FROM_ROOM,
18
+ ];
11
19
 
12
20
  export const TrackUnmuteModal = () => {
13
21
  const hmsActions = useHMSActions();
14
- const notification = useHMSNotifications([
15
- HMSNotificationTypes.CHANGE_TRACK_STATE_REQUEST,
16
- HMSNotificationTypes.ROOM_ENDED,
17
- HMSNotificationTypes.REMOVED_FROM_ROOM,
18
- ]);
22
+ const notification = useHMSNotifications(notificationTypes);
19
23
  const [muteNotification, setMuteNotification] = useState<HMSChangeTrackStateRequest | null>(null);
20
24
 
21
25
  useEffect(() => {
22
26
  switch (notification?.type) {
23
27
  case HMSNotificationTypes.REMOVED_FROM_ROOM:
24
28
  case HMSNotificationTypes.ROOM_ENDED:
29
+ ToastManager.addToast({
30
+ title: `${notification.message}.
31
+ ${notification.data.reason && `Reason: ${notification.data.reason}`}`,
32
+ });
25
33
  setMuteNotification(null);
26
34
  break;
27
35
  case HMSNotificationTypes.CHANGE_TRACK_STATE_REQUEST:
@@ -1,35 +1,45 @@
1
1
  import React, { useEffect, useMemo, useRef, useState } from 'react';
2
+ import { useMedia } from 'react-use';
2
3
  import { match, P } from 'ts-pattern';
3
4
  import {
4
5
  selectHMSStats,
5
6
  selectLocalPeerID,
6
7
  selectPeersMap,
7
8
  selectTracksMap,
9
+ useHMSActions,
8
10
  useHMSStatsStore,
9
11
  useHMSStore,
10
12
  } from '@100mslive/react-sdk';
13
+ import { Accordion } from '../../Accordion';
11
14
  import { HorizontalDivider } from '../../Divider';
12
15
  import { Dropdown } from '../../Dropdown';
13
16
  import { Label } from '../../Label';
14
17
  import { Box, Flex } from '../../Layout';
15
18
  import { Dialog } from '../../Modal';
19
+ import { Sheet } from '../../Sheet';
16
20
  import { formatBytes } from '../../Stats';
17
21
  import { Switch } from '../../Switch';
18
22
  import { Text } from '../../Text';
23
+ import { config as cssConfig } from '../../Theme';
19
24
  import { DialogDropdownTrigger } from '../primitives/DropdownTrigger';
20
25
  import { useSetUiSettings } from './AppData/useUISettings';
21
26
  import { useDropdownSelection } from './hooks/useDropdownSelection';
22
27
  import { UI_SETTINGS } from '../common/constants';
23
28
 
24
- export const StatsForNerds = ({ onOpenChange }) => {
29
+ export const StatsForNerds = ({ open, onOpenChange }) => {
30
+ const mediaQueryLg = cssConfig.media.md;
31
+ const isMobile = useMedia(mediaQueryLg);
32
+
25
33
  const tracksWithLabels = useTracksWithLabel();
26
34
  const statsOptions = useMemo(
27
35
  () => [{ id: 'local-peer', label: 'Local Peer Stats' }, ...tracksWithLabels],
28
36
  [tracksWithLabels],
29
37
  );
38
+ const hmsActions = useHMSActions();
39
+ const details = hmsActions.getDebugInfo();
30
40
  const [selectedStat, setSelectedStat] = useState(statsOptions[0]);
31
41
  const [showStatsOnTiles, setShowStatsOnTiles] = useSetUiSettings(UI_SETTINGS.showStatsOnTiles);
32
- const [open, setOpen] = useState(false);
42
+ const [openDropdown, setOpenDropdown] = useState(false);
33
43
  const ref = useRef();
34
44
  const selectionBg = useDropdownSelection();
35
45
 
@@ -39,14 +49,92 @@ export const StatsForNerds = ({ onOpenChange }) => {
39
49
  }
40
50
  }, [tracksWithLabels, selectedStat]);
41
51
 
42
- return (
43
- <Dialog.Root defaultOpen onOpenChange={onOpenChange}>
52
+ return isMobile ? (
53
+ <Sheet.Root open={open} onOpenChange={onOpenChange}>
54
+ <Sheet.Content
55
+ css={{
56
+ bg: '$surface_dim',
57
+ overflowY: 'auto',
58
+ px: '$4',
59
+ }}
60
+ >
61
+ <Sheet.Title css={{ py: '$10', px: '$8', alignItems: 'center' }}>
62
+ <Flex justify="between">
63
+ <Flex align="center" css={{ mb: '$1' }}>
64
+ <Text variant="h6" inline>
65
+ Stats For Nerds
66
+ </Text>
67
+ </Flex>
68
+ <Dialog.DefaultClose data-testid="stats_dialog_close_icon" />
69
+ </Flex>
70
+ </Sheet.Title>
71
+ <HorizontalDivider />
72
+ <Flex justify="start" gap={4} css={{ m: '$10 0' }}>
73
+ <Switch checked={showStatsOnTiles} onCheckedChange={setShowStatsOnTiles} />
74
+ <Text variant="body2" css={{ fontWeight: '$semiBold' }}>
75
+ Show Stats on Tiles
76
+ </Text>
77
+ </Flex>
78
+ {/* Select */}
79
+ <Flex
80
+ direction="column"
81
+ css={{
82
+ mb: '$12',
83
+ position: 'relative',
84
+ minWidth: 0,
85
+ }}
86
+ >
87
+ <Label variant="body2" css={{ c: '$on_surface_high' }}>
88
+ Stats For
89
+ </Label>
90
+ <Dropdown.Root data-testid="dialog_select_Stats For" open={openDropdown} onOpenChange={setOpenDropdown}>
91
+ <DialogDropdownTrigger
92
+ title={selectedStat.label || 'Select Stats'}
93
+ css={{ mt: '$4' }}
94
+ titleCSS={{ mx: 0 }}
95
+ open={openDropdown}
96
+ ref={ref}
97
+ />
98
+ <Dropdown.Portal>
99
+ <Dropdown.Content align="start" sideOffset={8} css={{ w: ref.current?.clientWidth, zIndex: 1000 }}>
100
+ {statsOptions.map(option => {
101
+ const isSelected = option.id === selectedStat.id && option.layer === selectedStat.layer;
102
+ return (
103
+ <Dropdown.Item
104
+ key={`${option.id}-${option.layer || ''}`}
105
+ onClick={() => {
106
+ setSelectedStat(option);
107
+ }}
108
+ css={{
109
+ px: '$9',
110
+ bg: isSelected ? selectionBg : undefined,
111
+ c: isSelected ? '$on_primary_high' : '$on_primary_high',
112
+ }}
113
+ >
114
+ {option.label}
115
+ </Dropdown.Item>
116
+ );
117
+ })}
118
+ </Dropdown.Content>
119
+ </Dropdown.Portal>
120
+ </Dropdown.Root>
121
+ </Flex>
122
+ {/* Stats */}
123
+ {selectedStat.id === 'local-peer' ? (
124
+ <LocalPeerStats />
125
+ ) : (
126
+ <TrackStats trackID={selectedStat.id} layer={selectedStat.layer} local={selectedStat.local} />
127
+ )}
128
+ </Sheet.Content>
129
+ </Sheet.Root>
130
+ ) : (
131
+ <Dialog.Root open={open} onOpenChange={onOpenChange}>
44
132
  <Dialog.Portal>
45
133
  <Dialog.Overlay />
46
134
  <Dialog.Content
47
135
  css={{
48
136
  width: 'min(500px, 95%)',
49
- maxHeight: '100%',
137
+ height: 'min(656px, 90%)',
50
138
  overflowY: 'auto',
51
139
  }}
52
140
  >
@@ -70,6 +158,7 @@ export const StatsForNerds = ({ onOpenChange }) => {
70
158
  </Text>
71
159
  </Flex>
72
160
  {/* Select */}
161
+
73
162
  <Flex
74
163
  direction="column"
75
164
  css={{
@@ -81,12 +170,12 @@ export const StatsForNerds = ({ onOpenChange }) => {
81
170
  <Label variant="body2" css={{ c: '$on_surface_high' }}>
82
171
  Stats For
83
172
  </Label>
84
- <Dropdown.Root data-testid="dialog_select_Stats For" open={open} onOpenChange={setOpen}>
173
+ <Dropdown.Root data-testid="dialog_select_Stats For" open={openDropdown} onOpenChange={setOpenDropdown}>
85
174
  <DialogDropdownTrigger
86
175
  title={selectedStat.label || 'Select Stats'}
87
176
  css={{ mt: '$4' }}
88
177
  titleCSS={{ mx: 0 }}
89
- open={open}
178
+ open={openDropdown}
90
179
  ref={ref}
91
180
  />
92
181
  <Dropdown.Portal>
@@ -119,6 +208,9 @@ export const StatsForNerds = ({ onOpenChange }) => {
119
208
  ) : (
120
209
  <TrackStats trackID={selectedStat.id} layer={selectedStat.layer} local={selectedStat.local} />
121
210
  )}
211
+ <Flex justify="start" gap={4} css={{ m: '$10 0', w: '100%' }}>
212
+ <DebugInfo details={details} />
213
+ </Flex>
122
214
  </Dialog.Content>
123
215
  </Dialog.Portal>
124
216
  </Dialog.Root>
@@ -229,8 +321,29 @@ const TrackStats = ({ trackID, layer, local }) => {
229
321
  );
230
322
  };
231
323
 
232
- const StatsRow = React.memo(({ label, value }) => (
233
- <Box css={{ bg: '$surface_bright', w: 'calc(50% - $6)', p: '$8', r: '$3' }}>
324
+ const DebugInfo = ({ details }) => {
325
+ return (
326
+ <Accordion.Root type="single" collapsible css={{ w: '100%' }}>
327
+ <Accordion.Item value="Debug Info">
328
+ <Accordion.Header>
329
+ <Label variant="body2" css={{ c: '$on_surface_high' }}>
330
+ Debug Info
331
+ </Label>
332
+ </Accordion.Header>
333
+ <Accordion.Content>
334
+ <Flex css={{ flexWrap: 'wrap', mt: '$10', gap: '$10' }}>
335
+ <StatsRow css={{ w: '100%' }} label="Websocket URL" value={details?.websocketURL} />
336
+ <StatsRow css={{ w: '100%' }} label="Init Endpoint" value={details?.initEndpoint} />
337
+ <StatsRow css={{ w: '100%' }} label="Enabled flags" value={details?.enabledFlags?.join(', ')} />
338
+ </Flex>
339
+ </Accordion.Content>
340
+ </Accordion.Item>
341
+ </Accordion.Root>
342
+ );
343
+ };
344
+
345
+ const StatsRow = React.memo(({ label, value, css }) => (
346
+ <Box css={{ bg: '$surface_bright', w: 'calc(50% - $6)', p: '$8', r: '$3', ...css }}>
234
347
  <Text
235
348
  variant="overline"
236
349
  css={{
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useMemo, useState } from 'react';
1
+ import React, { Suspense, useEffect, useMemo, useState } from 'react';
2
2
  import { GridVideoTileLayout } from '@100mslive/types-prebuilt/elements/video_tile_layout';
3
3
  import {
4
4
  selectLocalPeerID,
@@ -9,16 +9,22 @@ import {
9
9
  useHMSStore,
10
10
  useHMSVanillaStore,
11
11
  } from '@100mslive/react-sdk';
12
- // @ts-ignore: No implicit Any
12
+ import FullPageProgress from '../FullPageProgress';
13
13
  import { EqualProminence } from './EqualProminence';
14
- import { RoleProminence } from './RoleProminence';
15
- import { ScreenshareLayout } from './ScreenshareLayout';
16
- import { WhiteboardLayout } from './WhiteboardLayout';
17
14
  // @ts-ignore: No implicit Any
18
15
  import { usePinnedTrack, useSetAppDataByKey } from '../AppData/useUISettings';
19
16
  import { VideoTileContext } from '../hooks/useVideoTileLayout';
20
17
  import PeersSorter from '../../common/PeersSorter';
21
18
  import { APP_DATA } from '../../common/constants';
19
+ const RoleProminence = React.lazy(() =>
20
+ import('./RoleProminence').then(module => ({ default: module.RoleProminence })),
21
+ );
22
+ const ScreenshareLayout = React.lazy(() =>
23
+ import('./ScreenshareLayout').then(module => ({ default: module.ScreenshareLayout })),
24
+ );
25
+ const WhiteboardLayout = React.lazy(() =>
26
+ import('./WhiteboardLayout').then(module => ({ default: module.WhiteboardLayout })),
27
+ );
22
28
 
23
29
  export type TileCustomisationProps = {
24
30
  hide_participant_name_on_tile: boolean;
@@ -108,38 +114,44 @@ export const GridLayout = ({
108
114
 
109
115
  if (peerSharing) {
110
116
  return (
111
- <VideoTileContext.Provider value={tileLayout}>
112
- <ScreenshareLayout
113
- peers={sortedPeers}
114
- onPageSize={setPageSize}
115
- onPageChange={setMainPage}
116
- edgeToEdge={edge_to_edge}
117
- />
118
- </VideoTileContext.Provider>
117
+ <Suspense fallback={<FullPageProgress />}>
118
+ <VideoTileContext.Provider value={tileLayout}>
119
+ <ScreenshareLayout
120
+ peers={sortedPeers}
121
+ onPageSize={setPageSize}
122
+ onPageChange={setMainPage}
123
+ edgeToEdge={edge_to_edge}
124
+ />
125
+ </VideoTileContext.Provider>
126
+ </Suspense>
119
127
  );
120
128
  } else if (whiteboard?.open) {
121
129
  return (
122
- <VideoTileContext.Provider value={tileLayout}>
123
- <WhiteboardLayout
124
- peers={sortedPeers}
125
- onPageSize={setPageSize}
126
- onPageChange={setMainPage}
127
- edgeToEdge={edge_to_edge}
128
- />
129
- </VideoTileContext.Provider>
130
+ <Suspense fallback={<FullPageProgress />}>
131
+ <VideoTileContext.Provider value={tileLayout}>
132
+ <WhiteboardLayout
133
+ peers={sortedPeers}
134
+ onPageSize={setPageSize}
135
+ onPageChange={setMainPage}
136
+ edgeToEdge={edge_to_edge}
137
+ />
138
+ </VideoTileContext.Provider>
139
+ </Suspense>
130
140
  );
131
141
  } else if (isRoleProminence) {
132
142
  return (
133
- <VideoTileContext.Provider value={tileLayout}>
134
- <RoleProminence
135
- peers={sortedPeers}
136
- onPageSize={setPageSize}
137
- onPageChange={setMainPage}
138
- prominentRoles={prominentRoles}
139
- isInsetEnabled={isInsetEnabled}
140
- edgeToEdge={edge_to_edge}
141
- />
142
- </VideoTileContext.Provider>
143
+ <Suspense fallback={<FullPageProgress />}>
144
+ <VideoTileContext.Provider value={tileLayout}>
145
+ <RoleProminence
146
+ peers={sortedPeers}
147
+ onPageSize={setPageSize}
148
+ onPageChange={setMainPage}
149
+ prominentRoles={prominentRoles}
150
+ isInsetEnabled={isInsetEnabled}
151
+ edgeToEdge={edge_to_edge}
152
+ />
153
+ </VideoTileContext.Provider>
154
+ </Suspense>
143
155
  );
144
156
  }
145
157
  return (
@@ -70,9 +70,9 @@ const SecondarySection = ({
70
70
  rootCSS={{
71
71
  padding: 0,
72
72
  maxWidth: 240,
73
- aspectRatio: 16 / 9,
73
+ aspectRatio: '16 / 9',
74
74
  ...(hasSidebar ? { w: '100%' } : { h: '100%' }),
75
- '@md': { aspectRatio: 1 },
75
+ '@md': { aspectRatio: '1' },
76
76
  }}
77
77
  objectFit="contain"
78
78
  {...tileLayoutProps}
@@ -25,7 +25,9 @@ const Root = ({
25
25
  bg: '$surface_bright',
26
26
  border: `4px solid ${isActive ? '$primary_default' : '$surface_dim'}`,
27
27
  cursor: 'pointer',
28
- '&:hover': { border: '4px solid $primary_dim' },
28
+ '@media (hover:hover)': {
29
+ '&:hover': { border: '4px solid $primary_dim' },
30
+ },
29
31
  ...(mediaURL ? { height: '$20', backgroundImage: `url("${mediaURL}")`, backgroundSize: 'cover' } : {}),
30
32
  }}
31
33
  onClick={async () => {
@@ -180,6 +180,9 @@ export const VBPicker = ({ backgroundMedia = [] }: { backgroundMedia: VirtualBac
180
180
  onClick: async () => {
181
181
  await VBHandler.removeEffects();
182
182
  hmsActions.setAppData(APP_DATA.background, HMSVirtualBackgroundTypes.NONE);
183
+ if (isMobile) {
184
+ toggleVB();
185
+ }
183
186
  },
184
187
  supported: true,
185
188
  },
@@ -235,6 +238,9 @@ export const VBPicker = ({ backgroundMedia = [] }: { backgroundMedia: VirtualBac
235
238
  onClick: async () => {
236
239
  await VBHandler?.setBackground(mediaURL);
237
240
  hmsActions.setAppData(APP_DATA.background, mediaURL);
241
+ if (isMobile) {
242
+ toggleVB();
243
+ }
238
244
  },
239
245
  supported: true,
240
246
  }))}
@@ -286,6 +286,7 @@ const HLSView = () => {
286
286
  hlsPlayer.reset();
287
287
  };
288
288
  }
289
+ // eslint-disable-next-line react-hooks/exhaustive-deps
289
290
  }, [hlsUrl, vanillaStore, hmsActions]);
290
291
 
291
292
  /**
@@ -19,6 +19,7 @@ export const PDFView = () => {
19
19
  return () => {
20
20
  resetConfig();
21
21
  };
22
+ // eslint-disable-next-line react-hooks/exhaustive-deps
22
23
  }, []);
23
24
  useEffect(() => {
24
25
  (async () => {
@@ -1,14 +1,10 @@
1
- import React, { useEffect } from 'react';
1
+ import React, { Suspense, useEffect } from 'react';
2
2
  import { useMedia } from 'react-use';
3
3
  import { match } from 'ts-pattern';
4
4
  import { selectAppData, selectVideoTrackByPeerID, useHMSStore } from '@100mslive/react-sdk';
5
- import { Polls } from '../components/Polls/Polls';
6
- import { RoomDetailsPane } from '../components/RoomDetails/RoomDetailsPane';
7
5
  import { LayoutMode } from '../components/Settings/LayoutSettings';
8
- import { SidePaneTabs } from '../components/SidePaneTabs';
9
6
  import { TileCustomisationProps } from '../components/VideoLayouts/GridLayout';
10
7
  import VideoTile from '../components/VideoTile';
11
- import { VBPicker } from '../components/VirtualBackground/VBPicker';
12
8
  import { Flex } from '../../Layout';
13
9
  import { config as cssConfig, styled } from '../../Theme';
14
10
  // @ts-ignore: No implicit Any
@@ -22,6 +18,16 @@ import {
22
18
  import { useLandscapeHLSStream, useMobileHLSStream } from '../common/hooks';
23
19
  import { translateAcross } from '../../utils';
24
20
  import { APP_DATA, SIDE_PANE_OPTIONS, UI_SETTINGS } from '../common/constants';
21
+ const SidePaneTabs = React.lazy(() =>
22
+ import('../components/SidePaneTabs').then(module => ({ default: module.SidePaneTabs })),
23
+ );
24
+ const Polls = React.lazy(() => import('../components/Polls/Polls').then(module => ({ default: module.Polls })));
25
+ const RoomDetailsPane = React.lazy(() =>
26
+ import('../components/RoomDetails/RoomDetailsPane').then(module => ({ default: module.RoomDetailsPane })),
27
+ );
28
+ const VBPicker = React.lazy(() =>
29
+ import('../components/VirtualBackground/VBPicker').then(module => ({ default: module.VBPicker })),
30
+ );
25
31
 
26
32
  const Wrapper = styled('div', {
27
33
  w: '$100',
@@ -233,7 +239,7 @@ const SidePane = ({
233
239
  {...tileLayout}
234
240
  />
235
241
  )}
236
- {SidepaneComponent}
242
+ <Suspense fallback={<></>}>{SidepaneComponent}</Suspense>
237
243
  </Flex>
238
244
  );
239
245
  };
@@ -19,13 +19,7 @@ import FullPageProgress from '../components/FullPageProgress';
19
19
  import { GridLayout } from '../components/VideoLayouts/GridLayout';
20
20
  import { Box, Flex } from '../../Layout';
21
21
  import { config } from '../../Theme';
22
- // @ts-ignore: No implicit Any
23
- import { EmbedView } from './EmbedView';
24
- // @ts-ignore: No implicit Any
25
- import { PDFView } from './PDFView';
26
22
  import SidePane from './SidePane';
27
- // @ts-ignore: No implicit Any
28
- import { WaitingView } from './WaitingView';
29
23
  import { CaptionsViewer } from '../plugins/CaptionsViewer';
30
24
  // @ts-ignore: No implicit Any
31
25
  import { usePDFConfig, useUrlToEmbed } from '../components/AppData/useUISettings';
@@ -34,6 +28,11 @@ import { useLandscapeHLSStream, useMobileHLSStream, useWaitingRoomInfo } from '.
34
28
  import { SESSION_STORE_KEY } from '../common/constants';
35
29
  // @ts-ignore: No implicit Any
36
30
  const HLSView = React.lazy(() => import('./HLSView'));
31
+ // @ts-ignore: No implicit Any
32
+ const EmbedView = React.lazy(() => import('./EmbedView').then(module => ({ default: module.EmbedView })));
33
+ // @ts-ignore: No implicit Any
34
+ const PDFView = React.lazy(() => import('./PDFView').then(module => ({ default: module.PDFView })));
35
+ const WaitingView = React.lazy(() => import('./WaitingView').then(module => ({ default: module.WaitingView })));
37
36
 
38
37
  export const VideoStreamingSection = ({
39
38
  screenType,
@@ -79,18 +78,18 @@ export const VideoStreamingSection = ({
79
78
  }
80
79
 
81
80
  return (
82
- <Suspense fallback={<FullPageProgress />}>
83
- <Flex
84
- css={{
85
- size: '100%',
86
- position: 'relative',
87
- gap: isMobileHLSStream || isLandscapeHLSStream ? '0' : '$4',
88
- }}
89
- direction={match<Record<string, boolean>, 'row' | 'column'>({ isLandscapeHLSStream, isMobileHLSStream })
90
- .with({ isLandscapeHLSStream: true }, () => 'row')
91
- .with({ isMobileHLSStream: true }, () => 'column')
92
- .otherwise(() => 'row')}
93
- >
81
+ <Flex
82
+ css={{
83
+ size: '100%',
84
+ position: 'relative',
85
+ gap: isMobileHLSStream || isLandscapeHLSStream ? '0' : '$4',
86
+ }}
87
+ direction={match<Record<string, boolean>, 'row' | 'column'>({ isLandscapeHLSStream, isMobileHLSStream })
88
+ .with({ isLandscapeHLSStream: true }, () => 'row')
89
+ .with({ isMobileHLSStream: true }, () => 'column')
90
+ .otherwise(() => 'row')}
91
+ >
92
+ <Suspense fallback={<FullPageProgress />}>
94
93
  {match({
95
94
  screenType,
96
95
  isNotAllowedToPublish,
@@ -142,27 +141,29 @@ export const VideoStreamingSection = ({
142
141
  return <GridLayout {...(elements as DefaultConferencingScreen_Elements)?.video_tile_layout?.grid} />;
143
142
  })}
144
143
  <CaptionsViewer setDefaultPosition={setCaptionPosition} defaultPosition={captionPosition} />
145
- <Box
146
- css={{
147
- flex: match({ isLandscapeHLSStream, isMobileHLSStream })
148
- .with({ isLandscapeHLSStream: true }, () => '1 1 0')
149
- .with({ isMobileHLSStream: true }, () => '2 1 0')
150
- .otherwise(() => undefined),
151
- position: 'relative',
152
- height: !isMobileHLSStream ? '100%' : undefined,
153
- maxHeight: '100%',
154
- '&:empty': { display: 'none' },
155
- overflowY: 'clip',
156
- }}
157
- >
144
+ </Suspense>
145
+ <Box
146
+ css={{
147
+ flex: match({ isLandscapeHLSStream, isMobileHLSStream })
148
+ .with({ isLandscapeHLSStream: true }, () => '1 1 0')
149
+ .with({ isMobileHLSStream: true }, () => '2 1 0')
150
+ .otherwise(() => undefined),
151
+ position: 'relative',
152
+ height: !isMobileHLSStream ? '100%' : undefined,
153
+ maxHeight: '100%',
154
+ '&:empty': { display: 'none' },
155
+ overflowY: 'clip',
156
+ }}
157
+ >
158
+ <Suspense fallback={<></>}>
158
159
  <SidePane
159
160
  screenType={screenType}
160
161
  // @ts-ignore
161
162
  tileProps={(elements as DefaultConferencingScreen_Elements)?.video_tile_layout?.grid}
162
163
  hideControls={hideControls}
163
164
  />
164
- </Box>
165
- </Flex>
166
- </Suspense>
165
+ </Suspense>
166
+ </Box>
167
+ </Flex>
167
168
  );
168
169
  };
@@ -36,12 +36,12 @@ export const WaitingView = React.memo(
36
36
  gap: '$4',
37
37
  }}
38
38
  >
39
- <Text variant="h4" css={{ '@md': { fontSize: '$md', color: '$on_surface_high' } }}>
39
+ <Text variant="h4" css={{ '@md': { fontSize: '$lg', color: '$on_surface_high' } }}>
40
40
  {title}
41
41
  </Text>
42
42
  <Text
43
43
  variant="body1"
44
- css={{ fontWeight: '$regular', color: '$on_surface_medium', '@md': { fontSize: '$sm' } }}
44
+ css={{ fontWeight: '$regular', color: '$on_surface_medium', '@md': { fontSize: '$md' } }}
45
45
  >
46
46
  {subtitle}
47
47
  </Text>