@100mslive/roomkit-react 0.3.22-alpha.1 → 0.3.22-alpha.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. package/dist/ConferenceScreen-CSVWECB5.js +1778 -0
  2. package/dist/ConferenceScreen-CSVWECB5.js.map +7 -0
  3. package/dist/ConferenceScreen-YRURU3RV.css +2780 -0
  4. package/dist/{HLSView-Z2JID2W7.css.map → ConferenceScreen-YRURU3RV.css.map} +1 -1
  5. package/dist/EmbedView-N2E4DZQA.js +17 -0
  6. package/dist/EmbedView-N2E4DZQA.js.map +7 -0
  7. package/dist/EmbedView-S54NTHF5.css +2780 -0
  8. package/dist/EmbedView-S54NTHF5.css.map +7 -0
  9. package/dist/EmojiReaction-3X4ST4AU.js +11 -0
  10. package/dist/EmojiReaction-3X4ST4AU.js.map +7 -0
  11. package/dist/{HLSView-LCFZPBH3.js → HLSView-EYGGK6BH.js} +38 -24
  12. package/dist/HLSView-EYGGK6BH.js.map +7 -0
  13. package/dist/{HLSView-Z2JID2W7.css → HLSView-LBTFLMI4.css} +3 -3
  14. package/dist/HLSView-LBTFLMI4.css.map +7 -0
  15. package/dist/LeaveScreen-D6XU64JL.js +556 -0
  16. package/dist/LeaveScreen-D6XU64JL.js.map +7 -0
  17. package/dist/LeaveScreen-ZAG5UJZL.css +2780 -0
  18. package/dist/LeaveScreen-ZAG5UJZL.css.map +7 -0
  19. package/dist/MoreSettings-R7B4BSNT.css +2780 -0
  20. package/dist/MoreSettings-R7B4BSNT.css.map +7 -0
  21. package/dist/MoreSettings-TBJVM7OY.js +16 -0
  22. package/dist/MoreSettings-TBJVM7OY.js.map +7 -0
  23. package/dist/PDFView-JOIJDP65.js +84 -0
  24. package/dist/PDFView-JOIJDP65.js.map +7 -0
  25. package/dist/PDFView-RMR33QH4.css +2780 -0
  26. package/dist/PDFView-RMR33QH4.css.map +7 -0
  27. package/dist/Polls-IN3V2HFI.js +1584 -0
  28. package/dist/Polls-IN3V2HFI.js.map +7 -0
  29. package/dist/Polls-JW7JWGTE.css +2780 -0
  30. package/dist/Polls-JW7JWGTE.css.map +7 -0
  31. package/dist/Prebuilt/components/Notifications/RoleChangeNotification.d.ts +1 -0
  32. package/dist/RaiseHand-WES4KKMD.js +10 -0
  33. package/dist/RaiseHand-WES4KKMD.js.map +7 -0
  34. package/dist/RoleProminence-4ZBDBCMU.css +2780 -0
  35. package/dist/RoleProminence-4ZBDBCMU.css.map +7 -0
  36. package/dist/RoleProminence-PB32DLIB.js +116 -0
  37. package/dist/RoleProminence-PB32DLIB.js.map +7 -0
  38. package/dist/RoomDetailsPane-CZH2SNLE.js +53 -0
  39. package/dist/RoomDetailsPane-CZH2SNLE.js.map +7 -0
  40. package/dist/RoomDetailsPane-XWH2KEFI.css +2780 -0
  41. package/dist/RoomDetailsPane-XWH2KEFI.css.map +7 -0
  42. package/dist/ScreenshareLayout-XVENPVK3.js +358 -0
  43. package/dist/ScreenshareLayout-XVENPVK3.js.map +7 -0
  44. package/dist/ScreenshareLayout-YUW3KHAB.css +2780 -0
  45. package/dist/ScreenshareLayout-YUW3KHAB.css.map +7 -0
  46. package/dist/SidePaneTabs-QXCDHOGG.js +1354 -0
  47. package/dist/SidePaneTabs-QXCDHOGG.js.map +7 -0
  48. package/dist/SidePaneTabs-WQGVOWRP.css +2780 -0
  49. package/dist/SidePaneTabs-WQGVOWRP.css.map +7 -0
  50. package/dist/VBPicker-XN74N67R.js +322 -0
  51. package/dist/VBPicker-XN74N67R.js.map +7 -0
  52. package/dist/VBPicker-YDM2YIOM.css +2780 -0
  53. package/dist/VBPicker-YDM2YIOM.css.map +7 -0
  54. package/dist/WaitingView-77PRTIBV.js +10 -0
  55. package/dist/WaitingView-77PRTIBV.js.map +7 -0
  56. package/dist/WhiteboardLayout-FZC7SOSG.js +96 -0
  57. package/dist/WhiteboardLayout-FZC7SOSG.js.map +7 -0
  58. package/dist/WhiteboardLayout-MNTUWEVK.css +2780 -0
  59. package/dist/WhiteboardLayout-MNTUWEVK.css.map +7 -0
  60. package/dist/android-perm-1.png +0 -0
  61. package/dist/audio-level.png +0 -0
  62. package/dist/chunk-26D5FDBW.js +16812 -0
  63. package/dist/chunk-26D5FDBW.js.map +7 -0
  64. package/dist/chunk-2J5WS52X.js +2595 -0
  65. package/dist/chunk-2J5WS52X.js.map +7 -0
  66. package/dist/chunk-2LWOQMYY.js +30 -0
  67. package/dist/chunk-2LWOQMYY.js.map +7 -0
  68. package/dist/chunk-3MRQJSIY.js +171 -0
  69. package/dist/chunk-3MRQJSIY.js.map +7 -0
  70. package/dist/chunk-4X4WB7X3.js +98 -0
  71. package/dist/chunk-4X4WB7X3.js.map +7 -0
  72. package/dist/chunk-7QZJMUHM.js +90 -0
  73. package/dist/chunk-7QZJMUHM.js.map +7 -0
  74. package/dist/chunk-ABCV7TX5.js +71 -0
  75. package/dist/chunk-ABCV7TX5.js.map +7 -0
  76. package/dist/chunk-BQOT4DK7.js +418 -0
  77. package/dist/chunk-BQOT4DK7.js.map +7 -0
  78. package/dist/chunk-ENHSO6YN.js +6337 -0
  79. package/dist/chunk-ENHSO6YN.js.map +7 -0
  80. package/dist/chunk-JKWX7W4K.js +161 -0
  81. package/dist/chunk-JKWX7W4K.js.map +7 -0
  82. package/dist/chunk-LO4BXA4G.js +114 -0
  83. package/dist/chunk-LO4BXA4G.js.map +7 -0
  84. package/dist/chunk-MRVWNFXC.js +59 -0
  85. package/dist/chunk-MRVWNFXC.js.map +7 -0
  86. package/dist/chunk-OA4HW7HW.js +262 -0
  87. package/dist/chunk-OA4HW7HW.js.map +7 -0
  88. package/dist/chunk-PJQSPAFZ.js +178 -0
  89. package/dist/chunk-PJQSPAFZ.js.map +7 -0
  90. package/dist/chunk-QHQKY35W.js +830 -0
  91. package/dist/chunk-QHQKY35W.js.map +7 -0
  92. package/dist/chunk-QKXHQ6DV.js +254 -0
  93. package/dist/chunk-QKXHQ6DV.js.map +7 -0
  94. package/dist/chunk-RTWNTT77.js +62 -0
  95. package/dist/chunk-RTWNTT77.js.map +7 -0
  96. package/dist/chunk-TBXRX6MK.js +576 -0
  97. package/dist/chunk-TBXRX6MK.js.map +7 -0
  98. package/dist/chunk-TCOPR3BK.js +487 -0
  99. package/dist/chunk-TCOPR3BK.js.map +7 -0
  100. package/dist/chunk-VKORP2LF.js +41 -0
  101. package/dist/chunk-VKORP2LF.js.map +7 -0
  102. package/dist/chunk-YYVDCP5Z.js +136 -0
  103. package/dist/chunk-YYVDCP5Z.js.map +7 -0
  104. package/dist/empty-chat.svg +12 -0
  105. package/dist/index.cjs.css +2 -2
  106. package/dist/index.cjs.css.map +1 -1
  107. package/dist/index.cjs.js +17888 -17792
  108. package/dist/index.cjs.js.map +4 -4
  109. package/dist/index.css +2 -2
  110. package/dist/index.css.map +1 -1
  111. package/dist/index.js +25 -15
  112. package/dist/ios-perm-0.png +0 -0
  113. package/dist/meta.cjs.json +5326 -5184
  114. package/dist/meta.esbuild.json +8960 -6320
  115. package/dist/pdf-share.png +0 -0
  116. package/dist/screen-share.png +0 -0
  117. package/dist/transaction_error.svg +12 -0
  118. package/package.json +7 -7
  119. package/src/Prebuilt/App.tsx +6 -2
  120. package/src/Prebuilt/components/Chat/Chat.tsx +12 -8
  121. package/src/Prebuilt/components/Chat/ChatFooter.tsx +1 -1
  122. package/src/Prebuilt/components/Notifications/Notifications.tsx +2 -0
  123. package/src/Prebuilt/components/Notifications/PeerNotifications.tsx +0 -14
  124. package/src/Prebuilt/components/Notifications/RoleChangeNotification.tsx +24 -0
  125. package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +43 -31
  126. package/src/Prebuilt/layouts/HLSView.jsx +1 -0
  127. package/src/Prebuilt/layouts/PDFView.jsx +1 -0
  128. package/src/Prebuilt/layouts/SidePane.tsx +12 -6
  129. package/src/Prebuilt/layouts/VideoStreamingSection.tsx +35 -34
  130. package/dist/HLSView-LCFZPBH3.js.map +0 -7
  131. package/dist/chunk-CRGZUJSX.js +0 -34811
  132. package/dist/chunk-CRGZUJSX.js.map +0 -7
Binary file
Binary file
@@ -0,0 +1,12 @@
1
+ <svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M70 68.3333V26.6667C70 24.825 68.5083 23.3333 66.6667 23.3333H13.3333C11.4917 23.3333 10 24.825 10 26.6667V68.3333C10 70.175 11.4917 71.6667 13.3333 71.6667H66.6667C68.5083 71.6667 70 70.175 70 68.3333Z" fill="#272A31"/>
3
+ <path d="M20 31.6667H60C61.8417 31.6667 63.3333 33.1583 63.3333 35C63.3333 36.8417 61.8417 38.3333 60 38.3333H20C18.1583 38.3333 16.6667 36.8417 16.6667 35C16.6667 33.1583 18.1583 31.6667 20 31.6667Z" fill="#8F9099"/>
4
+ <path d="M58.3333 36.6667V10C58.3333 9.08 57.5867 8.33334 56.6667 8.33334H55C55 9.25334 54.2533 10 53.3333 10C52.4133 10 51.6667 9.25334 51.6667 8.33334H48.3333C48.3333 9.25334 47.5867 10 46.6667 10C45.7467 10 45 9.25334 45 8.33334H41.6667C41.6667 9.25334 40.92 10 40 10C39.08 10 38.3333 9.25334 38.3333 8.33334H35C35 9.25334 34.2533 10 33.3333 10C32.4133 10 31.6667 9.25334 31.6667 8.33334H28.3333C28.3333 9.25334 27.5867 10 26.6667 10C25.7467 10 25 9.25334 25 8.33334H23.3333C22.4133 8.33334 21.6667 9.08 21.6667 10V36.6667H58.3333Z" fill="#C74E5B"/>
5
+ <path d="M21.6667 43.3333H58.3333C60.175 43.3333 61.6667 44.825 61.6667 46.6667V50C61.6667 51.8417 60.175 53.3333 58.3333 53.3333H21.6667C19.825 53.3333 18.3333 51.8417 18.3333 50V46.6667C18.3333 44.825 19.825 43.3333 21.6667 43.3333Z" fill="#C5C6D0"/>
6
+ <path d="M60 66.6667H55C54.08 66.6667 53.3333 65.92 53.3333 65V60C53.3333 59.08 54.08 58.3333 55 58.3333H60C60.92 58.3333 61.6667 59.08 61.6667 60V65C61.6667 65.92 60.92 66.6667 60 66.6667Z" fill="#C5C6D0"/>
7
+ <path d="M25 66.6667H20C19.08 66.6667 18.3333 65.92 18.3333 65V60C18.3333 59.08 19.08 58.3333 20 58.3333H25C25.92 58.3333 26.6667 59.08 26.6667 60V65C26.6667 65.92 25.92 66.6667 25 66.6667ZM36.6667 66.6667H31.6667C30.7467 66.6667 30 65.92 30 65V60C30 59.08 30.7467 58.3333 31.6667 58.3333H36.6667C37.5867 58.3333 38.3333 59.08 38.3333 60V65C38.3333 65.92 37.5867 66.6667 36.6667 66.6667ZM48.3333 66.6667H43.3333C42.4133 66.6667 41.6667 65.92 41.6667 65V60C41.6667 59.08 42.4133 58.3333 43.3333 58.3333H48.3333C49.2533 58.3333 50 59.08 50 60V65C50 65.92 49.2533 66.6667 48.3333 66.6667Z" fill="#C5C6D0"/>
8
+ <path d="M58.3333 35H21.6667V38.3333H58.3333V35Z" fill="#C74E5B"/>
9
+ <path opacity="0.05" d="M45.3033 32.315C44.6383 32.315 44.01 32.0567 43.5367 31.585L40 28.0467L36.465 31.5817C35.9917 32.0533 35.365 32.3133 34.6967 32.3133C34.0283 32.3133 33.4 32.0533 32.9267 31.58L31.75 30.4033C31.2783 29.9333 31.0183 29.3033 31.0183 28.6333C31.0183 27.9667 31.2783 27.3383 31.75 26.8667L35.2867 23.3333L31.7517 19.7983C31.28 19.3283 31.02 18.7 31.02 18.0317C31.02 17.3617 31.28 16.7333 31.7517 16.2617L32.93 15.0833C33.4017 14.6117 34.0283 14.3517 34.6983 14.3517C35.3633 14.3517 35.9917 14.61 36.465 15.0817L40 18.62L43.535 15.0833C44.0083 14.6117 44.635 14.3517 45.3033 14.3517C45.9683 14.3517 46.5967 14.61 47.07 15.0817L48.25 16.2617C48.7217 16.7317 48.9817 17.3617 48.9817 18.0317C48.9817 18.6983 48.7217 19.3267 48.25 19.7983L44.7117 23.3333L48.2483 26.87C49.2217 27.84 49.2233 29.425 48.2517 30.4017L47.07 31.5833C46.5983 32.055 45.9717 32.315 45.3033 32.315Z" fill="black"/>
10
+ <path opacity="0.07" d="M45.3033 31.4817C44.8583 31.4817 44.44 31.3083 44.125 30.995L40 26.8683L35.875 30.9933C35.56 31.3083 35.1417 31.48 34.6967 31.48C34.25 31.48 33.8317 31.3067 33.5183 30.9917L32.34 29.8133C32.025 29.4983 31.8517 29.08 31.8517 28.6333C31.8517 28.1883 32.025 27.77 32.34 27.455L36.465 23.3333L32.34 19.2083C32.0267 18.895 31.8517 18.4767 31.8517 18.0317C31.8517 17.585 32.025 17.1667 32.34 16.8517L33.5183 15.6733C33.8317 15.36 34.25 15.1867 34.6967 15.1867C35.1417 15.1867 35.56 15.36 35.875 15.6733L40 19.7983L44.125 15.6717C44.44 15.3567 44.8583 15.185 45.3033 15.185C45.7483 15.185 46.1667 15.3583 46.4817 15.6717L47.66 16.8517C47.975 17.1667 48.1483 17.585 48.1483 18.0317C48.1483 18.4767 47.975 18.895 47.66 19.21L43.5333 23.3333L47.66 27.46C48.31 28.1067 48.31 29.1633 47.6617 29.815L46.4817 30.995C46.1667 31.3083 45.7483 31.4817 45.3033 31.4817Z" fill="black"/>
11
+ <path d="M42.3567 23.3333L47.0717 18.6183C47.3967 18.2933 47.3967 17.765 47.0717 17.44L45.8933 16.2617C45.5667 15.9367 45.04 15.9367 44.715 16.2617L40 20.9767L35.2867 16.2633C34.9617 15.9383 34.4333 15.9383 34.1083 16.2633L32.93 17.4417C32.605 17.7667 32.605 18.295 32.93 18.62L37.6433 23.3333L32.93 28.0467C32.605 28.3717 32.605 28.9 32.93 29.225L34.1083 30.4033C34.4333 30.7283 34.9617 30.7283 35.2867 30.4033L40 25.69L44.715 30.405C45.04 30.73 45.5683 30.73 45.8933 30.405L47.0717 29.2267C47.3967 28.9 47.3967 28.3733 47.0717 28.0483L42.3567 23.3333Z" fill="#FFEDEC"/>
12
+ </svg>
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "prebuilt",
11
11
  "roomkit"
12
12
  ],
13
- "version": "0.3.22-alpha.1",
13
+ "version": "0.3.22-alpha.3",
14
14
  "author": "100ms",
15
15
  "license": "MIT",
16
16
  "repository": {
@@ -75,12 +75,12 @@
75
75
  "react": ">=17.0.2 <19.0.0"
76
76
  },
77
77
  "dependencies": {
78
- "@100mslive/hls-player": "0.3.22-alpha.1",
78
+ "@100mslive/hls-player": "0.3.22-alpha.3",
79
79
  "@100mslive/hms-noise-cancellation": "0.0.1",
80
- "@100mslive/hms-virtual-background": "1.13.22-alpha.1",
81
- "@100mslive/hms-whiteboard": "0.0.12-alpha.1",
82
- "@100mslive/react-icons": "0.10.22-alpha.1",
83
- "@100mslive/react-sdk": "0.10.22-alpha.1",
80
+ "@100mslive/hms-virtual-background": "1.13.22-alpha.3",
81
+ "@100mslive/hms-whiteboard": "0.0.12-alpha.3",
82
+ "@100mslive/react-icons": "0.10.22-alpha.3",
83
+ "@100mslive/react-sdk": "0.10.22-alpha.3",
84
84
  "@100mslive/types-prebuilt": "0.12.12",
85
85
  "@emoji-mart/data": "^1.0.6",
86
86
  "@emoji-mart/react": "^1.0.1",
@@ -117,5 +117,5 @@
117
117
  "uuid": "^8.3.2",
118
118
  "worker-timers": "^7.0.40"
119
119
  },
120
- "gitHead": "12d0289650b160b7c4b97cbd4336877a2e4baf4b"
120
+ "gitHead": "a8567a9c3235539b3b59e687337b344f22b5375c"
121
121
  }
@@ -13,14 +13,12 @@ import {
13
13
  import { AppData } from './components/AppData/AppData';
14
14
  // @ts-ignore: No implicit Any
15
15
  import AuthToken from './components/AuthToken';
16
- import { ConferenceScreen } from './components/ConferenceScreen';
17
16
  // @ts-ignore: No implicit Any
18
17
  import { ErrorBoundary } from './components/ErrorBoundary';
19
18
  // @ts-ignore: No implicit Any
20
19
  import { Init } from './components/init/Init';
21
20
  // @ts-ignore: No implicit Any
22
21
  import { KeyboardHandler } from './components/Input/KeyboardInputManager';
23
- import { LeaveScreen } from './components/LeaveScreen';
24
22
  import { MwebLandscapePrompt } from './components/MwebLandscapePrompt';
25
23
  import { Notifications } from './components/Notifications';
26
24
  import { PIPProvider } from './components/PIP/PIPProvider';
@@ -50,6 +48,12 @@ import {
50
48
  import { FeatureFlags } from './services/FeatureFlags';
51
49
  // @ts-ignore: No implicit Any
52
50
  import { DEFAULT_PORTAL_CONTAINER } from './common/constants';
51
+ const LeaveScreen = React.lazy(() =>
52
+ import('./components/LeaveScreen').then(module => ({ default: module.LeaveScreen })),
53
+ );
54
+ const ConferenceScreen = React.lazy(() =>
55
+ import('./components/ConferenceScreen').then(module => ({ default: module.ConferenceScreen })),
56
+ );
53
57
 
54
58
  export type HMSPrebuiltOptions = {
55
59
  userName?: string;
@@ -1,4 +1,4 @@
1
- import React, { MutableRefObject, useCallback, useRef } from 'react';
1
+ import React, { MutableRefObject, Suspense, useCallback, useRef } from 'react';
2
2
  import { useMedia } from 'react-use';
3
3
  import { VariableSizeList } from 'react-window';
4
4
  import { selectSessionStore, selectUnreadHMSMessagesCount } from '@100mslive/hms-video-store';
@@ -8,10 +8,6 @@ import { ChevronDownIcon } from '@100mslive/react-icons';
8
8
  import { Button } from '../../../Button';
9
9
  import { Box, Flex } from '../../../Layout';
10
10
  import { config as cssConfig } from '../../../Theme';
11
- // @ts-ignore: No implicit any
12
- import { EmojiReaction } from '../EmojiReaction';
13
- import { MoreSettings } from '../MoreSettings/MoreSettings';
14
- import { RaiseHand } from '../RaiseHand';
15
11
  import { ChatBody } from './ChatBody';
16
12
  import { ChatFooter } from './ChatFooter';
17
13
  import { ChatBlocked, ChatPaused } from './ChatStates';
@@ -21,6 +17,12 @@ import { useSidepaneResetOnLayoutUpdate } from '../AppData/useSidepaneResetOnLay
21
17
  import { useIsPeerBlacklisted } from '../hooks/useChatBlacklist';
22
18
  import { useLandscapeHLSStream, useMobileHLSStream } from '../../common/hooks';
23
19
  import { SESSION_STORE_KEY, SIDE_PANE_OPTIONS } from '../../common/constants';
20
+ const MoreSettings = React.lazy(() =>
21
+ import('../MoreSettings/MoreSettings').then(module => ({ default: module.MoreSettings })),
22
+ );
23
+ const RaiseHand = React.lazy(() => import('../RaiseHand').then(module => ({ default: module.RaiseHand })));
24
+ // @ts-ignore: No implicit any
25
+ const EmojiReaction = React.lazy(() => import('../EmojiReaction').then(module => ({ default: module.EmojiReaction })));
24
26
 
25
27
  export const Chat = () => {
26
28
  const { elements, screenType } = useRoomLayoutConferencingScreen();
@@ -65,10 +67,10 @@ export const Chat = () => {
65
67
  <ChatPaused />
66
68
  <ChatBlocked />
67
69
  {streaming && (!isChatEnabled || isLocalPeerBlacklisted) && (
68
- <>
70
+ <Suspense fallback={<></>}>
69
71
  <RaiseHand css={{ bg: '$surface_default' }} />
70
72
  <MoreSettings elements={elements} screenType={screenType} />
71
- </>
73
+ </Suspense>
72
74
  )}
73
75
  </Flex>
74
76
  {isMobile && elements?.chat?.is_overlay && !streaming ? <PinnedMessage /> : null}
@@ -129,7 +131,9 @@ export const Chat = () => {
129
131
  .otherwise(() => ({})),
130
132
  }}
131
133
  >
132
- <EmojiReaction />
134
+ <Suspense fallback={<></>}>
135
+ <EmojiReaction />
136
+ </Suspense>
133
137
  </Box>
134
138
  )}
135
139
  </Flex>
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react';
2
2
  import { useMedia } from 'react-use';
3
- import data from '@emoji-mart/data';
3
+ import data from '@emoji-mart/data/sets/14/apple.json';
4
4
  import Picker from '@emoji-mart/react';
5
5
  import { HMSException, selectLocalPeer, useHMSActions, useHMSStore } from '@100mslive/react-sdk';
6
6
  import { EmojiIcon, PauseCircleIcon, SendIcon, VerticalMenuIcon } from '@100mslive/react-icons';
@@ -15,6 +15,7 @@ import { PeerNotifications } from './PeerNotifications';
15
15
  import { PermissionErrorNotificationModal } from './PermissionErrorModal';
16
16
  import { PollNotificationModal } from './PollNotificationModal';
17
17
  import { ReconnectNotifications } from './ReconnectNotifications';
18
+ import { RoleChangeNotification } from './RoleChangeNotification';
18
19
  import { TrackBulkUnmuteModal } from './TrackBulkUnmuteModal';
19
20
  import { TrackNotifications } from './TrackNotifications';
20
21
  import { TrackUnmuteModal } from './TrackUnmuteModal';
@@ -46,6 +47,7 @@ export function Notifications() {
46
47
  <TrackBulkUnmuteModal />
47
48
  <TrackNotifications />
48
49
  {roomState === HMSRoomState.Connected ? <PeerNotifications /> : null}
50
+ <RoleChangeNotification />
49
51
  <PollNotificationModal />
50
52
  <MessageNotifications />
51
53
  <DeviceChangeNotifications />
@@ -1,11 +1,8 @@
1
1
  import { useEffect } from 'react';
2
2
  import { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';
3
- import { useUpdateRoomLayout } from '../../provider/roomLayoutProvider';
4
3
  // @ts-ignore: No implicit Any
5
4
  import { ToastBatcher } from '../Toast/ToastBatcher';
6
5
  // @ts-ignore: No implicit Any
7
- import { ToastManager } from '../Toast/ToastManager';
8
- // @ts-ignore: No implicit Any
9
6
  import { useSetSubscribedChatSelector, useSubscribedNotifications } from '../AppData/useUISettings';
10
7
  // @ts-ignore: No implicit Any
11
8
  import { CHAT_SELECTOR, SUBSCRIBED_NOTIFICATIONS } from '../../common/constants';
@@ -14,7 +11,6 @@ const notificationTypes = [
14
11
  HMSNotificationTypes.PEER_JOINED,
15
12
  HMSNotificationTypes.PEER_LEFT,
16
13
  HMSNotificationTypes.NAME_UPDATED,
17
- HMSNotificationTypes.ROLE_UPDATED,
18
14
  ];
19
15
 
20
16
  export const PeerNotifications = () => {
@@ -22,7 +18,6 @@ export const PeerNotifications = () => {
22
18
  const isPeerJoinSubscribed = useSubscribedNotifications(SUBSCRIBED_NOTIFICATIONS.PEER_JOINED);
23
19
  const isPeerLeftSubscribed = useSubscribedNotifications(SUBSCRIBED_NOTIFICATIONS.PEER_LEFT);
24
20
  const [selectedPeer, setPeerSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.PEER);
25
- const updateRoomLayoutForRole = useUpdateRoomLayout();
26
21
 
27
22
  useEffect(() => {
28
23
  if (!notification?.data) {
@@ -47,15 +42,6 @@ export const PeerNotifications = () => {
47
42
  case HMSNotificationTypes.NAME_UPDATED:
48
43
  console.log(notification.data.id + ' changed their name to ' + notification.data.name);
49
44
  return;
50
- case HMSNotificationTypes.ROLE_UPDATED: {
51
- if (notification.data?.isLocal && notification.data?.roleName) {
52
- ToastManager.addToast({
53
- title: `You are now a ${notification.data.roleName}`,
54
- });
55
- updateRoomLayoutForRole?.(notification.data.roleName);
56
- }
57
- return;
58
- }
59
45
  default:
60
46
  return;
61
47
  }
@@ -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
+ };
@@ -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 (
@@ -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
  };