@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
@@ -1,17 +1,12 @@
1
1
  import React, { useState } from 'react';
2
- import { Dialog, Flex, HorizontalDivider, Input, Text } from '../../../';
3
- import { DialogInputFile, DialogRow } from '../../primitives/DialogContent';
4
- import { PdfErrorView } from './pdfErrorView';
2
+ import { Dialog, Flex } from '../../../';
3
+ import { DialogInputFile } from '../../primitives/DialogContent';
5
4
  import { PDFHeader } from './pdfHeader';
6
- import { PDFInfo } from './pdfInfo';
7
5
  import { SubmitPDF } from './submitPdf';
8
6
  import { UploadedFile } from './uploadedFile';
9
7
 
10
8
  export function PDFFileOptions({ onOpenChange }) {
11
- const [isPDFUrlValid, setIsPDFUrlValid] = useState(true);
12
- const [isValidateProgress, setIsValidateProgress] = useState(false);
13
9
  const [pdfFile, setPDFFile] = useState(null);
14
- const [pdfURL, setPDFURL] = useState('');
15
10
 
16
11
  return !pdfFile ? (
17
12
  <Dialog.Root defaultOpen onOpenChange={onOpenChange}>
@@ -35,75 +30,13 @@ export function PDFFileOptions({ onOpenChange }) {
35
30
  type="file"
36
31
  accept=".pdf"
37
32
  />
38
- <DialogRow
39
- css={{
40
- m: '$10 0',
41
- }}
42
- >
43
- <HorizontalDivider
44
- css={{
45
- mr: '$4',
46
- }}
47
- />
48
- <Text
49
- variant="tiny"
50
- css={{
51
- color: '$on_surface_low',
52
- }}
53
- >
54
- OR
55
- </Text>
56
- <HorizontalDivider
57
- css={{
58
- ml: '$4',
59
- }}
60
- />
61
- </DialogRow>
62
- <Text
63
- variant="sm"
64
- css={{
65
- py: '$2',
66
- }}
67
- >
68
- Import from URL
69
- </Text>
70
- <Input
71
- css={{ w: '100%', mb: '$10' }}
72
- value={pdfURL}
73
- onFocus={() => {
74
- setIsPDFUrlValid(true);
75
- setIsValidateProgress(false);
76
- }}
77
- onChange={e => {
78
- setPDFURL(e.target.value);
79
- }}
80
- placeholder="Paste PDF URL"
81
- type="text"
82
- error={!isPDFUrlValid}
83
- />
84
- {!isPDFUrlValid && <PdfErrorView isPDFUrlValid={isPDFUrlValid} />}
85
- <PDFInfo />
86
- <SubmitPDF
87
- pdfFile={pdfFile}
88
- pdfURL={pdfURL}
89
- isValidateProgress={isValidateProgress}
90
- setIsPDFUrlValid={setIsPDFUrlValid}
91
- setIsValidateProgress={setIsValidateProgress}
92
- onOpenChange={onOpenChange}
93
- />
33
+
34
+ <SubmitPDF pdfFile={pdfFile} onOpenChange={onOpenChange} />
94
35
  </Flex>
95
36
  </Dialog.Content>
96
37
  </Dialog.Portal>
97
38
  </Dialog.Root>
98
39
  ) : (
99
- <UploadedFile
100
- pdfFile={pdfFile}
101
- pdfURL={pdfURL}
102
- isValidateProgress={isValidateProgress}
103
- setPDFFile={setPDFFile}
104
- setIsPDFUrlValid={setIsPDFUrlValid}
105
- setIsValidateProgress={setIsValidateProgress}
106
- onOpenChange={onOpenChange}
107
- />
40
+ <UploadedFile pdfFile={pdfFile} setPDFFile={setPDFFile} onOpenChange={onOpenChange} />
108
41
  );
109
42
  }
@@ -1,49 +1,11 @@
1
- import React, { useCallback } from 'react';
1
+ import React from 'react';
2
2
  import { Button, Flex } from '../../../';
3
3
  import { useSetAppDataByKey } from '../AppData/useUISettings';
4
4
  import { APP_DATA } from '../../common/constants';
5
5
 
6
- export const SubmitPDF = ({
7
- pdfFile,
8
- pdfURL,
9
- isValidateProgress,
10
- setIsPDFUrlValid,
11
- setIsValidateProgress,
12
- onOpenChange,
13
- }) => {
6
+ export const SubmitPDF = ({ pdfFile, onOpenChange }) => {
14
7
  const [, setPDFConfig] = useSetAppDataByKey(APP_DATA.pdfConfig);
15
8
 
16
- const isValidPDF = useCallback(
17
- pdfURL => {
18
- const extension = pdfURL.split('.').pop().toLowerCase();
19
- setIsValidateProgress(true);
20
- if (extension === 'pdf') {
21
- setIsPDFUrlValid(true);
22
- setIsValidateProgress(false);
23
- setPDFConfig({ state: true, file: pdfFile, url: pdfURL });
24
- onOpenChange(false);
25
- }
26
-
27
- fetch(pdfURL, { method: 'HEAD' })
28
- .then(response => response.headers.get('content-type'))
29
- .then(contentType => {
30
- if (contentType === 'application/pdf') {
31
- setIsPDFUrlValid(true);
32
- setIsValidateProgress(false);
33
- setPDFConfig({ state: true, file: pdfFile, url: pdfURL });
34
- onOpenChange(false);
35
- } else {
36
- setIsPDFUrlValid(false);
37
- setIsValidateProgress(false);
38
- }
39
- })
40
- .catch(() => {
41
- setIsPDFUrlValid(false);
42
- setIsValidateProgress(false);
43
- });
44
- },
45
- [onOpenChange, pdfFile, setIsPDFUrlValid, setIsValidateProgress, setPDFConfig],
46
- );
47
9
  return (
48
10
  <Flex
49
11
  direction="row"
@@ -69,14 +31,11 @@ export const SubmitPDF = ({
69
31
  type="submit"
70
32
  onClick={() => {
71
33
  if (pdfFile) {
72
- setPDFConfig({ state: true, file: pdfFile, url: pdfURL });
34
+ setPDFConfig({ state: true, file: pdfFile });
73
35
  onOpenChange(false);
74
- } else if (pdfURL) {
75
- isValidPDF(pdfURL);
76
36
  }
77
37
  }}
78
- disabled={!pdfFile && !pdfURL}
79
- loading={isValidateProgress}
38
+ disabled={!pdfFile}
80
39
  data-testid="share_pdf_btn"
81
40
  css={{
82
41
  w: '50%',
@@ -6,15 +6,7 @@ import { PDFHeader } from './pdfHeader';
6
6
  import { PDFInfo } from './pdfInfo';
7
7
  import { SubmitPDF } from './submitPdf';
8
8
 
9
- export const UploadedFile = ({
10
- pdfFile,
11
- pdfURL,
12
- isValidateProgress,
13
- setPDFFile,
14
- setIsPDFUrlValid,
15
- setIsValidateProgress,
16
- onOpenChange,
17
- }) => {
9
+ export const UploadedFile = ({ pdfFile, setPDFFile, onOpenChange }) => {
18
10
  const [fileName, ext] = pdfFile.name.split('.');
19
11
  return (
20
12
  <Dialog.Root defaultOpen onOpenChange={onOpenChange}>
@@ -70,14 +62,7 @@ export const UploadedFile = ({
70
62
  />
71
63
  </DialogRow>
72
64
  <PDFInfo />
73
- <SubmitPDF
74
- pdfFile={pdfFile}
75
- pdfURL={pdfURL}
76
- isValidateProgress={isValidateProgress}
77
- setIsPDFUrlValid={setIsPDFUrlValid}
78
- setIsValidateProgress={setIsValidateProgress}
79
- onOpenChange={onOpenChange}
80
- />
65
+ <SubmitPDF pdfFile={pdfFile} onOpenChange={onOpenChange} />
81
66
  </Flex>
82
67
  </Dialog.Content>
83
68
  </Dialog.Portal>
@@ -22,6 +22,6 @@ export const getVideoTileLabel = ({ peerName, isLocal, track }) => {
22
22
  } else {
23
23
  label = `${peerName} ${track.source}`;
24
24
  }
25
- label = `${label}${track.degraded ? '(Degraded)' : ''}`;
25
+ // label = `${label}${track.degraded ? '(Degraded)' : ''}`;
26
26
  return `${label}${isLocallyMuted ? ' (Muted for you)' : ''}`;
27
27
  };
@@ -0,0 +1,12 @@
1
+ <svg width="184" height="133" viewBox="0 0 184 133" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M144.885 91.3998C145.318 91.023 145.861 90.7947 146.433 90.7483L146.446 90.7473L169.355 89.1614C169.702 89.1376 170.049 89.2101 170.358 89.3712C170.662 89.5305 170.918 89.7702 171.096 90.0642C171.098 90.0672 171.1 90.0703 171.102 90.0734L171.104 90.0766C171.281 90.3744 171.373 90.7154 171.369 91.062C171.365 91.4097 171.265 91.7496 171.08 92.044L158.85 111.504C158.539 111.986 158.081 112.356 157.544 112.56C157.007 112.764 156.419 112.791 155.866 112.636C155.313 112.482 154.823 112.155 154.469 111.703C154.115 111.25 153.915 110.697 153.898 110.123C153.898 110.109 153.898 110.094 153.898 110.08L153.996 100.307L145.347 95.7858C145.334 95.779 145.321 95.7721 145.308 95.7649C144.811 95.4785 144.417 95.0404 144.186 94.5146C143.955 93.9888 143.898 93.4029 144.024 92.8425C144.15 92.2821 144.451 91.7765 144.885 91.3998ZM167.441 91.0088L146.603 92.8952C146.49 92.9053 146.383 92.9508 146.298 93.0251C146.211 93.1005 146.151 93.2016 146.125 93.3137C146.1 93.4257 146.112 93.5429 146.158 93.6481C146.202 93.7484 146.276 93.8327 146.369 93.89L155.26 98.296L167.441 91.0088ZM156.32 100.171L168.547 92.8564L157.039 110.339C156.976 110.434 156.886 110.506 156.78 110.547C156.673 110.587 156.555 110.593 156.444 110.562C156.334 110.531 156.236 110.466 156.165 110.375C156.097 110.289 156.058 110.184 156.052 110.075L156.32 100.171Z" fill="#444954"/>
3
+ <path d="M83.3248 35.4156C71.7182 47.1017 51.2098 75.5175 62.0292 95.6918C75.5536 120.91 140.453 79.2983 115.364 67.6657C90.2756 56.0331 65.8818 122.018 101.568 120.391C116.398 118.62 131.221 114.699 145.703 105.512" stroke="#293042" stroke-width="2.25" stroke-dasharray="6 6"/>
4
+ <rect x="0.00256348" y="0.5" width="173.524" height="58.3398" rx="29.1699" fill="#272A31"/>
5
+ <g opacity="0.4">
6
+ <rect x="24.7526" y="20.9312" width="111" height="4.5" rx="2.25" fill="#444954"/>
7
+ </g>
8
+ <g opacity="0.4">
9
+ <rect x="38.2526" y="34.4312" width="110.25" height="4.5" rx="2.25" fill="#444954"/>
10
+ </g>
11
+ <path d="M40.3918 71.5547L28.4246 55.0999L52.3589 55.0999L40.3918 71.5547Z" fill="#272A31"/>
12
+ </svg>
@@ -1,17 +1,14 @@
1
1
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
- import { useMedia } from 'react-use';
3
2
  import {
4
- selectLocalPeerID,
5
- selectLocalPeerRoleName,
6
3
  selectPeers,
7
4
  selectPeerScreenSharing,
8
5
  throwErrorHandler,
9
6
  useHMSStore,
10
7
  useScreenShare,
11
8
  } from '@100mslive/react-sdk';
12
- import { Box, Flex } from '../../Layout';
13
- import { config as cssConfig } from '../../Theme';
14
- import { SidePane } from './screenShareView';
9
+ import { SecondaryTiles } from '../components/SecondaryTiles';
10
+ import { ProminenceLayout } from '../components/VideoLayouts/ProminenceLayout';
11
+ import { Box } from '../../Layout';
15
12
  import { useSetAppDataByKey } from '../components/AppData/useUISettings';
16
13
  import { APP_DATA } from '../common/constants';
17
14
 
@@ -26,45 +23,25 @@ export const EmbedView = () => {
26
23
  export const EmbebScreenShareView = ({ children }) => {
27
24
  const peers = useHMSStore(selectPeers);
28
25
 
29
- const mediaQueryLg = cssConfig.media.xl;
30
- const showSidebarInBottom = useMedia(mediaQueryLg);
31
- const localPeerID = useHMSStore(selectLocalPeerID);
32
- const localPeerRole = useHMSStore(selectLocalPeerRoleName);
33
26
  const peerPresenting = useHMSStore(selectPeerScreenSharing);
34
- const isPresenterFromMyRole = peerPresenting?.roleName?.toLowerCase() === localPeerRole?.toLowerCase();
35
- const amIPresenting = localPeerID === peerPresenting?.id;
36
- const showPresenterInSmallTile = showSidebarInBottom || amIPresenting || isPresenterFromMyRole;
27
+ const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);
37
28
 
38
29
  const smallTilePeers = useMemo(() => {
39
30
  const smallTilePeers = peers.filter(peer => peer.id !== peerPresenting?.id);
40
- if (showPresenterInSmallTile && peerPresenting) {
41
- smallTilePeers.unshift(peerPresenting); // put presenter on first page
42
- }
43
31
  return smallTilePeers;
44
- }, [peers, peerPresenting, showPresenterInSmallTile]);
32
+ }, [peers, peerPresenting]);
33
+
34
+ useEffect(() => {
35
+ setActiveScreenSharePeer(peerPresenting?.id);
36
+ return () => {
37
+ setActiveScreenSharePeer('');
38
+ };
39
+ }, [peerPresenting?.id, setActiveScreenSharePeer]);
45
40
  return (
46
- <Flex css={{ size: '100%' }} direction={showSidebarInBottom ? 'column' : 'row'}>
47
- {children}
48
- <Flex
49
- direction={{ '@initial': 'column', '@lg': 'row' }}
50
- css={{
51
- overflow: 'hidden',
52
- p: '$4 $8',
53
- flex: '0 0 20%',
54
- '@xl': {
55
- flex: '1 1 0',
56
- },
57
- }}
58
- >
59
- <SidePane
60
- showSidebarInBottom={showSidebarInBottom}
61
- peerScreenSharing={peerPresenting}
62
- isPresenterInSmallTiles={showPresenterInSmallTile}
63
- smallTilePeers={smallTilePeers}
64
- totalPeers={peers.length}
65
- />
66
- </Flex>
67
- </Flex>
41
+ <ProminenceLayout.Root>
42
+ <ProminenceLayout.ProminentSection>{children}</ProminenceLayout.ProminentSection>
43
+ <SecondaryTiles peers={smallTilePeers} />
44
+ </ProminenceLayout.Root>
68
45
  );
69
46
  };
70
47
 
@@ -117,17 +94,7 @@ const EmbedComponent = () => {
117
94
  }, [wasScreenShared, amIScreenSharing, resetEmbedConfig, toggleScreenShare]);
118
95
 
119
96
  return (
120
- <Box
121
- ref={iframeRef}
122
- css={{
123
- flex: '3 1 0',
124
- '@lg': {
125
- flex: '2 1 0',
126
- display: 'flex',
127
- alignItems: 'center',
128
- },
129
- }}
130
- >
97
+ <Box ref={iframeRef} css={{ size: '100%' }}>
131
98
  <iframe
132
99
  src={src}
133
100
  title={src}
@@ -1,9 +1,9 @@
1
1
  import React, { useCallback, useEffect, useRef, useState } from 'react';
2
- import { useFullscreen, useToggle } from 'react-use';
2
+ import { useFullscreen, useMedia, useToggle } from 'react-use';
3
3
  import { HLSPlaybackState, HMSHLSPlayer, HMSHLSPlayerEvents } from '@100mslive/hls-player';
4
4
  import screenfull from 'screenfull';
5
5
  import { selectAppData, selectHLSState, useHMSActions, useHMSStore } from '@100mslive/react-sdk';
6
- import { ExpandIcon, ShrinkIcon } from '@100mslive/react-icons';
6
+ import { ColoredHandIcon, ExpandIcon, RadioIcon, ShrinkIcon } from '@100mslive/react-icons';
7
7
  import { HlsStatsOverlay } from '../components/HlsStatsOverlay';
8
8
  import { HMSVideoPlayer } from '../components/HMSVideo';
9
9
  import { FullScreenButton } from '../components/HMSVideo/FullscreenButton';
@@ -14,7 +14,7 @@ import { IconButton } from '../../IconButton';
14
14
  import { Box, Flex } from '../../Layout';
15
15
  import { Loading } from '../../Loading';
16
16
  import { Text } from '../../Text';
17
- import { useTheme } from '../../Theme';
17
+ import { config, useTheme } from '../../Theme';
18
18
  import { Tooltip } from '../../Tooltip';
19
19
  import { APP_DATA, EMOJI_REACTION_TYPE } from '../common/constants';
20
20
 
@@ -26,7 +26,8 @@ const HLSView = () => {
26
26
  const hlsState = useHMSStore(selectHLSState);
27
27
  const enablHlsStats = useHMSStore(selectAppData(APP_DATA.hlsStats));
28
28
  const hmsActions = useHMSActions();
29
- const { themeType } = useTheme();
29
+ const { themeType, theme } = useTheme();
30
+ const [streamEnded, setStreamEnded] = useState(false);
30
31
  let [hlsStatsState, setHlsStatsState] = useState(null);
31
32
  const hlsUrl = hlsState.variants[0]?.url;
32
33
  const [availableLayers, setAvailableLayers] = useState([]);
@@ -37,6 +38,12 @@ const HLSView = () => {
37
38
  const [isPaused, setIsPaused] = useState(false);
38
39
  const isFullScreenSupported = screenfull.isEnabled;
39
40
  const [show, toggle] = useToggle(false);
41
+ const [controlsVisible, setControlsVisible] = useState(true);
42
+ const controlsRef = useRef();
43
+ const controlsTimerRef = useRef();
44
+ const [qualityDropDownOpen, setQualityDropDownOpen] = useState(false);
45
+
46
+ const isMobile = useMedia(config.media.md);
40
47
  const isFullScreen = useFullscreen(hlsViewRef, show, {
41
48
  onClose: () => toggle(false),
42
49
  });
@@ -58,6 +65,19 @@ const HLSView = () => {
58
65
  };
59
66
  }, []);
60
67
 
68
+ useEffect(() => {
69
+ const videoElem = videoRef.current;
70
+ const setStreamEndedCallback = () => {
71
+ setStreamEnded(true);
72
+ // no point keeping the callback attached once the streaming is ended
73
+ videoElem?.removeEventListener('ended', setStreamEndedCallback);
74
+ };
75
+ videoElem?.addEventListener('ended', setStreamEndedCallback);
76
+ return () => {
77
+ videoElem?.removeEventListener('ended', setStreamEndedCallback);
78
+ };
79
+ }, [hlsUrl]);
80
+
61
81
  /**
62
82
  * initialize HMSHLSPlayer and add event listeners.
63
83
  */
@@ -82,7 +102,7 @@ const HLSView = () => {
82
102
  const parsedPayload = parsePayload(payload);
83
103
  switch (parsedPayload.type) {
84
104
  case EMOJI_REACTION_TYPE:
85
- window.showFlyingEmoji(parsedPayload?.emojiId, parsedPayload?.senderId);
105
+ window.showFlyingEmoji?.({ emojiId: parsedPayload?.emojiId, senderId: parsedPayload?.senderId });
86
106
  break;
87
107
  default: {
88
108
  const toast = {
@@ -167,6 +187,43 @@ const HLSView = () => {
167
187
  hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats);
168
188
  };
169
189
 
190
+ useEffect(() => {
191
+ if (controlsVisible && isFullScreen && !qualityDropDownOpen) {
192
+ if (controlsTimerRef.current) {
193
+ clearTimeout(controlsTimerRef.current);
194
+ }
195
+ controlsTimerRef.current = setTimeout(() => {
196
+ setControlsVisible(false);
197
+ }, 5000);
198
+ }
199
+ if (!isFullScreen && controlsTimerRef.current) {
200
+ clearTimeout(controlsTimerRef.current);
201
+ }
202
+ return () => {
203
+ if (controlsTimerRef.current) {
204
+ clearTimeout(controlsTimerRef.current);
205
+ }
206
+ };
207
+ }, [controlsVisible, isFullScreen, qualityDropDownOpen]);
208
+
209
+ const onHoverHandler = useCallback(
210
+ event => {
211
+ if (event.type === 'mouseenter' || qualityDropDownOpen) {
212
+ setControlsVisible(true);
213
+ return;
214
+ }
215
+ if (event.type === 'mouseleave') {
216
+ setControlsVisible(false);
217
+ } else if (isFullScreen && !controlsVisible && event.type === 'mousemove') {
218
+ setControlsVisible(true);
219
+ if (controlsTimerRef.current) {
220
+ clearTimeout(controlsTimerRef.current);
221
+ }
222
+ }
223
+ },
224
+ [controlsVisible, isFullScreen, qualityDropDownOpen],
225
+ );
226
+
170
227
  return (
171
228
  <Flex
172
229
  key="hls-viewer"
@@ -179,7 +236,7 @@ const HLSView = () => {
179
236
  {hlsStatsState?.url && enablHlsStats ? (
180
237
  <HlsStatsOverlay hlsStatsState={hlsStatsState} onClose={sfnOverlayClose} />
181
238
  ) : null}
182
- {hlsUrl && hlsState.running ? (
239
+ {hlsUrl && !streamEnded ? (
183
240
  <Flex
184
241
  id="hls-player-container"
185
242
  align="center"
@@ -202,31 +259,45 @@ const HLSView = () => {
202
259
  <Loading width={72} height={72} />
203
260
  </Flex>
204
261
  )}
205
- <HMSVideoPlayer.Root ref={videoRef}>
206
- {hlsPlayer && (
207
- <HMSVideoPlayer.Progress
208
- onValueChange={currentTime => {
209
- hlsPlayer.seekTo(currentTime);
210
- }}
211
- hlsPlayer={hlsPlayer}
212
- />
213
- )}
214
-
215
- <HMSVideoPlayer.Controls.Root css={{ p: '$4 $8' }}>
216
- <HMSVideoPlayer.Controls.Left>
217
- <HMSVideoPlayer.PlayButton
218
- onClick={async () => {
219
- isPaused ? await hlsPlayer?.play() : hlsPlayer?.pause();
262
+ <HMSVideoPlayer.Root
263
+ ref={videoRef}
264
+ onMouseEnter={onHoverHandler}
265
+ onMouseMove={onHoverHandler}
266
+ onMouseLeave={onHoverHandler}
267
+ >
268
+ <Flex
269
+ ref={controlsRef}
270
+ direction="column"
271
+ justify="flex-end"
272
+ align="flex-start"
273
+ css={{
274
+ position: 'absolute',
275
+ bottom: '0',
276
+ left: '0',
277
+ background: `linear-gradient(180deg, ${theme.colors.background_dim.value}00 29.46%, ${theme.colors.background_dim.value}A3 100%);`,
278
+ width: '100%',
279
+ pt: '$8',
280
+ flexShrink: 0,
281
+ transition: 'visibility 0s 0.5s, opacity 0.5s linear',
282
+ visibility: controlsVisible ? `` : `hidden`,
283
+ opacity: controlsVisible ? `1` : '0',
284
+ }}
285
+ >
286
+ {!isMobile && (
287
+ <HMSVideoPlayer.Controls.Root
288
+ css={{
289
+ p: '$4 $8',
220
290
  }}
221
- isPaused={isPaused}
222
- />
223
- <HMSVideoPlayer.Duration hlsPlayer={hlsPlayer} />
224
- <HMSVideoPlayer.Volume hlsPlayer={hlsPlayer} />
225
- </HMSVideoPlayer.Controls.Left>
226
-
227
- <HMSVideoPlayer.Controls.Right>
228
- {availableLayers.length > 0 ? (
229
- <>
291
+ >
292
+ <HMSVideoPlayer.Controls.Left>
293
+ <HMSVideoPlayer.PlayButton
294
+ onClick={async () => {
295
+ isPaused ? await hlsPlayer?.play() : hlsPlayer?.pause();
296
+ }}
297
+ isPaused={isPaused}
298
+ />
299
+ <HMSVideoPlayer.Duration hlsPlayer={hlsPlayer} />
300
+ <HMSVideoPlayer.Volume hlsPlayer={hlsPlayer} />
230
301
  <IconButton
231
302
  variant="standard"
232
303
  css={{ px: '$2' }}
@@ -243,7 +314,7 @@ const HLSView = () => {
243
314
  css={{
244
315
  height: '$4',
245
316
  width: '$4',
246
- background: isVideoLive ? '$alert_error_default' : '$on_primary_high',
317
+ background: isVideoLive ? '$alert_error_default' : '$on_primary_medium',
247
318
  r: '$1',
248
319
  }}
249
320
  />
@@ -251,35 +322,51 @@ const HLSView = () => {
251
322
  variant={{
252
323
  '@sm': 'xs',
253
324
  }}
325
+ css={{
326
+ c: isVideoLive ? '$on_surface_high' : '$on_surface_medium',
327
+ }}
254
328
  >
255
329
  {isVideoLive ? 'LIVE' : 'GO LIVE'}
256
330
  </Text>
257
331
  </Flex>
258
332
  </Tooltip>
259
333
  </IconButton>
260
- <HLSQualitySelector
261
- layers={availableLayers}
262
- selection={currentSelectedQuality}
263
- onQualityChange={handleQuality}
264
- isAuto={isUserSelectedAuto}
265
- />
266
- </>
267
- ) : null}
268
- {isFullScreenSupported ? (
269
- <FullScreenButton
270
- isFullScreen={isFullScreen}
271
- onToggle={toggle}
272
- icon={isFullScreen ? <ShrinkIcon /> : <ExpandIcon />}
273
- />
274
- ) : null}
275
- </HMSVideoPlayer.Controls.Right>
276
- </HMSVideoPlayer.Controls.Root>
334
+ </HMSVideoPlayer.Controls.Left>
335
+
336
+ <HMSVideoPlayer.Controls.Right>
337
+ {availableLayers.length > 0 ? (
338
+ <HLSQualitySelector
339
+ layers={availableLayers}
340
+ onOpen={setQualityDropDownOpen}
341
+ open={qualityDropDownOpen}
342
+ selection={currentSelectedQuality}
343
+ onQualityChange={handleQuality}
344
+ isAuto={isUserSelectedAuto}
345
+ />
346
+ ) : null}
347
+ {isFullScreenSupported ? (
348
+ <FullScreenButton
349
+ isFullScreen={isFullScreen}
350
+ onToggle={toggle}
351
+ icon={isFullScreen ? <ShrinkIcon /> : <ExpandIcon />}
352
+ />
353
+ ) : null}
354
+ </HMSVideoPlayer.Controls.Right>
355
+ </HMSVideoPlayer.Controls.Root>
356
+ )}
357
+ </Flex>
277
358
  </HMSVideoPlayer.Root>
278
359
  </Flex>
279
360
  ) : (
280
- <Flex align="center" justify="center" css={{ size: '100%', px: '$10' }}>
281
- <Text variant="md" css={{ textAlign: 'center' }}>
282
- Waiting for the stream to start...
361
+ <Flex align="center" justify="center" direction="column" css={{ size: '100%', px: '$10' }}>
362
+ <Flex css={{ c: '$on_surface_high', r: '$round', bg: '$surface_default', p: '$2' }}>
363
+ {streamEnded ? <ColoredHandIcon height={56} width={56} /> : <RadioIcon height={56} width={56} />}
364
+ </Flex>
365
+ <Text variant="h5" css={{ c: '$on_surface_high', mt: '$10', mb: 0, textAlign: 'center' }}>
366
+ {streamEnded ? 'Stream has ended' : 'Stream yet to start'}
367
+ </Text>
368
+ <Text variant="md" css={{ textAlign: 'center', mt: '$4', c: '$on_surface_medium' }}>
369
+ {streamEnded ? 'Have a nice day!' : 'Sit back and relax'}
283
370
  </Text>
284
371
  </Flex>
285
372
  )}
@@ -77,17 +77,7 @@ export const PDFEmbedComponent = () => {
77
77
  }, [wasScreenShared, amIScreenSharing, resetEmbedConfig, toggleScreenShare]);
78
78
 
79
79
  return (
80
- <Box
81
- ref={iframeRef}
82
- css={{
83
- flex: '3 1 0',
84
- '@lg': {
85
- flex: '2 1 0',
86
- display: 'flex',
87
- alignItems: 'center',
88
- },
89
- }}
90
- >
80
+ <Box ref={iframeRef} css={{ size: '100%' }}>
91
81
  <iframe
92
82
  src={pdfJSURL}
93
83
  title="PDF Annotator"