@100mslive/roomkit-react 0.1.5 → 0.1.6-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) hide show
  1. package/dist/{HLSView-P57IRMAR.js → HLSView-HNVYG5VE.js} +309 -151
  2. package/dist/HLSView-HNVYG5VE.js.map +7 -0
  3. package/dist/Prebuilt/App.d.ts +3 -0
  4. package/dist/Prebuilt/AppContext.d.ts +13 -0
  5. package/dist/Prebuilt/common/PeersSorter.d.ts +21 -0
  6. package/dist/Prebuilt/components/Chat/ChatFooter.d.ts +7 -0
  7. package/dist/Prebuilt/components/Connection/ConnectionIndicator.d.ts +6 -0
  8. package/dist/Prebuilt/components/Connection/TileConnection.d.ts +10 -0
  9. package/dist/Prebuilt/components/Footer/ChatToggle.d.ts +4 -0
  10. package/dist/Prebuilt/components/Footer/Footer.d.ts +6 -0
  11. package/dist/Prebuilt/components/Footer/RoleAccordion.d.ts +14 -0
  12. package/dist/Prebuilt/components/Footer/RoleOptions.d.ts +6 -0
  13. package/dist/Prebuilt/components/Header/Header.d.ts +2 -0
  14. package/dist/Prebuilt/components/Header/StreamActions.d.ts +11 -0
  15. package/dist/Prebuilt/components/InsetTile.d.ts +2 -0
  16. package/dist/Prebuilt/components/Leave/DesktopLeaveRoom.d.ts +8 -0
  17. package/dist/Prebuilt/components/Leave/EndSessionContent.d.ts +9 -0
  18. package/dist/Prebuilt/components/Leave/LeaveAtoms.d.ts +2196 -0
  19. package/dist/Prebuilt/components/Leave/LeaveCard.d.ts +11 -0
  20. package/dist/Prebuilt/components/Leave/LeaveRoom.d.ts +5 -0
  21. package/dist/Prebuilt/components/Leave/LeaveSessionContent.d.ts +8 -0
  22. package/dist/Prebuilt/components/Leave/MwebLeaveRoom.d.ts +8 -0
  23. package/dist/Prebuilt/components/MoreSettings/MoreSettings.d.ts +6 -0
  24. package/dist/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.d.ts +6 -0
  25. package/dist/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.d.ts +6 -0
  26. package/dist/Prebuilt/components/Pagination.d.ts +6 -0
  27. package/dist/Prebuilt/components/Preview/PreviewContainer.d.ts +3 -0
  28. package/dist/Prebuilt/components/Preview/PreviewForm.d.ts +10 -0
  29. package/dist/Prebuilt/components/Preview/PreviewJoin.d.ts +16 -0
  30. package/dist/Prebuilt/components/RoleChangeRequestModal.d.ts +2 -0
  31. package/dist/Prebuilt/components/SecondaryTiles.d.ts +3 -0
  32. package/dist/Prebuilt/components/VideoLayouts/EqualProminence.d.ts +3 -0
  33. package/dist/Prebuilt/components/VideoLayouts/Grid.d.ts +6 -0
  34. package/dist/Prebuilt/components/VideoLayouts/GridLayout.d.ts +12 -0
  35. package/dist/Prebuilt/components/VideoLayouts/ProminenceLayout.d.ts +15 -0
  36. package/dist/Prebuilt/components/VideoLayouts/RoleProminence.d.ts +3 -0
  37. package/dist/Prebuilt/components/VideoLayouts/ScreenshareLayout.d.ts +3 -0
  38. package/dist/Prebuilt/components/VideoLayouts/interface.d.ts +9 -0
  39. package/dist/Prebuilt/components/hooks/useAutoStartStreaming.d.ts +1 -0
  40. package/dist/Prebuilt/components/hooks/useRedirectToLeave.d.ts +3 -0
  41. package/dist/Prebuilt/components/hooks/useRoleProminencePeers.d.ts +5 -0
  42. package/dist/Prebuilt/components/hooks/useTileLayout.d.ts +13 -0
  43. package/dist/Prebuilt/components/hooks/useVideoTileLayout.d.ts +13 -0
  44. package/dist/Prebuilt/layouts/SidePane.d.ts +9 -0
  45. package/dist/Prebuilt/layouts/VideoStreamingSection.d.ts +7 -0
  46. package/dist/Prebuilt/plugins/whiteboard/ToggleWhiteboard.d.ts +5 -0
  47. package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.d.ts +1 -0
  48. package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.d.ts +1 -0
  49. package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.d.ts +17 -0
  50. package/dist/Prebuilt/provider/roomLayoutProvider/index.d.ts +6 -1
  51. package/dist/{VirtualBackground-GGCQJ5JM.js → VirtualBackground-UM2FOUHQ.js} +5 -11
  52. package/dist/VirtualBackground-UM2FOUHQ.js.map +7 -0
  53. package/dist/{chunk-P5X32KOD.js → chunk-364HP22I.js} +8 -5
  54. package/dist/chunk-364HP22I.js.map +7 -0
  55. package/dist/{chunk-OSM4QEQG.js → chunk-LYSAET4G.js} +3742 -5462
  56. package/dist/chunk-LYSAET4G.js.map +7 -0
  57. package/dist/chunk-POE7H4IE.js +898 -0
  58. package/dist/chunk-POE7H4IE.js.map +7 -0
  59. package/dist/conference-UWLJHMB2.js +5727 -0
  60. package/dist/conference-UWLJHMB2.js.map +7 -0
  61. package/dist/index.cjs.js +9655 -15326
  62. package/dist/index.cjs.js.map +4 -4
  63. package/dist/index.js +2 -2
  64. package/dist/meta.cjs.json +2513 -3456
  65. package/dist/meta.esbuild.json +2807 -3838
  66. package/package.json +8 -7
  67. package/src/Button/Button.tsx +2 -2
  68. package/src/Prebuilt/App.tsx +58 -53
  69. package/src/Prebuilt/{AppContext.jsx → AppContext.tsx} +11 -3
  70. package/src/Prebuilt/IconButton.jsx +11 -0
  71. package/src/Prebuilt/Prebuilt.stories.tsx +1 -0
  72. package/src/Prebuilt/common/{PeersSorter.js → PeersSorter.ts} +16 -11
  73. package/src/Prebuilt/common/constants.js +4 -114
  74. package/src/Prebuilt/common/hooks.js +34 -1
  75. package/src/Prebuilt/common/utils.js +1 -9
  76. package/src/Prebuilt/components/AppData/AppData.jsx +11 -15
  77. package/src/Prebuilt/components/AppData/useUISettings.js +6 -10
  78. package/src/Prebuilt/components/AudioVideoToggle.jsx +10 -2
  79. package/src/Prebuilt/components/AuthToken.jsx +11 -42
  80. package/src/Prebuilt/components/Chat/Chat.jsx +75 -27
  81. package/src/Prebuilt/components/Chat/ChatBody.jsx +95 -36
  82. package/src/Prebuilt/components/Chat/ChatFooter.tsx +199 -0
  83. package/src/Prebuilt/components/Chat/ChatParticipantHeader.jsx +84 -0
  84. package/src/Prebuilt/components/Chat/ChatSelector.jsx +16 -17
  85. package/src/Prebuilt/components/Chat/ChatSelectorContainer.jsx +81 -0
  86. package/src/Prebuilt/components/Chat/useEmojiPickerStyles.js +5 -4
  87. package/src/Prebuilt/components/Connection/{ConnectionIndicator.jsx → ConnectionIndicator.tsx} +12 -4
  88. package/src/Prebuilt/components/Connection/TileConnection.tsx +71 -0
  89. package/src/Prebuilt/components/EmojiReaction.jsx +19 -22
  90. package/src/Prebuilt/components/Footer/{ChatToggle.jsx → ChatToggle.tsx} +13 -9
  91. package/src/Prebuilt/components/Footer/Footer.tsx +98 -0
  92. package/src/Prebuilt/components/Footer/ParticipantList.jsx +187 -179
  93. package/src/Prebuilt/components/Footer/RoleAccordion.tsx +94 -0
  94. package/src/Prebuilt/components/Footer/RoleOptions.tsx +155 -0
  95. package/src/Prebuilt/components/FullPageProgress.jsx +3 -3
  96. package/src/Prebuilt/components/HMSVideo/Controls.jsx +3 -2
  97. package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx +63 -18
  98. package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +2 -2
  99. package/src/Prebuilt/components/HMSVideo/PlayButton.jsx +1 -1
  100. package/src/Prebuilt/components/HMSVideo/VideoProgress.jsx +5 -6
  101. package/src/Prebuilt/components/HMSVideo/VideoTime.jsx +3 -3
  102. package/src/Prebuilt/components/HMSVideo/VolumeControl.jsx +38 -9
  103. package/src/Prebuilt/components/Header/{ConferencingHeader.jsx → Header.tsx} +9 -7
  104. package/src/Prebuilt/components/Header/HeaderComponents.jsx +13 -4
  105. package/src/Prebuilt/components/Header/{StreamActions.jsx → StreamActions.tsx} +54 -67
  106. package/src/Prebuilt/components/Header/common.jsx +5 -2
  107. package/src/Prebuilt/components/Header/index.tsx +1 -0
  108. package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +23 -4
  109. package/src/Prebuilt/components/InsetTile.tsx +128 -0
  110. package/src/Prebuilt/components/{MoreSettings/SplitComponents/DesktopLeaveRoom.jsx → Leave/DesktopLeaveRoom.tsx} +67 -25
  111. package/src/Prebuilt/components/{EndSessionContent.jsx → Leave/EndSessionContent.tsx} +18 -11
  112. package/src/Prebuilt/components/Leave/LeaveAtoms.tsx +26 -0
  113. package/src/Prebuilt/components/Leave/LeaveCard.tsx +36 -0
  114. package/src/Prebuilt/components/Leave/LeaveRoom.tsx +66 -0
  115. package/src/Prebuilt/components/{LeaveSessionContent.jsx → Leave/LeaveSessionContent.tsx} +20 -6
  116. package/src/Prebuilt/components/{MoreSettings/SplitComponents/MwebLeaveRoom.jsx → Leave/MwebLeaveRoom.tsx} +43 -18
  117. package/src/Prebuilt/components/MetaActions.jsx +15 -23
  118. package/src/Prebuilt/components/MoreSettings/ActionTile.jsx +5 -0
  119. package/src/Prebuilt/components/MoreSettings/ChangeNameContent.jsx +16 -7
  120. package/src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx +1 -1
  121. package/src/Prebuilt/components/MoreSettings/FullScreenItem.jsx +1 -4
  122. package/src/Prebuilt/components/MoreSettings/MoreSettings.tsx +27 -0
  123. package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx +216 -0
  124. package/src/Prebuilt/components/MoreSettings/SplitComponents/{MwebOptions.jsx → MwebOptions.tsx} +107 -45
  125. package/src/Prebuilt/components/Notifications/HLSFailureModal.jsx +3 -1
  126. package/src/Prebuilt/components/Notifications/Notifications.jsx +46 -30
  127. package/src/Prebuilt/components/Notifications/PeerNotifications.jsx +14 -2
  128. package/src/Prebuilt/components/Notifications/PermissionErrorModal.jsx +10 -4
  129. package/src/Prebuilt/components/Notifications/ReconnectNotifications.jsx +5 -11
  130. package/src/Prebuilt/components/PIP/PIPComponent.jsx +7 -16
  131. package/src/Prebuilt/components/PIP/PIPManager.js +1 -0
  132. package/src/Prebuilt/components/Pagination.tsx +60 -0
  133. package/src/Prebuilt/components/Playlist/Playlist.jsx +1 -6
  134. package/src/Prebuilt/components/PostLeave.jsx +7 -7
  135. package/src/Prebuilt/components/Preview/{PreviewContainer.jsx → PreviewContainer.tsx} +16 -15
  136. package/src/Prebuilt/components/Preview/{PreviewForm.jsx → PreviewForm.tsx} +16 -8
  137. package/src/Prebuilt/components/Preview/{PreviewJoin.jsx → PreviewJoin.tsx} +48 -22
  138. package/src/Prebuilt/components/RaiseHand.jsx +0 -7
  139. package/src/Prebuilt/components/RoleChangeRequestModal.tsx +119 -0
  140. package/src/Prebuilt/components/ScreenshareDisplay.jsx +4 -10
  141. package/src/Prebuilt/components/ScreenshareTile.jsx +43 -36
  142. package/src/Prebuilt/components/SecondaryTiles.tsx +36 -0
  143. package/src/Prebuilt/components/Settings/LayoutSettings.jsx +2 -12
  144. package/src/Prebuilt/components/Settings/NotificationSettings.jsx +3 -9
  145. package/src/Prebuilt/components/Settings/SettingsModal.jsx +3 -9
  146. package/src/Prebuilt/components/StatsForNerds.jsx +3 -1
  147. package/src/Prebuilt/components/TileMenu/TileMenu.jsx +16 -17
  148. package/src/Prebuilt/components/TileMenu/TileMenuContent.jsx +33 -27
  149. package/src/Prebuilt/components/Toast/ToastConfig.jsx +58 -15
  150. package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +65 -0
  151. package/src/Prebuilt/components/VideoLayouts/Grid.tsx +43 -0
  152. package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +110 -0
  153. package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +74 -0
  154. package/src/Prebuilt/components/VideoLayouts/RoleProminence.tsx +59 -0
  155. package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +52 -0
  156. package/src/Prebuilt/components/VideoLayouts/interface.ts +10 -0
  157. package/src/Prebuilt/components/VideoTile.jsx +116 -74
  158. package/src/Prebuilt/components/conference.jsx +86 -85
  159. package/src/Prebuilt/components/hooks/useAutoStartStreaming.tsx +57 -0
  160. package/src/Prebuilt/components/hooks/useMetadata.jsx +19 -3
  161. package/src/Prebuilt/components/hooks/useRedirectToLeave.tsx +34 -0
  162. package/src/Prebuilt/components/hooks/useRoleProminencePeers.tsx +38 -0
  163. package/src/Prebuilt/components/hooks/useTileLayout.tsx +127 -0
  164. package/src/Prebuilt/components/hooks/useVideoTileLayout.ts +26 -0
  165. package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +5 -72
  166. package/src/Prebuilt/components/pdfAnnotator/submitPdf.jsx +4 -45
  167. package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +2 -17
  168. package/src/Prebuilt/components/peerTileUtils.jsx +1 -1
  169. package/src/Prebuilt/images/empty-chat.svg +12 -0
  170. package/src/Prebuilt/layouts/EmbedView.jsx +17 -50
  171. package/src/Prebuilt/layouts/HLSView.jsx +138 -51
  172. package/src/Prebuilt/layouts/PDFView.jsx +1 -11
  173. package/src/Prebuilt/layouts/SidePane.tsx +108 -0
  174. package/src/Prebuilt/layouts/VideoStreamingSection.tsx +96 -0
  175. package/src/Prebuilt/layouts/WhiteboardView.jsx +10 -34
  176. package/src/Prebuilt/plugins/FlyingEmoji.jsx +14 -2
  177. package/src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx +1 -4
  178. package/src/Prebuilt/plugins/whiteboard/{ToggleWhiteboard.jsx → ToggleWhiteboard.tsx} +5 -9
  179. package/src/Prebuilt/primitives/DialogContent.jsx +15 -11
  180. package/src/Prebuilt/provider/roomLayoutProvider/constants/index.ts +17 -2
  181. package/src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts +36 -13
  182. package/src/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.ts +10 -0
  183. package/src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts +65 -0
  184. package/src/Prebuilt/provider/roomLayoutProvider/index.tsx +17 -6
  185. package/src/Prebuilt/services/FeatureFlags.jsx +0 -1
  186. package/src/VideoTile/StyledVideoTile.tsx +1 -0
  187. package/dist/HLSView-P57IRMAR.js.map +0 -7
  188. package/dist/PinnedTrackView-4FYJEBTB.js +0 -102
  189. package/dist/PinnedTrackView-4FYJEBTB.js.map +0 -7
  190. package/dist/VirtualBackground-GGCQJ5JM.js.map +0 -7
  191. package/dist/chunk-IVTWKQI3.js +0 -827
  192. package/dist/chunk-IVTWKQI3.js.map +0 -7
  193. package/dist/chunk-OSM4QEQG.js.map +0 -7
  194. package/dist/chunk-P5X32KOD.js.map +0 -7
  195. package/dist/chunk-RVCZPPTL.js +0 -1100
  196. package/dist/chunk-RVCZPPTL.js.map +0 -7
  197. package/dist/conference-P6I6ESVF.js +0 -8995
  198. package/dist/conference-P6I6ESVF.js.map +0 -7
  199. package/src/Prebuilt/components/AudioLevel/BeamSpeakerLabelsLogging.jsx +0 -16
  200. package/src/Prebuilt/components/Chat/ChatFooter.jsx +0 -150
  201. package/src/Prebuilt/components/Chat/ChatHeader.jsx +0 -67
  202. package/src/Prebuilt/components/Connection/TileConnection.jsx +0 -39
  203. package/src/Prebuilt/components/EqualProminence.jsx +0 -180
  204. package/src/Prebuilt/components/FirstPersonDisplay.jsx +0 -50
  205. package/src/Prebuilt/components/Footer/Footer.jsx +0 -73
  206. package/src/Prebuilt/components/Header/Header.jsx +0 -8
  207. package/src/Prebuilt/components/Header/StreamingHeader.jsx +0 -54
  208. package/src/Prebuilt/components/LeaveCard.jsx +0 -19
  209. package/src/Prebuilt/components/LeaveRoom.jsx +0 -94
  210. package/src/Prebuilt/components/MoreSettings/MoreSettings.jsx +0 -10
  211. package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.jsx +0 -219
  212. package/src/Prebuilt/components/Notifications/MessageNotifications.jsx +0 -25
  213. package/src/Prebuilt/components/Pagination.jsx +0 -29
  214. package/src/Prebuilt/components/RoleChangeRequestModal.jsx +0 -26
  215. package/src/Prebuilt/components/VideoList.jsx +0 -73
  216. package/src/Prebuilt/components/gridView.jsx +0 -85
  217. package/src/Prebuilt/components/hooks/useFeatures.js +0 -22
  218. package/src/Prebuilt/components/hooks/useNavigation.js +0 -19
  219. package/src/Prebuilt/components/hooks/useSkipPreview.jsx +0 -20
  220. package/src/Prebuilt/components/pdfAnnotator/pdfErrorView.jsx +0 -29
  221. package/src/Prebuilt/images/Logo.svg +0 -8
  222. package/src/Prebuilt/layouts/ActiveSpeakerView.jsx +0 -34
  223. package/src/Prebuilt/layouts/InsetView.jsx +0 -260
  224. package/src/Prebuilt/layouts/PinnedTrackView.jsx +0 -59
  225. package/src/Prebuilt/layouts/SidePane.jsx +0 -52
  226. package/src/Prebuilt/layouts/mainGridView.jsx +0 -98
  227. package/src/Prebuilt/layouts/mainView.jsx +0 -141
  228. package/src/Prebuilt/layouts/screenShareView.jsx +0 -183
  229. /package/{src/Prebuilt/components/Header/index.jsx → dist/Prebuilt/components/Header/index.d.ts} +0 -0
  230. /package/src/Prebuilt/components/{ScreenShare.jsx → ScreenShareToggle.jsx} +0 -0
  231. /package/src/{assets → Prebuilt/images}/android-perm-1.png +0 -0
  232. /package/src/{assets → Prebuilt/images}/ios-perm-0.png +0 -0
@@ -0,0 +1,81 @@
1
+ import React, { useState } from 'react';
2
+ import { useMedia } from 'react-use';
3
+ import { ChevronDownIcon, ChevronUpIcon, CrossIcon } from '@100mslive/react-icons';
4
+ import { Dropdown } from '../../../Dropdown';
5
+ import { Flex } from '../../../Layout';
6
+ import { Sheet } from '../../../Sheet';
7
+ import { Text } from '../../../Text';
8
+ import { config as cssConfig } from '../../../Theme';
9
+ import { ChatSelector } from './ChatSelector';
10
+ import { textEllipsis } from '../../../utils';
11
+
12
+ export const ChatSelectorContainer = ({ onSelect, role, peerId, selection }) => {
13
+ const [open, setOpen] = useState(false);
14
+ const isMobile = useMedia(cssConfig.media.md);
15
+
16
+ return (
17
+ <Flex align="center" css={{ mb: '$8' }}>
18
+ <Text variant="tiny" css={{ color: '$on_surface_medium', textTransform: 'uppercase' }}>
19
+ Send To
20
+ </Text>
21
+
22
+ <Dropdown.Root open={open} onOpenChange={value => setOpen(value)}>
23
+ <Dropdown.Trigger
24
+ asChild
25
+ data-testid="participant_list_filter"
26
+ css={{
27
+ border: '1px solid $border_bright',
28
+ r: '$0',
29
+ p: '$1 $2',
30
+ ml: '$8',
31
+ }}
32
+ tabIndex={0}
33
+ >
34
+ <Flex align="center" css={{ c: '$on_surface_medium' }}>
35
+ <Text variant="tiny" css={{ ...textEllipsis(80), textTransform: 'uppercase', c: '$on_surface_high' }}>
36
+ {selection}
37
+ </Text>
38
+ {open ? <ChevronUpIcon width={16} height={16} /> : <ChevronDownIcon width={16} height={16} />}
39
+ </Flex>
40
+ </Dropdown.Trigger>
41
+
42
+ <Dropdown.Content
43
+ css={{
44
+ w: '$64',
45
+ overflow: 'hidden',
46
+ maxHeight: 'unset',
47
+ bg: '$surface_default',
48
+ }}
49
+ align="start"
50
+ sideOffset={8}
51
+ >
52
+ {isMobile ? (
53
+ <Sheet.Root open={open} onOpenChange={value => setOpen(value)}>
54
+ <Sheet.Content css={{ pt: '$8' }}>
55
+ <Sheet.Title
56
+ css={{
57
+ display: 'flex',
58
+ w: '100%',
59
+ justifyContent: 'space-between',
60
+ px: '$10',
61
+ pb: '$4',
62
+ mb: '$8',
63
+ borderBottom: '1px solid $border_bright',
64
+ }}
65
+ >
66
+ <Text css={{ color: '$on_surface_medium', fontWeight: '$semiBold' }}>Send message to</Text>
67
+ <Sheet.Close css={{ color: '$on_surface_medium' }}>
68
+ <CrossIcon />
69
+ </Sheet.Close>
70
+ </Sheet.Title>
71
+ <ChatSelector onSelect={onSelect} role={role} peerId={peerId} />
72
+ </Sheet.Content>
73
+ </Sheet.Root>
74
+ ) : (
75
+ <ChatSelector onSelect={onSelect} role={role} peerId={peerId} />
76
+ )}
77
+ </Dropdown.Content>
78
+ </Dropdown.Root>
79
+ </Flex>
80
+ );
81
+ };
@@ -9,16 +9,17 @@ export const useEmojiPickerStyles = showing => {
9
9
  const style = document.createElement('style');
10
10
  style.textContent = `
11
11
  #root {
12
- --em-rgb-color: var(--hms-ui-colors-on_primary_high);
12
+ --em-rgb-color: var(--hms-ui-colors-on_surface_high);
13
13
  --em-rgb-input: var(--hms-ui-colors-on_primary_high);
14
- --em-color-border: var(--hms-ui-colors-surface_default);
15
- --color-b: var(--hms-ui-colors-on_primary_high);
14
+ --em-color-border: var(--hms-ui-colors-surface_bright);
15
+ --color-b: var(--hms-ui-colors-on_surface_high);
16
16
  --rgb-background: transparent;
17
- color: var(--hms-ui-colors-on_primary_high);
17
+ color: var(--hms-ui-colors-on_surface_high);
18
18
  font-family: var(--hms-ui-fonts-sans);
19
19
  }
20
20
  .sticky {
21
21
  background-color: var(--hms-ui-colors-surface_bright);
22
+ margin-top: 0.5rem;
22
23
  }
23
24
  `;
24
25
  root?.appendChild(style);
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import { selectConnectionQualityByPeerID, useHMSStore } from '@100mslive/react-sdk';
3
3
  import { PoorConnectivityIcon } from '@100mslive/react-icons';
4
- import { styled, Tooltip, useTheme } from '../../../';
4
+ import { styled, Tooltip, useTheme } from '../../..';
5
+ // @ts-ignore
5
6
  import { getColor, getTooltipText } from './connectionQualityUtils';
6
7
 
7
8
  const Wrapper = styled('span', {
@@ -10,7 +11,6 @@ const Wrapper = styled('span', {
10
11
  display: 'flex',
11
12
  alignItems: 'center',
12
13
  justifyContent: 'center',
13
- backgroundColor: '$background_dim',
14
14
  borderRadius: '$round',
15
15
  variants: {
16
16
  isTile: {
@@ -22,7 +22,15 @@ const Wrapper = styled('span', {
22
22
  },
23
23
  });
24
24
 
25
- export const ConnectionIndicator = ({ peerId, isTile = false }) => {
25
+ export const ConnectionIndicator = ({
26
+ peerId,
27
+ isTile = false,
28
+ hideBg = false,
29
+ }: {
30
+ peerId: string;
31
+ isTile?: boolean;
32
+ hideBg?: boolean;
33
+ }) => {
26
34
  const downlinkQuality = useHMSStore(selectConnectionQualityByPeerID(peerId))?.downlinkQuality;
27
35
  const { theme } = useTheme();
28
36
  const defaultColor = theme.colors.surface_brighter;
@@ -41,7 +49,7 @@ export const ConnectionIndicator = ({ peerId, isTile = false }) => {
41
49
  const size = isTile ? 12 : 16;
42
50
  return (
43
51
  <Tooltip title={getTooltipText(downlinkQuality)}>
44
- <Wrapper isTile={isTile} data-testid="tile_network">
52
+ <Wrapper isTile={isTile} data-testid="tile_network" css={{ backgroundColor: hideBg ? '' : '$surface_bright' }}>
45
53
  <svg
46
54
  width={size}
47
55
  height={size}
@@ -0,0 +1,71 @@
1
+ import React from 'react';
2
+ import { PinIcon, SpotlightIcon } from '@100mslive/react-icons';
3
+ import { Flex, styled, Text, textEllipsis } from '../../..';
4
+ import { ConnectionIndicator } from './ConnectionIndicator';
5
+
6
+ const TileConnection = ({
7
+ name,
8
+ peerId,
9
+ hideLabel,
10
+ width,
11
+ spotlighted,
12
+ pinned,
13
+ }: {
14
+ name: string;
15
+ peerId: string;
16
+ hideLabel: boolean;
17
+ width?: number;
18
+ spotlighted?: boolean;
19
+ pinned?: boolean;
20
+ }) => {
21
+ return (
22
+ <Wrapper>
23
+ {!hideLabel ? (
24
+ <>
25
+ <Flex align="center">
26
+ {pinned && (
27
+ <IconWrapper>
28
+ <PinIcon width="15" height="15" />
29
+ </IconWrapper>
30
+ )}
31
+ {spotlighted && (
32
+ <IconWrapper>
33
+ <SpotlightIcon width="15" height="15" />
34
+ </IconWrapper>
35
+ )}
36
+ <Text
37
+ css={{
38
+ c: '$on_surface_high',
39
+ verticalAlign: 'baseline',
40
+ ...(width ? textEllipsis(width - 60) : {}),
41
+ }}
42
+ variant="xs"
43
+ >
44
+ {name}
45
+ </Text>
46
+ </Flex>
47
+ <ConnectionIndicator isTile peerId={peerId} hideBg />
48
+ </>
49
+ ) : null}
50
+ </Wrapper>
51
+ );
52
+ };
53
+
54
+ const IconWrapper = styled('div', { c: '$on_surface_high', ml: '$3', mt: '$1' });
55
+
56
+ const Wrapper = styled('div', {
57
+ display: 'flex',
58
+ alignItems: 'center',
59
+ justifyContent: 'space-between',
60
+ position: 'absolute',
61
+ bottom: '$2',
62
+ left: '$2',
63
+ backgroundColor: '$background_dim',
64
+ borderRadius: '$1',
65
+ maxWidth: '85%',
66
+ '& p,span': {
67
+ p: '$2 $3',
68
+ },
69
+ });
70
+
71
+ export default TileConnection;
@@ -1,4 +1,5 @@
1
- import React, { Fragment, useCallback, useMemo, useState } from 'react';
1
+ import React, { Fragment, useState } from 'react';
2
+ import { useMedia } from 'react-use';
2
3
  import data from '@emoji-mart/data/sets/14/apple.json';
3
4
  import { init } from 'emoji-mart';
4
5
  import {
@@ -6,43 +7,35 @@ import {
6
7
  selectIsConnectedToRoom,
7
8
  selectLocalPeerID,
8
9
  useCustomEvent,
9
- useHMSActions,
10
+ // useHMSActions,
10
11
  useHMSStore,
11
- useRecordingStreaming,
12
+ // useRecordingStreaming,
12
13
  } from '@100mslive/react-sdk';
13
14
  import { EmojiIcon } from '@100mslive/react-icons';
14
15
  import { EmojiCard } from './Footer/EmojiCard';
15
- import { ToastManager } from './Toast/ToastManager';
16
+ // import { ToastManager } from './Toast/ToastManager';
16
17
  import { Dropdown } from '../../Dropdown';
17
18
  import { Box } from '../../Layout';
19
+ import { config as cssConfig } from '../../Theme';
18
20
  import { Tooltip } from '../../Tooltip';
19
21
  import IconButton from '../IconButton';
20
- import { useHLSViewerRole } from './AppData/useUISettings';
21
22
  import { useDropdownList } from './hooks/useDropdownList';
22
- import { useIsFeatureEnabled } from './hooks/useFeatures';
23
- import { EMOJI_REACTION_TYPE, FEATURE_LIST } from '../common/constants';
23
+ import { EMOJI_REACTION_TYPE } from '../common/constants';
24
24
 
25
25
  init({ data });
26
26
 
27
27
  export const EmojiReaction = () => {
28
28
  const [open, setOpen] = useState(false);
29
29
  const isConnected = useHMSStore(selectIsConnectedToRoom);
30
- const isFeatureEnabled = useIsFeatureEnabled(FEATURE_LIST.EMOJI_REACTION);
31
30
  useDropdownList({ open: open, name: 'EmojiReaction' });
32
- const hmsActions = useHMSActions();
31
+ // const hmsActions = useHMSActions();
33
32
  const roles = useHMSStore(selectAvailableRoleNames);
34
33
  const localPeerId = useHMSStore(selectLocalPeerID);
35
- const hlsViewerRole = useHLSViewerRole();
36
- const { isStreamingOn } = useRecordingStreaming();
37
- const filteredRoles = useMemo(() => roles.filter(role => role !== hlsViewerRole), [roles, hlsViewerRole]);
38
-
39
- const onEmojiEvent = useCallback(data => {
40
- window.showFlyingEmoji(data?.emojiId, data?.senderId);
41
- }, []);
34
+ // const { isStreamingOn } = useRecordingStreaming();
35
+ const isMobile = useMedia(cssConfig.media.md);
42
36
 
43
37
  const { sendEvent } = useCustomEvent({
44
38
  type: EMOJI_REACTION_TYPE,
45
- onEvent: onEmojiEvent,
46
39
  });
47
40
 
48
41
  const sendReaction = async emojiId => {
@@ -51,8 +44,10 @@ export const EmojiReaction = () => {
51
44
  emojiId: emojiId,
52
45
  senderId: localPeerId,
53
46
  };
54
- sendEvent(data, { roleNames: filteredRoles });
55
- if (isStreamingOn) {
47
+ // TODO: RT find a way to figure out hls-viewer roles
48
+ sendEvent(data, { roleNames: roles });
49
+ window.showFlyingEmoji?.({ emojiId, senderId: localPeerId });
50
+ /* if (isStreamingOn) {
56
51
  try {
57
52
  await hmsActions.sendHLSTimedMetadata([
58
53
  {
@@ -64,13 +59,15 @@ export const EmojiReaction = () => {
64
59
  console.log(error);
65
60
  ToastManager.addToast({ title: error.message });
66
61
  }
67
- }
62
+ } */
68
63
  };
69
64
 
70
- if (!isConnected || !isFeatureEnabled) {
65
+ if (!isConnected) {
71
66
  return null;
72
67
  }
73
- return (
68
+ return isMobile ? (
69
+ <EmojiCard sendReaction={sendReaction} />
70
+ ) : (
74
71
  <Fragment>
75
72
  <Dropdown.Root open={open} onOpenChange={setOpen}>
76
73
  <Dropdown.Trigger asChild data-testid="emoji_reaction_btn">
@@ -1,21 +1,25 @@
1
- import React from 'react';
1
+ import React, { useEffect } from 'react';
2
2
  import { selectUnreadHMSMessagesCount, useHMSStore } from '@100mslive/react-sdk';
3
3
  import { ChatIcon, ChatUnreadIcon } from '@100mslive/react-icons';
4
- import { Tooltip } from '../../../';
4
+ import { Tooltip } from '../../..';
5
+ // @ts-ignore: No implicit Any
5
6
  import IconButton from '../../IconButton';
7
+ // @ts-ignore: No implicit Any
6
8
  import { useIsSidepaneTypeOpen, useSidepaneToggle } from '../AppData/useSidepane';
7
- import { useIsFeatureEnabled } from '../hooks/useFeatures';
8
- import { FEATURE_LIST, SIDE_PANE_OPTIONS } from '../../common/constants';
9
+ // @ts-ignore: No implicit Any
10
+ import { SIDE_PANE_OPTIONS } from '../../common/constants';
9
11
 
10
- export const ChatToggle = () => {
12
+ export const ChatToggle = ({ openByDefault }: { openByDefault: boolean }) => {
11
13
  const countUnreadMessages = useHMSStore(selectUnreadHMSMessagesCount);
12
14
  const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
13
15
  const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
14
- const isFeatureEnabled = useIsFeatureEnabled(FEATURE_LIST.CHAT);
15
16
 
16
- if (!isFeatureEnabled) {
17
- return;
18
- }
17
+ useEffect(() => {
18
+ if (!isChatOpen && openByDefault) {
19
+ toggleChat();
20
+ }
21
+ // eslint-disable-next-line react-hooks/exhaustive-deps
22
+ }, [toggleChat, openByDefault]);
19
23
 
20
24
  return (
21
25
  <Tooltip key="chat" title={`${isChatOpen ? 'Close' : 'Open'} chat`}>
@@ -0,0 +1,98 @@
1
+ import React, { Suspense } from 'react';
2
+ import { useMedia } from 'react-use';
3
+ import {
4
+ ConferencingScreen,
5
+ DefaultConferencingScreen_Elements,
6
+ HLSLiveStreamingScreen_Elements,
7
+ } from '@100mslive/types-prebuilt';
8
+ import { Chat_ChatState } from '@100mslive/types-prebuilt/elements/chat';
9
+ import { selectIsLocalVideoEnabled, useHMSStore } from '@100mslive/react-sdk';
10
+ import { config as cssConfig, Footer as AppFooter } from '../../..';
11
+ // @ts-ignore: No implicit Any
12
+ import { AudioVideoToggle } from '../AudioVideoToggle';
13
+ // @ts-ignore: No implicit Any
14
+ import { EmojiReaction } from '../EmojiReaction';
15
+ // @ts-ignore: No implicit Any
16
+ import { LeaveRoom } from '../Leave/LeaveRoom';
17
+ // @ts-ignore: No implicit Any
18
+ import { MoreSettings } from '../MoreSettings/MoreSettings';
19
+ // @ts-ignore: No implicit Any
20
+ import { RaiseHand } from '../RaiseHand';
21
+ // @ts-ignore: No implicit Any
22
+ import { ScreenshareToggle } from '../ScreenShareToggle';
23
+ // @ts-ignore: No implicit Any
24
+ import { ChatToggle } from './ChatToggle';
25
+ // @ts-ignore: No implicit Any
26
+ import { ParticipantCount } from './ParticipantList';
27
+ // @ts-ignore: No implicit Any
28
+ const VirtualBackground = React.lazy(() => import('../../plugins/VirtualBackground/VirtualBackground'));
29
+
30
+ export const Footer = ({
31
+ screenType,
32
+ elements,
33
+ }: {
34
+ screenType: keyof ConferencingScreen;
35
+ elements: DefaultConferencingScreen_Elements | HLSLiveStreamingScreen_Elements;
36
+ }) => {
37
+ const isMobile = useMedia(cssConfig.media.md);
38
+ const isOverlayChat = !!elements?.chat?.is_overlay;
39
+ const openByDefault = elements?.chat?.initial_state === Chat_ChatState.CHAT_STATE_OPEN;
40
+ const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);
41
+
42
+ return (
43
+ <AppFooter.Root
44
+ css={{
45
+ flexWrap: 'nowrap',
46
+ '@md': {
47
+ justifyContent: 'center',
48
+ gap: '$10',
49
+ position: 'relative',
50
+ // To prevent it from showing over the sidepane if chat type is not overlay
51
+ zIndex: isOverlayChat ? 20 : 1,
52
+ },
53
+ }}
54
+ >
55
+ <AppFooter.Left
56
+ css={{
57
+ '@md': {
58
+ w: 'unset',
59
+ p: '0',
60
+ gap: '$10',
61
+ },
62
+ }}
63
+ >
64
+ {isMobile ? <LeaveRoom screenType={screenType} /> : null}
65
+ <AudioVideoToggle />
66
+ {isMobile ? null : <Suspense fallback={<></>}>{isVideoOn ? <VirtualBackground /> : null}</Suspense>}
67
+ </AppFooter.Left>
68
+ <AppFooter.Center
69
+ css={{
70
+ '@md': {
71
+ w: 'unset',
72
+ gap: '$10',
73
+ },
74
+ }}
75
+ >
76
+ {isMobile ? (
77
+ <>
78
+ {screenType === 'hls_live_streaming' ? <RaiseHand /> : null}
79
+ {elements?.chat && <ChatToggle openByDefault={openByDefault} />}
80
+ <MoreSettings elements={elements} screenType={screenType} />
81
+ </>
82
+ ) : (
83
+ <>
84
+ <ScreenshareToggle />
85
+ <RaiseHand />
86
+ {elements?.emoji_reactions && <EmojiReaction />}
87
+ <LeaveRoom screenType={screenType} />
88
+ </>
89
+ )}
90
+ </AppFooter.Center>
91
+ <AppFooter.Right>
92
+ {!isMobile && elements?.chat && <ChatToggle openByDefault={openByDefault} />}
93
+ {elements?.participant_list && <ParticipantCount />}
94
+ <MoreSettings elements={elements} screenType={screenType} />
95
+ </AppFooter.Right>
96
+ </AppFooter.Root>
97
+ );
98
+ };