@100mslive/roomkit-react 0.3.22-alpha.0 → 0.3.22-alpha.2

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 (193) 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-5G5WGPIO.css +2780 -0
  8. package/dist/{HLSView-JYFTZVCM.css.map → ConferenceScreen-5G5WGPIO.css.map} +1 -1
  9. package/dist/ConferenceScreen-KS5URW6Z.js +1778 -0
  10. package/dist/ConferenceScreen-KS5URW6Z.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-BCRQ3GHV.js +17 -0
  14. package/dist/EmbedView-BCRQ3GHV.js.map +7 -0
  15. package/dist/EmbedView-Y24VRONT.css +2780 -0
  16. package/dist/EmbedView-Y24VRONT.css.map +7 -0
  17. package/dist/EmojiReaction-NA5F5DWN.js +11 -0
  18. package/dist/EmojiReaction-NA5F5DWN.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-JYFTZVCM.css → HLSView-DC43TOIW.css} +3 -3
  22. package/dist/HLSView-DC43TOIW.css.map +7 -0
  23. package/dist/{HLSView-EPPGI6XI.js → HLSView-XRGOWFRB.js} +38 -24
  24. package/dist/HLSView-XRGOWFRB.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-3OZN3MU3.css +2780 -0
  31. package/dist/LeaveScreen-3OZN3MU3.css.map +7 -0
  32. package/dist/LeaveScreen-PC4KB6OG.js +556 -0
  33. package/dist/LeaveScreen-PC4KB6OG.js.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-KTRYHDB2.css +2780 -0
  38. package/dist/MoreSettings-KTRYHDB2.css.map +7 -0
  39. package/dist/MoreSettings-XLNYT7PW.js +16 -0
  40. package/dist/MoreSettings-XLNYT7PW.js.map +7 -0
  41. package/dist/PDFView-LJ7I3K3H.js +84 -0
  42. package/dist/PDFView-LJ7I3K3H.js.map +7 -0
  43. package/dist/PDFView-RJK44WVO.css +2780 -0
  44. package/dist/PDFView-RJK44WVO.css.map +7 -0
  45. package/dist/Pagination/StyledPagination.d.ts +268 -644
  46. package/dist/Polls-AULCHMLW.js +1584 -0
  47. package/dist/Polls-AULCHMLW.js.map +7 -0
  48. package/dist/Polls-K4GO5ZOC.css +2780 -0
  49. package/dist/Polls-K4GO5ZOC.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/DeviceInUseError.d.ts +2 -0
  56. package/dist/Prebuilt/components/Notifications/ErrorNotifications.d.ts +1 -0
  57. package/dist/Prebuilt/components/Notifications/MessageNotifications.d.ts +1 -0
  58. package/dist/Prebuilt/components/Notifications/PollNotificationModal.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-E4OVMBW6.js +10 -0
  63. package/dist/RaiseHand-E4OVMBW6.js.map +7 -0
  64. package/dist/ReactSelect/ReactSelect.d.ts +670 -1610
  65. package/dist/RoleProminence-LHUXHLVI.css +2780 -0
  66. package/dist/RoleProminence-LHUXHLVI.css.map +7 -0
  67. package/dist/RoleProminence-RWJP2Z36.js +116 -0
  68. package/dist/RoleProminence-RWJP2Z36.js.map +7 -0
  69. package/dist/RoomDetailsPane-6BM2FPWW.css +2780 -0
  70. package/dist/RoomDetailsPane-6BM2FPWW.css.map +7 -0
  71. package/dist/RoomDetailsPane-7OP2CNJW.js +53 -0
  72. package/dist/RoomDetailsPane-7OP2CNJW.js.map +7 -0
  73. package/dist/ScreenshareLayout-RHTD2PQT.css +2780 -0
  74. package/dist/ScreenshareLayout-RHTD2PQT.css.map +7 -0
  75. package/dist/ScreenshareLayout-TM7DLYLH.js +358 -0
  76. package/dist/ScreenshareLayout-TM7DLYLH.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-T7BKZ2AT.js +1354 -0
  80. package/dist/SidePaneTabs-T7BKZ2AT.js.map +7 -0
  81. package/dist/SidePaneTabs-TBUPHNAU.css +2780 -0
  82. package/dist/SidePaneTabs-TBUPHNAU.css.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-M5VYFEUB.css +2780 -0
  94. package/dist/VBPicker-M5VYFEUB.css.map +7 -0
  95. package/dist/VBPicker-TQLIL3NC.js +322 -0
  96. package/dist/VBPicker-TQLIL3NC.js.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-TLJ52XYA.js +10 -0
  101. package/dist/WaitingView-TLJ52XYA.js.map +7 -0
  102. package/dist/WhiteboardLayout-PZZTM2FW.css +2780 -0
  103. package/dist/WhiteboardLayout-PZZTM2FW.css.map +7 -0
  104. package/dist/WhiteboardLayout-YYZ5UVGG.js +96 -0
  105. package/dist/WhiteboardLayout-YYZ5UVGG.js.map +7 -0
  106. package/dist/android-perm-1.png +0 -0
  107. package/dist/audio-level.png +0 -0
  108. package/dist/chunk-42XPBCZO.js +487 -0
  109. package/dist/chunk-42XPBCZO.js.map +7 -0
  110. package/dist/chunk-4BQ3AMVG.js +16802 -0
  111. package/dist/chunk-4BQ3AMVG.js.map +7 -0
  112. package/dist/chunk-4L5OKEIV.js +90 -0
  113. package/dist/chunk-4L5OKEIV.js.map +7 -0
  114. package/dist/chunk-6BX3VCVC.js +6337 -0
  115. package/dist/chunk-6BX3VCVC.js.map +7 -0
  116. package/dist/chunk-A3COGXMF.js +114 -0
  117. package/dist/chunk-A3COGXMF.js.map +7 -0
  118. package/dist/chunk-B3HHL3ND.js +178 -0
  119. package/dist/chunk-B3HHL3ND.js.map +7 -0
  120. package/dist/chunk-B5NLX6N6.js +41 -0
  121. package/dist/chunk-B5NLX6N6.js.map +7 -0
  122. package/dist/chunk-BXBPZGSP.js +161 -0
  123. package/dist/chunk-BXBPZGSP.js.map +7 -0
  124. package/dist/chunk-DVVFWHQG.js +136 -0
  125. package/dist/chunk-DVVFWHQG.js.map +7 -0
  126. package/dist/chunk-GV2DTYSU.js +262 -0
  127. package/dist/chunk-GV2DTYSU.js.map +7 -0
  128. package/dist/chunk-KF2YEUWU.js +254 -0
  129. package/dist/chunk-KF2YEUWU.js.map +7 -0
  130. package/dist/chunk-KQXTIHI6.js +59 -0
  131. package/dist/chunk-KQXTIHI6.js.map +7 -0
  132. package/dist/chunk-MR3HE7HV.js +830 -0
  133. package/dist/chunk-MR3HE7HV.js.map +7 -0
  134. package/dist/chunk-OQBTPJPO.js +71 -0
  135. package/dist/chunk-OQBTPJPO.js.map +7 -0
  136. package/dist/chunk-P7OOTR7P.js +2595 -0
  137. package/dist/chunk-P7OOTR7P.js.map +7 -0
  138. package/dist/chunk-THDU2DKP.js +30 -0
  139. package/dist/chunk-THDU2DKP.js.map +7 -0
  140. package/dist/chunk-U4QYH2BP.js +98 -0
  141. package/dist/chunk-U4QYH2BP.js.map +7 -0
  142. package/dist/chunk-USEEH3QW.js +418 -0
  143. package/dist/chunk-USEEH3QW.js.map +7 -0
  144. package/dist/chunk-UZW3C3ML.js +171 -0
  145. package/dist/chunk-UZW3C3ML.js.map +7 -0
  146. package/dist/chunk-YDIB6WKJ.js +576 -0
  147. package/dist/chunk-YDIB6WKJ.js.map +7 -0
  148. package/dist/chunk-ZFTULCCP.js +62 -0
  149. package/dist/chunk-ZFTULCCP.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 +22737 -22481
  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 +5680 -5307
  160. package/dist/meta.esbuild.json +8824 -5953
  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/Header/common.jsx +6 -5
  171. package/src/Prebuilt/components/Notifications/DeviceChangeNotifications.tsx +18 -0
  172. package/src/Prebuilt/components/Notifications/DeviceInUseError.tsx +79 -0
  173. package/src/Prebuilt/components/Notifications/ErrorNotifications.tsx +56 -0
  174. package/src/Prebuilt/components/Notifications/MessageNotifications.tsx +24 -0
  175. package/src/Prebuilt/components/Notifications/Notifications.tsx +13 -159
  176. package/src/Prebuilt/components/Notifications/PeerNotifications.tsx +23 -2
  177. package/src/Prebuilt/components/Notifications/PollNotificationModal.tsx +71 -0
  178. package/src/Prebuilt/components/Notifications/ReconnectNotifications.tsx +1 -5
  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 +32 -3
  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/dist/HLSView-EPPGI6XI.js.map +0 -7
  192. package/dist/chunk-ZAX5VT7V.js +0 -34686
  193. package/dist/chunk-ZAX5VT7V.js.map +0 -7
@@ -0,0 +1,71 @@
1
+ import React, { useEffect } from 'react';
2
+ import {
3
+ HMSNotificationTypes,
4
+ selectLocalPeerID,
5
+ selectPeerNameByID,
6
+ useHMSNotifications,
7
+ useHMSStore,
8
+ useHMSVanillaStore,
9
+ } from '@100mslive/react-sdk';
10
+ import { Button } from '../../../Button';
11
+ // @ts-ignore: No implicit Any
12
+ import { ToastManager } from '../Toast/ToastManager';
13
+ import { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
14
+ // @ts-ignore: No implicit Any
15
+ import { usePollViewToggle } from '../AppData/useSidepane';
16
+
17
+ const notificationTypes = [HMSNotificationTypes.POLL_STARTED, HMSNotificationTypes.POLL_STOPPED];
18
+
19
+ const pollToastKey: Record<string, string> = {};
20
+
21
+ export const PollNotificationModal = () => {
22
+ const togglePollView = usePollViewToggle();
23
+ const localPeerID = useHMSStore(selectLocalPeerID);
24
+ const vanillaStore = useHMSVanillaStore();
25
+ const screenProps = useRoomLayoutConferencingScreen();
26
+
27
+ const notification = useHMSNotifications(notificationTypes);
28
+
29
+ useEffect(() => {
30
+ switch (notification?.type) {
31
+ case HMSNotificationTypes.POLL_STARTED:
32
+ if (notification.data.startedBy !== localPeerID && screenProps.screenType !== 'hls_live_streaming') {
33
+ const pollStartedBy = vanillaStore.getState(selectPeerNameByID(notification.data.startedBy)) || 'Participant';
34
+
35
+ const pollToastID = ToastManager.addToast({
36
+ title: `${pollStartedBy} started a ${notification.data.type}: ${notification.data.title}`,
37
+ action: (
38
+ <Button
39
+ onClick={() => togglePollView(notification.data.id)}
40
+ variant="standard"
41
+ css={{
42
+ backgroundColor: '$surface_bright',
43
+ fontWeight: '$semiBold',
44
+ color: '$on_surface_high',
45
+ p: '$xs $md',
46
+ }}
47
+ >
48
+ {notification.data.type === 'quiz' ? 'Answer' : 'Vote'}
49
+ </Button>
50
+ ),
51
+ duration: Infinity,
52
+ });
53
+ pollToastKey[notification.data.id] = pollToastID;
54
+ }
55
+ break;
56
+ case HMSNotificationTypes.POLL_STOPPED:
57
+ {
58
+ const pollID = notification?.data.id;
59
+ if (pollID && pollToastKey?.[pollID]) {
60
+ ToastManager.removeToast(pollToastKey?.[notification.data.id]);
61
+ delete pollToastKey[notification?.data.id];
62
+ }
63
+ }
64
+ break;
65
+ default:
66
+ break;
67
+ }
68
+ }, [notification]);
69
+
70
+ return null;
71
+ };
@@ -5,11 +5,7 @@ import { ToastConfig } from '../Toast/ToastConfig';
5
5
  // @ts-ignore: No implicit Any
6
6
  import { ToastManager } from '../Toast/ToastManager';
7
7
 
8
- const notificationTypes = [
9
- HMSNotificationTypes.RECONNECTED,
10
- HMSNotificationTypes.RECONNECTING,
11
- HMSNotificationTypes.ERROR,
12
- ];
8
+ const notificationTypes = [HMSNotificationTypes.RECONNECTED, HMSNotificationTypes.RECONNECTING];
13
9
  let notificationId: string | null = null;
14
10
 
15
11
  export const ReconnectNotifications = () => {
@@ -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:
@@ -5,9 +5,11 @@ import {
5
5
  selectLocalPeerID,
6
6
  selectPeersMap,
7
7
  selectTracksMap,
8
+ useHMSActions,
8
9
  useHMSStatsStore,
9
10
  useHMSStore,
10
11
  } from '@100mslive/react-sdk';
12
+ import { Accordion } from '../../Accordion';
11
13
  import { HorizontalDivider } from '../../Divider';
12
14
  import { Dropdown } from '../../Dropdown';
13
15
  import { Label } from '../../Label';
@@ -27,6 +29,8 @@ export const StatsForNerds = ({ onOpenChange }) => {
27
29
  () => [{ id: 'local-peer', label: 'Local Peer Stats' }, ...tracksWithLabels],
28
30
  [tracksWithLabels],
29
31
  );
32
+ const hmsActions = useHMSActions();
33
+ const details = hmsActions.getDebugInfo();
30
34
  const [selectedStat, setSelectedStat] = useState(statsOptions[0]);
31
35
  const [showStatsOnTiles, setShowStatsOnTiles] = useSetUiSettings(UI_SETTINGS.showStatsOnTiles);
32
36
  const [open, setOpen] = useState(false);
@@ -46,7 +50,7 @@ export const StatsForNerds = ({ onOpenChange }) => {
46
50
  <Dialog.Content
47
51
  css={{
48
52
  width: 'min(500px, 95%)',
49
- maxHeight: '100%',
53
+ height: 'min(656px, 90%)',
50
54
  overflowY: 'auto',
51
55
  }}
52
56
  >
@@ -70,6 +74,7 @@ export const StatsForNerds = ({ onOpenChange }) => {
70
74
  </Text>
71
75
  </Flex>
72
76
  {/* Select */}
77
+
73
78
  <Flex
74
79
  direction="column"
75
80
  css={{
@@ -119,6 +124,9 @@ export const StatsForNerds = ({ onOpenChange }) => {
119
124
  ) : (
120
125
  <TrackStats trackID={selectedStat.id} layer={selectedStat.layer} local={selectedStat.local} />
121
126
  )}
127
+ <Flex justify="start" gap={4} css={{ m: '$10 0', w: '100%' }}>
128
+ <DebugInfo details={details} />
129
+ </Flex>
122
130
  </Dialog.Content>
123
131
  </Dialog.Portal>
124
132
  </Dialog.Root>
@@ -229,8 +237,29 @@ const TrackStats = ({ trackID, layer, local }) => {
229
237
  );
230
238
  };
231
239
 
232
- const StatsRow = React.memo(({ label, value }) => (
233
- <Box css={{ bg: '$surface_bright', w: 'calc(50% - $6)', p: '$8', r: '$3' }}>
240
+ const DebugInfo = ({ details }) => {
241
+ return (
242
+ <Accordion.Root type="single" collapsible css={{ w: '100%' }}>
243
+ <Accordion.Item value="Debug Info">
244
+ <Accordion.Header>
245
+ <Label variant="body2" css={{ c: '$on_surface_high' }}>
246
+ Debug Info
247
+ </Label>
248
+ </Accordion.Header>
249
+ <Accordion.Content>
250
+ <Flex css={{ flexWrap: 'wrap', mt: '$10', gap: '$10' }}>
251
+ <StatsRow css={{ w: '100%' }} label="Websocket URL" value={details?.websocketURL} />
252
+ <StatsRow css={{ w: '100%' }} label="Init Endpoint" value={details?.initEndpoint} />
253
+ <StatsRow css={{ w: '100%' }} label="Enabled flags" value={details?.enabledFlags?.join(', ')} />
254
+ </Flex>
255
+ </Accordion.Content>
256
+ </Accordion.Item>
257
+ </Accordion.Root>
258
+ );
259
+ };
260
+
261
+ const StatsRow = React.memo(({ label, value, css }) => (
262
+ <Box css={{ bg: '$surface_bright', w: 'calc(50% - $6)', p: '$8', r: '$3', ...css }}>
234
263
  <Text
235
264
  variant="overline"
236
265
  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
  };