@100mslive/roomkit-react 0.1.5 → 0.1.6-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-P57IRMAR.js → HLSView-PY2FKWX3.js} +191 -123
- package/dist/HLSView-PY2FKWX3.js.map +7 -0
- package/dist/Prebuilt/App.d.ts +3 -0
- package/dist/Prebuilt/AppContext.d.ts +13 -0
- package/dist/Prebuilt/common/PeersSorter.d.ts +21 -0
- package/dist/Prebuilt/components/Footer/Footer.d.ts +6 -0
- package/dist/Prebuilt/components/Header/Header.d.ts +2 -0
- package/dist/Prebuilt/components/InsetTile.d.ts +2 -0
- package/dist/Prebuilt/components/Leave/DesktopLeaveRoom.d.ts +7 -0
- package/dist/Prebuilt/components/Leave/EndSessionContent.d.ts +8 -0
- package/dist/Prebuilt/components/Leave/LeaveAtoms.d.ts +2196 -0
- package/dist/Prebuilt/components/Leave/LeaveCard.d.ts +12 -0
- package/dist/Prebuilt/components/Leave/LeaveRoom.d.ts +5 -0
- package/dist/Prebuilt/components/Leave/LeaveSessionContent.d.ts +6 -0
- package/dist/Prebuilt/components/Leave/MwebLeaveRoom.d.ts +7 -0
- package/dist/Prebuilt/components/MoreSettings/MoreSettings.d.ts +6 -0
- package/dist/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.d.ts +6 -0
- package/dist/Prebuilt/components/Pagination.d.ts +6 -0
- package/dist/Prebuilt/components/Preview/PreviewForm.d.ts +10 -0
- package/dist/Prebuilt/components/SecondaryTiles.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/EqualProminence.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/Grid.d.ts +5 -0
- package/dist/Prebuilt/components/VideoLayouts/GridLayout.d.ts +10 -0
- package/dist/Prebuilt/components/VideoLayouts/ProminenceLayout.d.ts +12 -0
- package/dist/Prebuilt/components/VideoLayouts/RoleProminence.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/ScreenshareLayout.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/interface.d.ts +8 -0
- package/dist/Prebuilt/components/hooks/useRoleProminencePeers.d.ts +5 -0
- package/dist/Prebuilt/components/hooks/useTileLayout.d.ts +12 -0
- package/dist/Prebuilt/components/hooks/useVideoTileLayout.d.ts +11 -0
- package/dist/Prebuilt/layouts/SidePane.d.ts +6 -0
- package/dist/Prebuilt/layouts/VideoStreamingSection.d.ts +6 -0
- package/dist/Prebuilt/plugins/whiteboard/ToggleWhiteboard.d.ts +5 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.d.ts +1 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.d.ts +1 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.d.ts +17 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/index.d.ts +6 -1
- package/dist/{VirtualBackground-GGCQJ5JM.js → VirtualBackground-AYDHYLIZ.js} +5 -11
- package/dist/VirtualBackground-AYDHYLIZ.js.map +7 -0
- package/dist/{chunk-P5X32KOD.js → chunk-E2M2ZSOL.js} +8 -5
- package/dist/chunk-E2M2ZSOL.js.map +7 -0
- package/dist/chunk-GQD2AGWW.js +888 -0
- package/dist/chunk-GQD2AGWW.js.map +7 -0
- package/dist/{chunk-OSM4QEQG.js → chunk-RXTHJUMZ.js} +2462 -4738
- package/dist/chunk-RXTHJUMZ.js.map +7 -0
- package/dist/conference-V2XZGTKU.js +5927 -0
- package/dist/conference-V2XZGTKU.js.map +7 -0
- package/dist/index.cjs.js +9414 -15534
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +2 -2
- package/dist/meta.cjs.json +2156 -3347
- package/dist/meta.esbuild.json +2601 -3885
- package/package.json +7 -7
- package/src/Button/Button.tsx +2 -2
- package/src/Prebuilt/App.tsx +49 -33
- package/src/Prebuilt/{AppContext.jsx → AppContext.tsx} +11 -3
- package/src/Prebuilt/IconButton.jsx +1 -0
- package/src/Prebuilt/Prebuilt.stories.tsx +1 -0
- package/src/Prebuilt/common/{PeersSorter.js → PeersSorter.ts} +15 -10
- package/src/Prebuilt/common/constants.js +3 -112
- package/src/Prebuilt/common/hooks.js +34 -1
- package/src/Prebuilt/common/utils.js +0 -8
- package/src/Prebuilt/components/AppData/AppData.jsx +3 -13
- package/src/Prebuilt/components/AppData/useUISettings.js +0 -4
- package/src/Prebuilt/components/AudioVideoToggle.jsx +6 -0
- package/src/Prebuilt/components/AuthToken.jsx +11 -42
- package/src/Prebuilt/components/Chat/Chat.jsx +57 -26
- package/src/Prebuilt/components/Chat/ChatBody.jsx +92 -32
- package/src/Prebuilt/components/Chat/ChatFooter.jsx +72 -48
- package/src/Prebuilt/components/Chat/ChatParticipantHeader.jsx +73 -0
- package/src/Prebuilt/components/Chat/ChatSelector.jsx +16 -17
- package/src/Prebuilt/components/Chat/ChatSelectorContainer.jsx +81 -0
- package/src/Prebuilt/components/Connection/TileConnection.jsx +30 -12
- package/src/Prebuilt/components/EmojiReaction.jsx +18 -17
- package/src/Prebuilt/components/Footer/ChatToggle.jsx +1 -7
- package/src/Prebuilt/components/Footer/Footer.tsx +89 -0
- package/src/Prebuilt/components/Footer/ParticipantList.jsx +213 -173
- package/src/Prebuilt/components/Footer/RoleAccordion.jsx +78 -0
- package/src/Prebuilt/components/HMSVideo/Controls.jsx +2 -2
- package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx +33 -10
- package/src/Prebuilt/components/HMSVideo/PlayButton.jsx +1 -1
- package/src/Prebuilt/components/HMSVideo/VideoTime.jsx +3 -3
- package/src/Prebuilt/components/HMSVideo/VolumeControl.jsx +38 -9
- package/src/Prebuilt/components/Header/{ConferencingHeader.jsx → Header.tsx} +9 -7
- package/src/Prebuilt/components/Header/HeaderComponents.jsx +13 -4
- package/src/Prebuilt/components/Header/StreamActions.jsx +33 -60
- package/src/Prebuilt/components/Header/index.tsx +1 -0
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +17 -3
- package/src/Prebuilt/components/InsetTile.tsx +122 -0
- package/src/Prebuilt/components/{MoreSettings/SplitComponents/DesktopLeaveRoom.jsx → Leave/DesktopLeaveRoom.tsx} +50 -18
- package/src/Prebuilt/components/{EndSessionContent.jsx → Leave/EndSessionContent.tsx} +19 -9
- package/src/Prebuilt/components/Leave/LeaveAtoms.tsx +26 -0
- package/src/Prebuilt/components/{LeaveCard.jsx → Leave/LeaveCard.tsx} +22 -3
- package/src/Prebuilt/components/Leave/LeaveRoom.tsx +63 -0
- package/src/Prebuilt/components/{LeaveSessionContent.jsx → Leave/LeaveSessionContent.tsx} +13 -5
- package/src/Prebuilt/components/{MoreSettings/SplitComponents/MwebLeaveRoom.jsx → Leave/MwebLeaveRoom.tsx} +38 -13
- package/src/Prebuilt/components/MetaActions.jsx +15 -23
- package/src/Prebuilt/components/MoreSettings/ActionTile.jsx +5 -0
- package/src/Prebuilt/components/MoreSettings/ChangeNameContent.jsx +12 -7
- package/src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx +1 -1
- package/src/Prebuilt/components/MoreSettings/FullScreenItem.jsx +1 -4
- package/src/Prebuilt/components/MoreSettings/MoreSettings.tsx +27 -0
- package/src/Prebuilt/components/MoreSettings/SplitComponents/{DesktopOptions.jsx → DesktopOptions.tsx} +86 -75
- package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.jsx +20 -19
- package/src/Prebuilt/components/Notifications/HLSFailureModal.jsx +3 -1
- package/src/Prebuilt/components/Notifications/Notifications.jsx +18 -11
- package/src/Prebuilt/components/Notifications/PeerNotifications.jsx +14 -2
- package/src/Prebuilt/components/Notifications/PermissionErrorModal.jsx +10 -4
- package/src/Prebuilt/components/PIP/PIPComponent.jsx +7 -16
- package/src/Prebuilt/components/PIP/PIPManager.js +1 -0
- package/src/Prebuilt/components/{Pagination.jsx → Pagination.tsx} +35 -6
- package/src/Prebuilt/components/Playlist/Playlist.jsx +1 -6
- package/src/Prebuilt/components/PostLeave.jsx +7 -7
- package/src/Prebuilt/components/Preview/PreviewContainer.jsx +5 -13
- package/src/Prebuilt/components/Preview/{PreviewForm.jsx → PreviewForm.tsx} +14 -4
- package/src/Prebuilt/components/Preview/PreviewJoin.jsx +9 -7
- package/src/Prebuilt/components/RaiseHand.jsx +0 -7
- package/src/Prebuilt/components/RoleChangeRequestModal.jsx +82 -6
- package/src/Prebuilt/components/ScreenshareDisplay.jsx +4 -10
- package/src/Prebuilt/components/ScreenshareTile.jsx +41 -33
- package/src/Prebuilt/components/SecondaryTiles.tsx +34 -0
- package/src/Prebuilt/components/Settings/LayoutSettings.jsx +2 -12
- package/src/Prebuilt/components/Settings/NotificationSettings.jsx +3 -9
- package/src/Prebuilt/components/Settings/SettingsModal.jsx +3 -9
- package/src/Prebuilt/components/StatsForNerds.jsx +3 -1
- package/src/Prebuilt/components/TileMenu/TileMenu.jsx +15 -16
- package/src/Prebuilt/components/TileMenu/TileMenuContent.jsx +21 -19
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +53 -11
- package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +62 -0
- package/src/Prebuilt/components/VideoLayouts/Grid.tsx +41 -0
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +92 -0
- package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +60 -0
- package/src/Prebuilt/components/VideoLayouts/RoleProminence.tsx +56 -0
- package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +36 -0
- package/src/Prebuilt/components/VideoLayouts/interface.ts +9 -0
- package/src/Prebuilt/components/VideoTile.jsx +93 -43
- package/src/Prebuilt/components/conference.jsx +24 -20
- package/src/Prebuilt/components/hooks/useMetadata.jsx +7 -0
- package/src/Prebuilt/components/hooks/useRoleProminencePeers.tsx +38 -0
- package/src/Prebuilt/components/hooks/useTileLayout.tsx +121 -0
- package/src/Prebuilt/components/hooks/useVideoTileLayout.ts +22 -0
- package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +5 -72
- package/src/Prebuilt/components/pdfAnnotator/submitPdf.jsx +4 -45
- package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +2 -17
- package/src/Prebuilt/components/peerTileUtils.jsx +1 -1
- package/src/Prebuilt/images/empty-chat.svg +12 -0
- package/src/Prebuilt/layouts/EmbedView.jsx +17 -40
- package/src/Prebuilt/layouts/HLSView.jsx +83 -66
- package/src/Prebuilt/layouts/PDFView.jsx +1 -11
- package/src/Prebuilt/layouts/SidePane.tsx +96 -0
- package/src/Prebuilt/layouts/{mainView.jsx → VideoStreamingSection.tsx} +38 -47
- package/src/Prebuilt/layouts/WhiteboardView.jsx +10 -34
- package/src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx +1 -4
- package/src/Prebuilt/plugins/whiteboard/{ToggleWhiteboard.jsx → ToggleWhiteboard.tsx} +5 -9
- package/src/Prebuilt/primitives/DialogContent.jsx +15 -11
- package/src/Prebuilt/provider/roomLayoutProvider/constants/index.ts +17 -2
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts +36 -13
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.ts +10 -0
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts +65 -0
- package/src/Prebuilt/provider/roomLayoutProvider/index.tsx +17 -6
- package/dist/HLSView-P57IRMAR.js.map +0 -7
- package/dist/PinnedTrackView-4FYJEBTB.js +0 -102
- package/dist/PinnedTrackView-4FYJEBTB.js.map +0 -7
- package/dist/VirtualBackground-GGCQJ5JM.js.map +0 -7
- package/dist/chunk-IVTWKQI3.js +0 -827
- package/dist/chunk-IVTWKQI3.js.map +0 -7
- package/dist/chunk-OSM4QEQG.js.map +0 -7
- package/dist/chunk-P5X32KOD.js.map +0 -7
- package/dist/chunk-RVCZPPTL.js +0 -1100
- package/dist/chunk-RVCZPPTL.js.map +0 -7
- package/dist/conference-P6I6ESVF.js +0 -8995
- package/dist/conference-P6I6ESVF.js.map +0 -7
- package/src/Prebuilt/components/Chat/ChatHeader.jsx +0 -67
- package/src/Prebuilt/components/EqualProminence.jsx +0 -180
- package/src/Prebuilt/components/FirstPersonDisplay.jsx +0 -50
- package/src/Prebuilt/components/Footer/Footer.jsx +0 -73
- package/src/Prebuilt/components/Header/Header.jsx +0 -8
- package/src/Prebuilt/components/Header/StreamingHeader.jsx +0 -54
- package/src/Prebuilt/components/LeaveRoom.jsx +0 -94
- package/src/Prebuilt/components/MoreSettings/MoreSettings.jsx +0 -10
- package/src/Prebuilt/components/Notifications/MessageNotifications.jsx +0 -25
- package/src/Prebuilt/components/gridView.jsx +0 -85
- package/src/Prebuilt/components/hooks/useFeatures.js +0 -22
- package/src/Prebuilt/components/hooks/useNavigation.js +0 -19
- package/src/Prebuilt/components/hooks/useSkipPreview.jsx +0 -20
- package/src/Prebuilt/components/pdfAnnotator/pdfErrorView.jsx +0 -29
- package/src/Prebuilt/images/Logo.svg +0 -8
- package/src/Prebuilt/layouts/ActiveSpeakerView.jsx +0 -34
- package/src/Prebuilt/layouts/InsetView.jsx +0 -260
- package/src/Prebuilt/layouts/PinnedTrackView.jsx +0 -59
- package/src/Prebuilt/layouts/SidePane.jsx +0 -52
- package/src/Prebuilt/layouts/mainGridView.jsx +0 -98
- package/src/Prebuilt/layouts/screenShareView.jsx +0 -183
- /package/{src/Prebuilt/components/Header/index.jsx → dist/Prebuilt/components/Header/index.d.ts} +0 -0
- /package/src/Prebuilt/components/{ScreenShare.jsx → ScreenShareToggle.jsx} +0 -0
- /package/src/{assets → Prebuilt/images}/android-perm-1.png +0 -0
- /package/src/{assets → Prebuilt/images}/ios-perm-0.png +0 -0
@@ -1,49 +1,11 @@
|
|
1
|
-
import 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
|
34
|
+
setPDFConfig({ state: true, file: pdfFile });
|
73
35
|
onOpenChange(false);
|
74
|
-
} else if (pdfURL) {
|
75
|
-
isValidPDF(pdfURL);
|
76
36
|
}
|
77
37
|
}}
|
78
|
-
disabled={!pdfFile
|
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,5 +1,4 @@
|
|
1
1
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
2
|
-
import { useMedia } from 'react-use';
|
3
2
|
import {
|
4
3
|
selectLocalPeerID,
|
5
4
|
selectLocalPeerRoleName,
|
@@ -9,9 +8,9 @@ import {
|
|
9
8
|
useHMSStore,
|
10
9
|
useScreenShare,
|
11
10
|
} from '@100mslive/react-sdk';
|
12
|
-
import {
|
13
|
-
import {
|
14
|
-
import {
|
11
|
+
import { SecondaryTiles } from '../components/SecondaryTiles';
|
12
|
+
import { ProminenceLayout } from '../components/VideoLayouts/ProminenceLayout';
|
13
|
+
import { Box } from '../../Layout';
|
15
14
|
import { useSetAppDataByKey } from '../components/AppData/useUISettings';
|
16
15
|
import { APP_DATA } from '../common/constants';
|
17
16
|
|
@@ -26,14 +25,13 @@ export const EmbedView = () => {
|
|
26
25
|
export const EmbebScreenShareView = ({ children }) => {
|
27
26
|
const peers = useHMSStore(selectPeers);
|
28
27
|
|
29
|
-
const mediaQueryLg = cssConfig.media.xl;
|
30
|
-
const showSidebarInBottom = useMedia(mediaQueryLg);
|
31
28
|
const localPeerID = useHMSStore(selectLocalPeerID);
|
32
29
|
const localPeerRole = useHMSStore(selectLocalPeerRoleName);
|
33
30
|
const peerPresenting = useHMSStore(selectPeerScreenSharing);
|
34
31
|
const isPresenterFromMyRole = peerPresenting?.roleName?.toLowerCase() === localPeerRole?.toLowerCase();
|
35
32
|
const amIPresenting = localPeerID === peerPresenting?.id;
|
36
|
-
const showPresenterInSmallTile =
|
33
|
+
const showPresenterInSmallTile = amIPresenting || isPresenterFromMyRole;
|
34
|
+
const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);
|
37
35
|
|
38
36
|
const smallTilePeers = useMemo(() => {
|
39
37
|
const smallTilePeers = peers.filter(peer => peer.id !== peerPresenting?.id);
|
@@ -42,29 +40,18 @@ export const EmbebScreenShareView = ({ children }) => {
|
|
42
40
|
}
|
43
41
|
return smallTilePeers;
|
44
42
|
}, [peers, peerPresenting, showPresenterInSmallTile]);
|
43
|
+
|
44
|
+
useEffect(() => {
|
45
|
+
setActiveScreenSharePeer(peerPresenting?.id);
|
46
|
+
return () => {
|
47
|
+
setActiveScreenSharePeer('');
|
48
|
+
};
|
49
|
+
}, [peerPresenting?.id, setActiveScreenSharePeer]);
|
45
50
|
return (
|
46
|
-
<
|
47
|
-
{children}
|
48
|
-
<
|
49
|
-
|
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>
|
51
|
+
<ProminenceLayout.Root>
|
52
|
+
<ProminenceLayout.ProminentSection>{children}</ProminenceLayout.ProminentSection>
|
53
|
+
<SecondaryTiles peers={smallTilePeers} />
|
54
|
+
</ProminenceLayout.Root>
|
68
55
|
);
|
69
56
|
};
|
70
57
|
|
@@ -117,17 +104,7 @@ const EmbedComponent = () => {
|
|
117
104
|
}, [wasScreenShared, amIScreenSharing, resetEmbedConfig, toggleScreenShare]);
|
118
105
|
|
119
106
|
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
|
-
>
|
107
|
+
<Box ref={iframeRef} css={{ size: '100%' }}>
|
131
108
|
<iframe
|
132
109
|
src={src}
|
133
110
|
title={src}
|
@@ -3,7 +3,7 @@ import { useFullscreen, 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 { 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';
|
@@ -188,6 +188,7 @@ const HLSView = () => {
|
|
188
188
|
width: '100%',
|
189
189
|
margin: '0 auto',
|
190
190
|
height: '100%',
|
191
|
+
background: 'linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, #000 100%)',
|
191
192
|
}}
|
192
193
|
>
|
193
194
|
<HLSAutoplayBlockedPrompt open={isHlsAutoplayBlocked} unblockAutoPlay={unblockAutoPlay} />
|
@@ -203,83 +204,99 @@ const HLSView = () => {
|
|
203
204
|
</Flex>
|
204
205
|
)}
|
205
206
|
<HMSVideoPlayer.Root ref={videoRef}>
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
onClick={async () => {
|
219
|
-
isPaused ? await hlsPlayer?.play() : hlsPlayer?.pause();
|
207
|
+
<Flex
|
208
|
+
direction="column"
|
209
|
+
justify="flex-end"
|
210
|
+
align="flex-start"
|
211
|
+
css={{
|
212
|
+
background: 'linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, #000 100%)',
|
213
|
+
}}
|
214
|
+
>
|
215
|
+
{hlsPlayer && (
|
216
|
+
<HMSVideoPlayer.Progress
|
217
|
+
onValueChange={currentTime => {
|
218
|
+
hlsPlayer.seekTo(currentTime);
|
220
219
|
}}
|
221
|
-
|
220
|
+
hlsPlayer={hlsPlayer}
|
222
221
|
/>
|
223
|
-
|
224
|
-
<HMSVideoPlayer.Volume hlsPlayer={hlsPlayer} />
|
225
|
-
</HMSVideoPlayer.Controls.Left>
|
222
|
+
)}
|
226
223
|
|
227
|
-
<HMSVideoPlayer.Controls.
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
224
|
+
<HMSVideoPlayer.Controls.Root css={{ p: '$4 $8' }}>
|
225
|
+
<HMSVideoPlayer.Controls.Left>
|
226
|
+
<HMSVideoPlayer.PlayButton
|
227
|
+
onClick={async () => {
|
228
|
+
isPaused ? await hlsPlayer?.play() : hlsPlayer?.pause();
|
229
|
+
}}
|
230
|
+
isPaused={isPaused}
|
231
|
+
/>
|
232
|
+
<HMSVideoPlayer.Duration hlsPlayer={hlsPlayer} />
|
233
|
+
<HMSVideoPlayer.Volume hlsPlayer={hlsPlayer} />
|
234
|
+
<IconButton
|
235
|
+
variant="standard"
|
236
|
+
css={{ px: '$2' }}
|
237
|
+
onClick={async () => {
|
238
|
+
await hlsPlayer.seekToLivePosition();
|
239
|
+
setIsVideoLive(true);
|
240
|
+
}}
|
241
|
+
key="jump-to-live_btn"
|
242
|
+
data-testid="jump-to-live_btn"
|
243
|
+
>
|
244
|
+
<Tooltip title="Go to Live" side="top">
|
245
|
+
<Flex justify="center" gap={2} align="center">
|
246
|
+
<Box
|
247
|
+
css={{
|
248
|
+
height: '$4',
|
249
|
+
width: '$4',
|
250
|
+
background: isVideoLive ? '$alert_error_default' : '$on_primary_medium',
|
251
|
+
r: '$1',
|
252
|
+
}}
|
253
|
+
/>
|
254
|
+
<Text
|
255
|
+
variant={{
|
256
|
+
'@sm': 'xs',
|
257
|
+
}}
|
258
|
+
css={{
|
259
|
+
c: isVideoLive ? '$on_primary_high' : '$on_primary_medium',
|
260
|
+
}}
|
261
|
+
>
|
262
|
+
{isVideoLive ? 'LIVE' : 'GO LIVE'}
|
263
|
+
</Text>
|
264
|
+
</Flex>
|
265
|
+
</Tooltip>
|
266
|
+
</IconButton>
|
267
|
+
</HMSVideoPlayer.Controls.Left>
|
268
|
+
|
269
|
+
<HMSVideoPlayer.Controls.Right>
|
270
|
+
{availableLayers.length > 0 ? (
|
260
271
|
<HLSQualitySelector
|
261
272
|
layers={availableLayers}
|
262
273
|
selection={currentSelectedQuality}
|
263
274
|
onQualityChange={handleQuality}
|
264
275
|
isAuto={isUserSelectedAuto}
|
265
276
|
/>
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
</HMSVideoPlayer.Controls.
|
276
|
-
</
|
277
|
+
) : null}
|
278
|
+
{isFullScreenSupported ? (
|
279
|
+
<FullScreenButton
|
280
|
+
isFullScreen={isFullScreen}
|
281
|
+
onToggle={toggle}
|
282
|
+
icon={isFullScreen ? <ShrinkIcon /> : <ExpandIcon />}
|
283
|
+
/>
|
284
|
+
) : null}
|
285
|
+
</HMSVideoPlayer.Controls.Right>
|
286
|
+
</HMSVideoPlayer.Controls.Root>
|
287
|
+
</Flex>
|
277
288
|
</HMSVideoPlayer.Root>
|
278
289
|
</Flex>
|
279
290
|
) : (
|
280
|
-
<Flex align="center" justify="center" css={{ size: '100%', px: '$10' }}>
|
281
|
-
<
|
282
|
-
|
291
|
+
<Flex align="center" justify="center" direction="column" css={{ size: '100%', px: '$10' }}>
|
292
|
+
<Flex css={{ c: '$on_surface_high', r: '$round', bg: '$surface_default', p: '$2' }}>
|
293
|
+
<RadioIcon height={56} width={56} />
|
294
|
+
</Flex>
|
295
|
+
<Text variant="h5" css={{ c: '$on_surface_high', mt: '$10', mb: 0, textAlign: 'center' }}>
|
296
|
+
Stream yet to start
|
297
|
+
</Text>
|
298
|
+
<Text variant="md" css={{ textAlign: 'center', mt: '$4', c: '$on_surface_medium' }}>
|
299
|
+
Sit back and relax
|
283
300
|
</Text>
|
284
301
|
</Flex>
|
285
302
|
)}
|
@@ -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"
|
@@ -0,0 +1,96 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { useMedia } from 'react-use';
|
3
|
+
import { ConferencingScreen } from '@100mslive/types-prebuilt';
|
4
|
+
import { selectAppData, selectVideoTrackByPeerID, useHMSStore } from '@100mslive/react-sdk';
|
5
|
+
// @ts-ignore: No implicit Any
|
6
|
+
import { Chat } from '../components/Chat/Chat';
|
7
|
+
// @ts-ignore: No implicit Any
|
8
|
+
import { ParticipantList } from '../components/Footer/ParticipantList';
|
9
|
+
// @ts-ignore: No implicit Any
|
10
|
+
import { StreamingLanding } from '../components/Streaming/StreamingLanding';
|
11
|
+
// @ts-ignore: No implicit Any
|
12
|
+
import VideoTile from '../components/VideoTile';
|
13
|
+
import { Box, Flex } from '../../Layout';
|
14
|
+
import { config as cssConfig } from '../../Theme';
|
15
|
+
// @ts-ignore: No implicit Any
|
16
|
+
import { APP_DATA, SIDE_PANE_OPTIONS } from '../common/constants';
|
17
|
+
|
18
|
+
const SidePane = ({ screenType }: { screenType: keyof ConferencingScreen }) => {
|
19
|
+
const isMobile = useMedia(cssConfig.media.md);
|
20
|
+
const sidepane = useHMSStore(selectAppData(APP_DATA.sidePane));
|
21
|
+
const activeScreensharePeerId = useHMSStore(selectAppData(APP_DATA.activeScreensharePeerId));
|
22
|
+
const trackId = useHMSStore(selectVideoTrackByPeerID(activeScreensharePeerId))?.id;
|
23
|
+
let ViewComponent;
|
24
|
+
if (sidepane === SIDE_PANE_OPTIONS.PARTICIPANTS) {
|
25
|
+
ViewComponent = <ParticipantList />;
|
26
|
+
} else if (sidepane === SIDE_PANE_OPTIONS.CHAT) {
|
27
|
+
ViewComponent = <Chat screenType={screenType} />;
|
28
|
+
} else if (sidepane === SIDE_PANE_OPTIONS.STREAMING) {
|
29
|
+
ViewComponent = <StreamingLanding />;
|
30
|
+
}
|
31
|
+
if (!ViewComponent && !trackId) {
|
32
|
+
return null;
|
33
|
+
}
|
34
|
+
|
35
|
+
const mwebStreamingChat = isMobile && sidepane === SIDE_PANE_OPTIONS.CHAT;
|
36
|
+
|
37
|
+
return (
|
38
|
+
<Flex
|
39
|
+
direction="column"
|
40
|
+
justify="center"
|
41
|
+
css={{
|
42
|
+
w: '$100',
|
43
|
+
h: '100%',
|
44
|
+
flexShrink: 0,
|
45
|
+
gap: '$4',
|
46
|
+
'@md': { position: mwebStreamingChat ? 'absolute' : '', zIndex: 12 },
|
47
|
+
}}
|
48
|
+
>
|
49
|
+
{trackId && (
|
50
|
+
<VideoTile
|
51
|
+
peerId={activeScreensharePeerId}
|
52
|
+
trackId={trackId}
|
53
|
+
width="100%"
|
54
|
+
height={225}
|
55
|
+
rootCSS={{ p: 0, alignSelf: 'start', flexShrink: 0 }}
|
56
|
+
objectFit="contain"
|
57
|
+
/>
|
58
|
+
)}
|
59
|
+
{!!ViewComponent && (
|
60
|
+
<Box
|
61
|
+
css={{
|
62
|
+
w: '$100',
|
63
|
+
h: mwebStreamingChat ? '0' : '100%',
|
64
|
+
p: '$10',
|
65
|
+
flex: '1 1 0',
|
66
|
+
minHeight: 0,
|
67
|
+
maxHeight: mwebStreamingChat ? '300px' : 'unset',
|
68
|
+
background: mwebStreamingChat
|
69
|
+
? 'linear-gradient(180deg, rgba(0, 0, 0, 0.00) 35.94%, rgba(0, 0, 0, 0.64) 100%)'
|
70
|
+
: '$surface_dim',
|
71
|
+
r: '$1',
|
72
|
+
position: 'relative',
|
73
|
+
'@lg': {
|
74
|
+
w: '100%',
|
75
|
+
h: '100%',
|
76
|
+
ml: 0,
|
77
|
+
right: 0,
|
78
|
+
position: 'fixed',
|
79
|
+
bottom: 0,
|
80
|
+
borderRadius: 0,
|
81
|
+
zIndex: 10,
|
82
|
+
},
|
83
|
+
'@md': {
|
84
|
+
p: '$6 $8',
|
85
|
+
pb: mwebStreamingChat ? '$20' : '$12',
|
86
|
+
},
|
87
|
+
}}
|
88
|
+
>
|
89
|
+
{ViewComponent}
|
90
|
+
</Box>
|
91
|
+
)}
|
92
|
+
</Flex>
|
93
|
+
);
|
94
|
+
};
|
95
|
+
|
96
|
+
export default SidePane;
|