@100mslive/roomkit-react 0.3.23-alpha.0 → 0.3.24-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Accordion/Accordion.d.ts +134 -322
- package/dist/Accordion/index.d.ts +134 -322
- package/dist/Avatar/Avatar.d.ts +47 -141
- package/dist/Button/Button.d.ts +47 -141
- package/dist/Checkbox/Checkbox.d.ts +134 -322
- package/dist/Collapsible/Collapsible.d.ts +201 -483
- package/dist/ConferenceScreen-CLPW3BGP.css +2780 -0
- package/dist/{HLSView-DDIGCKAW.css.map → ConferenceScreen-CLPW3BGP.css.map} +1 -1
- package/dist/ConferenceScreen-M6RBPTAJ.js +1774 -0
- package/dist/ConferenceScreen-M6RBPTAJ.js.map +7 -0
- package/dist/Divider/Divider.d.ts +134 -322
- package/dist/Dropdown/Dropdown.d.ts +804 -1932
- package/dist/EmbedView-DDSO7ZCV.js +17 -0
- package/dist/EmbedView-DDSO7ZCV.js.map +7 -0
- package/dist/EmbedView-HGIUZHKA.css +2780 -0
- package/dist/EmbedView-HGIUZHKA.css.map +7 -0
- package/dist/EmojiReaction-23JDKJD4.js +11 -0
- package/dist/EmojiReaction-23JDKJD4.js.map +7 -0
- package/dist/Fieldset/Fieldset.d.ts +47 -141
- package/dist/Footer/Footer.d.ts +536 -1288
- package/dist/{HLSView-DDIGCKAW.css → HLSView-OW77EAAO.css} +3 -3
- package/dist/HLSView-OW77EAAO.css.map +7 -0
- package/dist/{HLSView-QZO4JEB7.js → HLSView-Q6GEB3UM.js} +38 -24
- package/dist/HLSView-Q6GEB3UM.js.map +7 -0
- package/dist/IconButton/IconButton.d.ts +47 -141
- package/dist/Input/Input.d.ts +362 -926
- package/dist/Label/Label.d.ts +47 -141
- package/dist/Layout/Box.d.ts +47 -141
- package/dist/Layout/Flex.d.ts +47 -141
- package/dist/LeaveScreen-BYTE73MT.js +556 -0
- package/dist/LeaveScreen-BYTE73MT.js.map +7 -0
- package/dist/LeaveScreen-P7AATEIF.css +2780 -0
- package/dist/LeaveScreen-P7AATEIF.css.map +7 -0
- package/dist/Link/Link.d.ts +47 -141
- package/dist/Modal/Dialog.d.ts +329 -987
- package/dist/Modal/DialogContent.d.ts +469 -1127
- package/dist/MoreSettings-LV5X2U6K.css +2780 -0
- package/dist/MoreSettings-LV5X2U6K.css.map +7 -0
- package/dist/MoreSettings-WSHMMNOC.js +16 -0
- package/dist/MoreSettings-WSHMMNOC.js.map +7 -0
- package/dist/PDFView-RIPRIIH6.css +2780 -0
- package/dist/PDFView-RIPRIIH6.css.map +7 -0
- package/dist/PDFView-ZFSG2ESE.js +84 -0
- package/dist/PDFView-ZFSG2ESE.js.map +7 -0
- package/dist/Pagination/StyledPagination.d.ts +268 -644
- package/dist/Polls-QWW5LTTB.js +1584 -0
- package/dist/Polls-QWW5LTTB.js.map +7 -0
- package/dist/Polls-ULYGUPPF.css +2780 -0
- package/dist/Polls-ULYGUPPF.css.map +7 -0
- package/dist/Popover/index.d.ts +201 -483
- package/dist/Prebuilt/IconButton.d.ts +134 -322
- package/dist/Prebuilt/components/Chat/ChatBody.d.ts +134 -322
- package/dist/Prebuilt/components/Leave/LeaveAtoms.d.ts +335 -805
- package/dist/Prebuilt/components/Notifications/DeviceChangeNotifications.d.ts +1 -0
- package/dist/Prebuilt/components/Notifications/ErrorNotifications.d.ts +1 -0
- package/dist/Prebuilt/components/Notifications/MessageNotifications.d.ts +1 -0
- package/dist/Prebuilt/components/Notifications/PollNotificationModal.d.ts +1 -0
- package/dist/Prebuilt/components/Notifications/RoleChangeNotification.d.ts +1 -0
- package/dist/Prebuilt/components/Settings/common.d.ts +134 -322
- package/dist/Progress/index.d.ts +134 -322
- package/dist/RadioGroup/RadioGroup.d.ts +201 -483
- package/dist/RaiseHand-K7NFLH7H.js +10 -0
- package/dist/RaiseHand-K7NFLH7H.js.map +7 -0
- package/dist/ReactSelect/ReactSelect.d.ts +670 -1610
- package/dist/RoleProminence-235AFT7F.js +116 -0
- package/dist/RoleProminence-235AFT7F.js.map +7 -0
- package/dist/RoleProminence-6XN3POS5.css +2780 -0
- package/dist/RoleProminence-6XN3POS5.css.map +7 -0
- package/dist/RoomDetailsPane-O5TFMTPI.css +2780 -0
- package/dist/RoomDetailsPane-O5TFMTPI.css.map +7 -0
- package/dist/RoomDetailsPane-RF3D3TDR.js +53 -0
- package/dist/RoomDetailsPane-RF3D3TDR.js.map +7 -0
- package/dist/ScreenshareLayout-KNEB3AJJ.css +2780 -0
- package/dist/ScreenshareLayout-KNEB3AJJ.css.map +7 -0
- package/dist/ScreenshareLayout-PSQMS3NC.js +358 -0
- package/dist/ScreenshareLayout-PSQMS3NC.js.map +7 -0
- package/dist/Select/Select.d.ts +201 -483
- package/dist/Sheet/Sheet.d.ts +329 -987
- package/dist/SidePaneTabs-I6DECE5R.css +2780 -0
- package/dist/SidePaneTabs-I6DECE5R.css.map +7 -0
- package/dist/SidePaneTabs-NXHBI2JB.js +1354 -0
- package/dist/SidePaneTabs-NXHBI2JB.js.map +7 -0
- package/dist/Slider/Slider.d.ts +47 -141
- package/dist/Stats/StyledStats.d.ts +402 -966
- package/dist/Switch/Switch.d.ts +47 -141
- package/dist/Tabs/Tabs.d.ts +268 -644
- package/dist/Text/Text.d.ts +47 -141
- package/dist/TextArea/TextArea.d.ts +47 -141
- package/dist/Theme/base.config.d.ts +26 -78
- package/dist/Theme/stitches.config.d.ts +1046 -1493
- package/dist/TileMenu/StyledMenuTile.d.ts +469 -1127
- package/dist/Toast/Toast.d.ts +382 -946
- package/dist/VBPicker-2CQ3IIO7.js +322 -0
- package/dist/VBPicker-2CQ3IIO7.js.map +7 -0
- package/dist/VBPicker-DCNYGO23.css +2780 -0
- package/dist/VBPicker-DCNYGO23.css.map +7 -0
- package/dist/Video/Video.d.ts +47 -141
- package/dist/VideoList/StyledVideoList.d.ts +201 -483
- package/dist/VideoTile/StyledVideoTile.d.ts +670 -1610
- package/dist/WaitingView-NZIUOXBI.js +10 -0
- package/dist/WaitingView-NZIUOXBI.js.map +7 -0
- package/dist/WhiteboardLayout-4YLFM3EY.js +96 -0
- package/dist/WhiteboardLayout-4YLFM3EY.js.map +7 -0
- package/dist/WhiteboardLayout-JUOBDFKY.css +2780 -0
- package/dist/WhiteboardLayout-JUOBDFKY.css.map +7 -0
- package/dist/android-perm-1.png +0 -0
- package/dist/audio-level.png +0 -0
- package/dist/chunk-3C7IESSI.js +254 -0
- package/dist/chunk-3C7IESSI.js.map +7 -0
- package/dist/chunk-7FD3VT6Q.js +114 -0
- package/dist/chunk-7FD3VT6Q.js.map +7 -0
- package/dist/chunk-AHI4HCY3.js +62 -0
- package/dist/chunk-AHI4HCY3.js.map +7 -0
- package/dist/chunk-BGSYLCVD.js +6337 -0
- package/dist/chunk-BGSYLCVD.js.map +7 -0
- package/dist/chunk-DANANDDE.js +418 -0
- package/dist/chunk-DANANDDE.js.map +7 -0
- package/dist/chunk-ETRNLEWQ.js +2658 -0
- package/dist/chunk-ETRNLEWQ.js.map +7 -0
- package/dist/chunk-EWPHJFZJ.js +487 -0
- package/dist/chunk-EWPHJFZJ.js.map +7 -0
- package/dist/chunk-F63YJBI4.js +98 -0
- package/dist/chunk-F63YJBI4.js.map +7 -0
- package/dist/chunk-GLAJUP3O.js +576 -0
- package/dist/chunk-GLAJUP3O.js.map +7 -0
- package/dist/chunk-GOXRTCTY.js +90 -0
- package/dist/chunk-GOXRTCTY.js.map +7 -0
- package/dist/chunk-HMCBZI3A.js +59 -0
- package/dist/chunk-HMCBZI3A.js.map +7 -0
- package/dist/chunk-HVYTC3PX.js +171 -0
- package/dist/chunk-HVYTC3PX.js.map +7 -0
- package/dist/chunk-LJVP6AWF.js +262 -0
- package/dist/chunk-LJVP6AWF.js.map +7 -0
- package/dist/chunk-LXJGCRKM.js +30 -0
- package/dist/chunk-LXJGCRKM.js.map +7 -0
- package/dist/chunk-MG3UGW66.js +16800 -0
- package/dist/chunk-MG3UGW66.js.map +7 -0
- package/dist/chunk-MUKUP7JU.js +161 -0
- package/dist/chunk-MUKUP7JU.js.map +7 -0
- package/dist/chunk-OV6MVDCL.js +41 -0
- package/dist/chunk-OV6MVDCL.js.map +7 -0
- package/dist/chunk-P6NV2XO4.js +178 -0
- package/dist/chunk-P6NV2XO4.js.map +7 -0
- package/dist/chunk-REL3HBSD.js +71 -0
- package/dist/chunk-REL3HBSD.js.map +7 -0
- package/dist/chunk-U4SQBXPZ.js +830 -0
- package/dist/chunk-U4SQBXPZ.js.map +7 -0
- package/dist/chunk-YEL5ZTFU.js +136 -0
- package/dist/chunk-YEL5ZTFU.js.map +7 -0
- package/dist/empty-chat.svg +12 -0
- package/dist/index.cjs.css +2 -2
- package/dist/index.cjs.css.map +1 -1
- package/dist/index.cjs.js +21713 -21508
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.js +25 -15
- package/dist/ios-perm-0.png +0 -0
- package/dist/meta.cjs.json +5515 -5153
- package/dist/meta.esbuild.json +8998 -6138
- package/dist/pdf-share.png +0 -0
- package/dist/screen-share.png +0 -0
- package/dist/transaction_error.svg +12 -0
- package/package.json +8 -8
- package/src/Avatar/Avatar.tsx +1 -1
- package/src/Popover/Popover.stories.tsx +1 -1
- package/src/Prebuilt/App.tsx +6 -2
- package/src/Prebuilt/components/Chat/Chat.tsx +12 -8
- package/src/Prebuilt/components/Chat/ChatFooter.tsx +1 -1
- package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx +14 -1
- package/src/Prebuilt/components/Notifications/DeviceChangeNotifications.tsx +18 -0
- package/src/Prebuilt/components/Notifications/ErrorNotifications.tsx +56 -0
- package/src/Prebuilt/components/Notifications/MessageNotifications.tsx +24 -0
- package/src/Prebuilt/components/Notifications/Notifications.tsx +13 -171
- package/src/Prebuilt/components/Notifications/PeerNotifications.tsx +9 -2
- package/src/Prebuilt/components/Notifications/PollNotificationModal.tsx +71 -0
- package/src/Prebuilt/components/Notifications/ReconnectNotifications.tsx +1 -5
- package/src/Prebuilt/components/Notifications/RoleChangeNotification.tsx +24 -0
- package/src/Prebuilt/components/Notifications/TrackBulkUnmuteModal.tsx +7 -5
- package/src/Prebuilt/components/Notifications/TrackNotifications.tsx +23 -1
- package/src/Prebuilt/components/Notifications/TrackUnmuteModal.tsx +13 -5
- package/src/Prebuilt/components/StatsForNerds.jsx +122 -9
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +43 -31
- package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +2 -2
- package/src/Prebuilt/components/VirtualBackground/VBOption.tsx +3 -1
- package/src/Prebuilt/components/VirtualBackground/VBPicker.tsx +6 -0
- package/src/Prebuilt/layouts/HLSView.jsx +1 -0
- package/src/Prebuilt/layouts/PDFView.jsx +1 -0
- package/src/Prebuilt/layouts/SidePane.tsx +12 -6
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +35 -34
- package/src/Prebuilt/layouts/WaitingView.tsx +2 -2
- package/dist/HLSView-QZO4JEB7.js.map +0 -7
- package/dist/chunk-J2QT7G3M.js +0 -34759
- package/dist/chunk-J2QT7G3M.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.
|
13
|
+
"version": "0.3.24-alpha.0",
|
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.
|
78
|
+
"@100mslive/hls-player": "0.3.24-alpha.0",
|
79
79
|
"@100mslive/hms-noise-cancellation": "0.0.1",
|
80
|
-
"@100mslive/hms-virtual-background": "1.13.
|
81
|
-
"@100mslive/hms-whiteboard": "0.0.
|
82
|
-
"@100mslive/react-icons": "0.10.
|
83
|
-
"@100mslive/react-sdk": "0.10.
|
80
|
+
"@100mslive/hms-virtual-background": "1.13.24-alpha.0",
|
81
|
+
"@100mslive/hms-whiteboard": "0.0.14-alpha.0",
|
82
|
+
"@100mslive/react-icons": "0.10.24-alpha.0",
|
83
|
+
"@100mslive/react-sdk": "0.10.24-alpha.0",
|
84
84
|
"@100mslive/types-prebuilt": "0.12.12",
|
85
85
|
"@emoji-mart/data": "^1.0.6",
|
86
86
|
"@emoji-mart/react": "^1.0.1",
|
@@ -99,7 +99,7 @@
|
|
99
99
|
"@radix-ui/react-tabs": "1.0.0",
|
100
100
|
"@radix-ui/react-toast": "1.0.0",
|
101
101
|
"@radix-ui/react-tooltip": "1.0.6",
|
102
|
-
"@stitches/react": "
|
102
|
+
"@stitches/react": "1.3.1-1",
|
103
103
|
"emoji-mart": "^5.2.2",
|
104
104
|
"eventemitter2": "^6.4.9",
|
105
105
|
"lodash.merge": "^4.6.2",
|
@@ -117,5 +117,5 @@
|
|
117
117
|
"uuid": "^8.3.2",
|
118
118
|
"worker-timers": "^7.0.40"
|
119
119
|
},
|
120
|
-
"gitHead": "
|
120
|
+
"gitHead": "8d5f8d40926c57adca1b1c3652674b67175acd4c"
|
121
121
|
}
|
package/src/Avatar/Avatar.tsx
CHANGED
package/src/Prebuilt/App.tsx
CHANGED
@@ -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
|
-
<
|
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';
|
@@ -43,6 +43,8 @@ import { StopRecordingInSheet } from '../../Header/StreamActions';
|
|
43
43
|
// @ts-ignore: No implicit any
|
44
44
|
import SettingsModal from '../../Settings/SettingsModal';
|
45
45
|
// @ts-ignore: No implicit any
|
46
|
+
import { StatsForNerds } from '../../StatsForNerds';
|
47
|
+
// @ts-ignore: No implicit any
|
46
48
|
import { ToastManager } from '../../Toast/ToastManager';
|
47
49
|
// @ts-ignore: No implicit any
|
48
50
|
import { ActionTile } from '../ActionTile';
|
@@ -94,6 +96,7 @@ export const MwebOptions = ({
|
|
94
96
|
const [openModals, setOpenModals] = useState(new Set());
|
95
97
|
const [openOptionsSheet, setOpenOptionsSheet] = useState(false);
|
96
98
|
const [openSettingsSheet, setOpenSettingsSheet] = useState(false);
|
99
|
+
const [openStatsForNerdsSheet, setOpenStatsForNerdsSheet] = useState(false);
|
97
100
|
const [showEmojiCard, setShowEmojiCard] = useState(false);
|
98
101
|
const [showRecordingOn, setShowRecordingOn] = useState(false);
|
99
102
|
const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
@@ -269,7 +272,15 @@ export const MwebOptions = ({
|
|
269
272
|
<SettingsIcon />
|
270
273
|
<ActionTile.Title>Settings</ActionTile.Title>
|
271
274
|
</ActionTile.Root>
|
272
|
-
|
275
|
+
<ActionTile.Root
|
276
|
+
onClick={() => {
|
277
|
+
setOpenStatsForNerdsSheet(true);
|
278
|
+
setOpenOptionsSheet(false);
|
279
|
+
}}
|
280
|
+
>
|
281
|
+
<InfoIcon />
|
282
|
+
<ActionTile.Title>Stats For Nerds</ActionTile.Title>
|
283
|
+
</ActionTile.Root>
|
273
284
|
{isConnected && permissions?.browserRecording ? (
|
274
285
|
<ActionTile.Root
|
275
286
|
disabled={isHLSRunning}
|
@@ -316,6 +327,8 @@ export const MwebOptions = ({
|
|
316
327
|
</Sheet.Content>
|
317
328
|
</Sheet.Root>
|
318
329
|
<SettingsModal open={openSettingsSheet} onOpenChange={setOpenSettingsSheet} screenType={screenType} />
|
330
|
+
<StatsForNerds open={openStatsForNerdsSheet} onOpenChange={setOpenStatsForNerdsSheet} />
|
331
|
+
|
319
332
|
{openModals.has(MODALS.MUTE_ALL) && (
|
320
333
|
<MuteAllModal onOpenChange={(value: boolean) => updateState(MODALS.MUTE_ALL, value)} isMobile />
|
321
334
|
)}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { useEffect } from 'react';
|
2
|
+
import { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';
|
3
|
+
// @ts-ignore: No implicit Any
|
4
|
+
import { ToastManager } from '../Toast/ToastManager';
|
5
|
+
|
6
|
+
export const DeviceChangeNotifications = () => {
|
7
|
+
const notification = useHMSNotifications(HMSNotificationTypes.DEVICE_CHANGE_UPDATE);
|
8
|
+
|
9
|
+
useEffect(() => {
|
10
|
+
if (notification) {
|
11
|
+
ToastManager.addToast({
|
12
|
+
title: notification.message,
|
13
|
+
});
|
14
|
+
}
|
15
|
+
}, [notification]);
|
16
|
+
|
17
|
+
return null;
|
18
|
+
};
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import React, { useEffect } from 'react';
|
2
|
+
import { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';
|
3
|
+
import { GroupIcon } from '@100mslive/react-icons';
|
4
|
+
import { Box } from '../../../Layout';
|
5
|
+
// @ts-ignore: No implicit Any
|
6
|
+
import { ToastManager } from '../Toast/ToastManager';
|
7
|
+
// @ts-ignore: No implicit Any
|
8
|
+
import { useSubscribedNotifications } from '../AppData/useUISettings';
|
9
|
+
|
10
|
+
export const ErrorNotifications = () => {
|
11
|
+
const notification = useHMSNotifications(HMSNotificationTypes.ERROR);
|
12
|
+
const subscribedNotifications = useSubscribedNotifications() || {};
|
13
|
+
|
14
|
+
useEffect(() => {
|
15
|
+
if (!notification || !notification.data) return;
|
16
|
+
|
17
|
+
const { isTerminal, action, code, message, description } = notification.data;
|
18
|
+
|
19
|
+
if (isTerminal && action !== 'INIT') {
|
20
|
+
if ([500, 6008].includes(code)) {
|
21
|
+
ToastManager.addToast({
|
22
|
+
title: `Error: ${message}`,
|
23
|
+
});
|
24
|
+
} else if (message === 'role limit reached') {
|
25
|
+
ToastManager.addToast({
|
26
|
+
title: 'The room is currently full, try joining later',
|
27
|
+
close: true,
|
28
|
+
icon: (
|
29
|
+
<Box css={{ color: '$alert_error_default' }}>
|
30
|
+
<GroupIcon />
|
31
|
+
</Box>
|
32
|
+
),
|
33
|
+
});
|
34
|
+
} else {
|
35
|
+
ToastManager.addToast({
|
36
|
+
title: message || 'We couldn’t reconnect you. When you’re back online, try joining the room.',
|
37
|
+
close: false,
|
38
|
+
});
|
39
|
+
}
|
40
|
+
return;
|
41
|
+
}
|
42
|
+
// Autoplay error or user denied screen share (cancelled browser pop-up)
|
43
|
+
if ([3008, 3001, 3011].includes(code)) {
|
44
|
+
return;
|
45
|
+
}
|
46
|
+
if (action === 'INIT') {
|
47
|
+
return;
|
48
|
+
}
|
49
|
+
if (!subscribedNotifications.ERROR) return;
|
50
|
+
ToastManager.addToast({
|
51
|
+
title: `Error: ${message} - ${description}`,
|
52
|
+
});
|
53
|
+
}, [notification, subscribedNotifications.ERROR]);
|
54
|
+
|
55
|
+
return null;
|
56
|
+
};
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { useEffect } from 'react';
|
2
|
+
import { HMSNotificationTypes, selectIsLocalScreenShared } from '@100mslive/hms-video-store';
|
3
|
+
import { useAwayNotifications, useHMSNotifications, useHMSStore } from '@100mslive/react-sdk';
|
4
|
+
import { useRoomLayout } from '../../provider/roomLayoutProvider';
|
5
|
+
import { usePIPWindow } from '../PIP/usePIPWindow';
|
6
|
+
|
7
|
+
export const MessageNotifications = () => {
|
8
|
+
const notification = useHMSNotifications(HMSNotificationTypes.NEW_MESSAGE);
|
9
|
+
const amIScreenSharing = useHMSStore(selectIsLocalScreenShared);
|
10
|
+
const logoURL = useRoomLayout()?.logo?.url;
|
11
|
+
const { pipWindow } = usePIPWindow();
|
12
|
+
const { showNotification } = useAwayNotifications();
|
13
|
+
|
14
|
+
useEffect(() => {
|
15
|
+
if (notification && amIScreenSharing && !notification.data?.ignored && !pipWindow) {
|
16
|
+
showNotification(`New message from ${notification.data.senderName}`, {
|
17
|
+
body: notification.data.message,
|
18
|
+
icon: logoURL,
|
19
|
+
});
|
20
|
+
}
|
21
|
+
}, [notification]);
|
22
|
+
|
23
|
+
return null;
|
24
|
+
};
|
@@ -1,71 +1,32 @@
|
|
1
1
|
/* eslint-disable no-case-declarations */
|
2
|
-
import React, { useCallback
|
3
|
-
import {
|
4
|
-
HMSNotificationTypes,
|
5
|
-
HMSRoleChangeRequest,
|
6
|
-
HMSRoomState,
|
7
|
-
selectIsLocalScreenShared,
|
8
|
-
selectLocalPeerID,
|
9
|
-
selectPeerNameByID,
|
10
|
-
selectRoomState,
|
11
|
-
useAwayNotifications,
|
12
|
-
useCustomEvent,
|
13
|
-
useHMSNotifications,
|
14
|
-
useHMSStore,
|
15
|
-
useHMSVanillaStore,
|
16
|
-
} from '@100mslive/react-sdk';
|
17
|
-
import { GroupIcon } from '@100mslive/react-icons';
|
18
|
-
import { Box, Button } from '../../..';
|
19
|
-
import { useRoomLayout, useUpdateRoomLayout } from '../../provider/roomLayoutProvider';
|
2
|
+
import React, { useCallback } from 'react';
|
3
|
+
import { HMSRoleChangeRequest, HMSRoomState, selectRoomState, useCustomEvent, useHMSStore } from '@100mslive/react-sdk';
|
20
4
|
// @ts-ignore: No implicit Any
|
21
5
|
import { ToastManager } from '../Toast/ToastManager';
|
22
6
|
import { AutoplayBlockedModal } from './AutoplayBlockedModal';
|
23
7
|
import { ChatNotifications } from './ChatNotifications';
|
8
|
+
import { DeviceChangeNotifications } from './DeviceChangeNotifications';
|
24
9
|
import { DeviceInUseError } from './DeviceInUseError';
|
10
|
+
import { ErrorNotifications } from './ErrorNotifications';
|
25
11
|
import { HandRaisedNotifications } from './HandRaisedNotifications';
|
26
12
|
import { InitErrorModal } from './InitErrorModal';
|
13
|
+
import { MessageNotifications } from './MessageNotifications';
|
27
14
|
import { PeerNotifications } from './PeerNotifications';
|
28
15
|
import { PermissionErrorNotificationModal } from './PermissionErrorModal';
|
16
|
+
import { PollNotificationModal } from './PollNotificationModal';
|
29
17
|
import { ReconnectNotifications } from './ReconnectNotifications';
|
18
|
+
import { RoleChangeNotification } from './RoleChangeNotification';
|
30
19
|
import { TrackBulkUnmuteModal } from './TrackBulkUnmuteModal';
|
31
20
|
import { TrackNotifications } from './TrackNotifications';
|
32
21
|
import { TrackUnmuteModal } from './TrackUnmuteModal';
|
33
22
|
import { TranscriptionNotifications } from './TranscriptionNotifications';
|
34
|
-
import { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
35
23
|
// @ts-ignore: No implicit Any
|
36
|
-
import {
|
37
|
-
// @ts-ignore: No implicit Any
|
38
|
-
import { useIsNotificationDisabled, useSubscribedNotifications } from '../AppData/useUISettings';
|
39
|
-
import { usePIPWindow } from '../PIP/usePIPWindow';
|
24
|
+
import { useIsNotificationDisabled } from '../AppData/useUISettings';
|
40
25
|
import { ROLE_CHANGE_DECLINED } from '../../common/constants';
|
41
26
|
|
42
|
-
const pollToastKey: Record<string, string> = {};
|
43
|
-
|
44
27
|
export function Notifications() {
|
45
|
-
const localPeerID = useHMSStore(selectLocalPeerID);
|
46
|
-
const notification = useHMSNotifications([
|
47
|
-
HMSNotificationTypes.NAME_UPDATED,
|
48
|
-
HMSNotificationTypes.ERROR,
|
49
|
-
HMSNotificationTypes.ROLE_UPDATED,
|
50
|
-
HMSNotificationTypes.CHANGE_TRACK_STATE_REQUEST,
|
51
|
-
HMSNotificationTypes.REMOVED_FROM_ROOM,
|
52
|
-
HMSNotificationTypes.ROOM_ENDED,
|
53
|
-
HMSNotificationTypes.DEVICE_CHANGE_UPDATE,
|
54
|
-
HMSNotificationTypes.POLL_STARTED,
|
55
|
-
HMSNotificationTypes.POLL_STOPPED,
|
56
|
-
HMSNotificationTypes.NEW_MESSAGE,
|
57
|
-
]);
|
58
|
-
const subscribedNotifications = useSubscribedNotifications() || {};
|
59
28
|
const roomState = useHMSStore(selectRoomState);
|
60
|
-
const updateRoomLayoutForRole = useUpdateRoomLayout();
|
61
29
|
const isNotificationDisabled = useIsNotificationDisabled();
|
62
|
-
const screenProps = useRoomLayoutConferencingScreen();
|
63
|
-
const vanillaStore = useHMSVanillaStore();
|
64
|
-
const togglePollView = usePollViewToggle();
|
65
|
-
const { showNotification } = useAwayNotifications();
|
66
|
-
const amIScreenSharing = useHMSStore(selectIsLocalScreenShared);
|
67
|
-
const logoURL = useRoomLayout()?.logo?.url;
|
68
|
-
const { pipWindow } = usePIPWindow();
|
69
30
|
|
70
31
|
const handleRoleChangeDenied = useCallback((request: HMSRoleChangeRequest & { peerName: string }) => {
|
71
32
|
ToastManager.addToast({
|
@@ -76,130 +37,6 @@ export function Notifications() {
|
|
76
37
|
|
77
38
|
useCustomEvent({ type: ROLE_CHANGE_DECLINED, onEvent: handleRoleChangeDenied });
|
78
39
|
|
79
|
-
useEffect(() => {
|
80
|
-
if (!notification || isNotificationDisabled) {
|
81
|
-
return;
|
82
|
-
}
|
83
|
-
switch (notification.type) {
|
84
|
-
case HMSNotificationTypes.NAME_UPDATED:
|
85
|
-
console.log(notification.data.id + ' changed their name to ' + notification.data.name);
|
86
|
-
break;
|
87
|
-
case HMSNotificationTypes.ERROR:
|
88
|
-
if (notification.data?.isTerminal && notification.data?.action !== 'INIT') {
|
89
|
-
if ([500, 6008].includes(notification.data?.code)) {
|
90
|
-
ToastManager.addToast({
|
91
|
-
title: `Error: ${notification.data?.message}`,
|
92
|
-
});
|
93
|
-
} else if (notification.data?.message === 'role limit reached') {
|
94
|
-
ToastManager.addToast({
|
95
|
-
title: 'The room is currently full, try joining later',
|
96
|
-
close: true,
|
97
|
-
icon: (
|
98
|
-
<Box css={{ color: '$alert_error_default' }}>
|
99
|
-
<GroupIcon />
|
100
|
-
</Box>
|
101
|
-
),
|
102
|
-
});
|
103
|
-
} else {
|
104
|
-
ToastManager.addToast({
|
105
|
-
title:
|
106
|
-
notification.data?.message ||
|
107
|
-
'We couldn’t reconnect you. When you’re back online, try joining the room.',
|
108
|
-
close: false,
|
109
|
-
});
|
110
|
-
}
|
111
|
-
return;
|
112
|
-
}
|
113
|
-
// Autoplay error or user denied screen share (cancelled browser pop-up)
|
114
|
-
if (notification.data?.code === 3008 || notification.data?.code === 3001 || notification.data?.code === 3011) {
|
115
|
-
return;
|
116
|
-
}
|
117
|
-
if (notification.data?.action === 'INIT') {
|
118
|
-
return;
|
119
|
-
}
|
120
|
-
if (!subscribedNotifications.ERROR) return;
|
121
|
-
ToastManager.addToast({
|
122
|
-
title: `Error: ${notification.data?.message} - ${notification.data?.description}`,
|
123
|
-
duration: 8000,
|
124
|
-
});
|
125
|
-
break;
|
126
|
-
case HMSNotificationTypes.ROLE_UPDATED: {
|
127
|
-
if (notification.data?.isLocal && notification.data?.roleName) {
|
128
|
-
ToastManager.addToast({
|
129
|
-
title: `You are now a ${notification.data.roleName}`,
|
130
|
-
});
|
131
|
-
updateRoomLayoutForRole?.(notification.data.roleName);
|
132
|
-
}
|
133
|
-
break;
|
134
|
-
}
|
135
|
-
case HMSNotificationTypes.CHANGE_TRACK_STATE_REQUEST:
|
136
|
-
const track = notification.data?.track;
|
137
|
-
if (!notification.data.enabled) {
|
138
|
-
ToastManager.addToast({
|
139
|
-
title: `Your ${track.source} ${track.type} was muted by
|
140
|
-
${notification.data.requestedBy?.name}.`,
|
141
|
-
});
|
142
|
-
}
|
143
|
-
break;
|
144
|
-
case HMSNotificationTypes.REMOVED_FROM_ROOM:
|
145
|
-
case HMSNotificationTypes.ROOM_ENDED:
|
146
|
-
ToastManager.addToast({
|
147
|
-
title: `${notification.message}.
|
148
|
-
${notification.data.reason && `Reason: ${notification.data.reason}`}`,
|
149
|
-
});
|
150
|
-
break;
|
151
|
-
case HMSNotificationTypes.DEVICE_CHANGE_UPDATE:
|
152
|
-
ToastManager.addToast({
|
153
|
-
title: notification.message,
|
154
|
-
});
|
155
|
-
break;
|
156
|
-
|
157
|
-
case HMSNotificationTypes.POLL_STARTED:
|
158
|
-
if (notification.data.startedBy !== localPeerID && screenProps.screenType !== 'hls_live_streaming') {
|
159
|
-
const pollStartedBy = vanillaStore.getState(selectPeerNameByID(notification.data.startedBy)) || 'Participant';
|
160
|
-
|
161
|
-
const pollToastID = ToastManager.addToast({
|
162
|
-
title: `${pollStartedBy} started a ${notification.data.type}: ${notification.data.title}`,
|
163
|
-
action: (
|
164
|
-
<Button
|
165
|
-
onClick={() => togglePollView(notification.data.id)}
|
166
|
-
variant="standard"
|
167
|
-
css={{
|
168
|
-
backgroundColor: '$surface_bright',
|
169
|
-
fontWeight: '$semiBold',
|
170
|
-
color: '$on_surface_high',
|
171
|
-
p: '$xs $md',
|
172
|
-
}}
|
173
|
-
>
|
174
|
-
{notification.data.type === 'quiz' ? 'Answer' : 'Vote'}
|
175
|
-
</Button>
|
176
|
-
),
|
177
|
-
duration: Infinity,
|
178
|
-
});
|
179
|
-
pollToastKey[notification.data.id] = pollToastID;
|
180
|
-
}
|
181
|
-
break;
|
182
|
-
case HMSNotificationTypes.POLL_STOPPED:
|
183
|
-
const pollID = notification?.data.id;
|
184
|
-
if (pollID && pollToastKey?.[pollID]) {
|
185
|
-
ToastManager.removeToast(pollToastKey?.[notification.data.id]);
|
186
|
-
delete pollToastKey[notification?.data.id];
|
187
|
-
}
|
188
|
-
break;
|
189
|
-
case HMSNotificationTypes.NEW_MESSAGE:
|
190
|
-
if (amIScreenSharing && !notification.data?.ignored && !pipWindow) {
|
191
|
-
showNotification(`New message from ${notification.data.senderName}`, {
|
192
|
-
body: notification.data.message,
|
193
|
-
icon: logoURL,
|
194
|
-
});
|
195
|
-
}
|
196
|
-
break;
|
197
|
-
default:
|
198
|
-
break;
|
199
|
-
}
|
200
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
201
|
-
}, [notification, subscribedNotifications.ERROR, subscribedNotifications.METADATA_UPDATED]);
|
202
|
-
|
203
40
|
if (isNotificationDisabled) {
|
204
41
|
return null;
|
205
42
|
}
|
@@ -210,7 +47,12 @@ export function Notifications() {
|
|
210
47
|
<TrackBulkUnmuteModal />
|
211
48
|
<TrackNotifications />
|
212
49
|
{roomState === HMSRoomState.Connected ? <PeerNotifications /> : null}
|
50
|
+
<RoleChangeNotification />
|
51
|
+
<PollNotificationModal />
|
52
|
+
<MessageNotifications />
|
53
|
+
<DeviceChangeNotifications />
|
213
54
|
<ReconnectNotifications />
|
55
|
+
<ErrorNotifications />
|
214
56
|
<AutoplayBlockedModal />
|
215
57
|
<PermissionErrorNotificationModal />
|
216
58
|
<InitErrorModal />
|
@@ -7,7 +7,11 @@ import { useSetSubscribedChatSelector, useSubscribedNotifications } from '../App
|
|
7
7
|
// @ts-ignore: No implicit Any
|
8
8
|
import { CHAT_SELECTOR, SUBSCRIBED_NOTIFICATIONS } from '../../common/constants';
|
9
9
|
|
10
|
-
const notificationTypes = [
|
10
|
+
const notificationTypes = [
|
11
|
+
HMSNotificationTypes.PEER_JOINED,
|
12
|
+
HMSNotificationTypes.PEER_LEFT,
|
13
|
+
HMSNotificationTypes.NAME_UPDATED,
|
14
|
+
];
|
11
15
|
|
12
16
|
export const PeerNotifications = () => {
|
13
17
|
const notification = useHMSNotifications(notificationTypes);
|
@@ -35,11 +39,14 @@ export const PeerNotifications = () => {
|
|
35
39
|
return;
|
36
40
|
}
|
37
41
|
break;
|
42
|
+
case HMSNotificationTypes.NAME_UPDATED:
|
43
|
+
console.log(notification.data.id + ' changed their name to ' + notification.data.name);
|
44
|
+
return;
|
38
45
|
default:
|
39
46
|
return;
|
40
47
|
}
|
41
48
|
ToastBatcher.showToast({ notification });
|
42
|
-
}, [notification
|
49
|
+
}, [notification]);
|
43
50
|
|
44
51
|
return null;
|
45
52
|
};
|
@@ -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 = () => {
|