@100mslive/roomkit-react 0.3.24-alpha.0 → 0.3.24-alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Theme/ThemeProvider.d.ts +1 -0
- package/dist/index.cjs.css +2 -2
- package/dist/index.cjs.css.map +1 -1
- package/dist/index.cjs.js +34109 -37488
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.js +36389 -73
- package/dist/index.js.map +4 -4
- package/dist/meta.cjs.json +5568 -5617
- package/dist/meta.esbuild.json +6032 -8744
- package/package.json +7 -7
- package/src/Prebuilt/App.tsx +3 -6
- package/src/Prebuilt/components/Chat/Chat.tsx +8 -12
- package/src/Prebuilt/components/Footer/WhiteboardToggle.tsx +11 -4
- package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +3 -3
- package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx +3 -0
- package/src/Prebuilt/components/Preview/PreviewJoin.tsx +3 -2
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +30 -43
- package/src/Prebuilt/layouts/HLSView.jsx +2 -3
- package/src/Prebuilt/layouts/SidePane.tsx +6 -12
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +64 -69
- package/src/Theme/ThemeProvider.tsx +9 -3
- package/dist/ConferenceScreen-CLPW3BGP.css +0 -2780
- package/dist/ConferenceScreen-CLPW3BGP.css.map +0 -7
- package/dist/ConferenceScreen-M6RBPTAJ.js +0 -1774
- package/dist/ConferenceScreen-M6RBPTAJ.js.map +0 -7
- package/dist/EmbedView-DDSO7ZCV.js +0 -17
- package/dist/EmbedView-DDSO7ZCV.js.map +0 -7
- package/dist/EmbedView-HGIUZHKA.css +0 -2780
- package/dist/EmbedView-HGIUZHKA.css.map +0 -7
- package/dist/EmojiReaction-23JDKJD4.js +0 -11
- package/dist/EmojiReaction-23JDKJD4.js.map +0 -7
- package/dist/HLSView-OW77EAAO.css +0 -2780
- package/dist/HLSView-OW77EAAO.css.map +0 -7
- package/dist/HLSView-Q6GEB3UM.js +0 -1666
- package/dist/HLSView-Q6GEB3UM.js.map +0 -7
- package/dist/LeaveScreen-BYTE73MT.js +0 -556
- package/dist/LeaveScreen-BYTE73MT.js.map +0 -7
- package/dist/LeaveScreen-P7AATEIF.css +0 -2780
- package/dist/LeaveScreen-P7AATEIF.css.map +0 -7
- package/dist/MoreSettings-LV5X2U6K.css +0 -2780
- package/dist/MoreSettings-LV5X2U6K.css.map +0 -7
- package/dist/MoreSettings-WSHMMNOC.js +0 -16
- package/dist/MoreSettings-WSHMMNOC.js.map +0 -7
- package/dist/PDFView-RIPRIIH6.css +0 -2780
- package/dist/PDFView-RIPRIIH6.css.map +0 -7
- package/dist/PDFView-ZFSG2ESE.js +0 -84
- package/dist/PDFView-ZFSG2ESE.js.map +0 -7
- package/dist/Polls-QWW5LTTB.js +0 -1584
- package/dist/Polls-QWW5LTTB.js.map +0 -7
- package/dist/Polls-ULYGUPPF.css +0 -2780
- package/dist/Polls-ULYGUPPF.css.map +0 -7
- package/dist/RaiseHand-K7NFLH7H.js +0 -10
- package/dist/RaiseHand-K7NFLH7H.js.map +0 -7
- package/dist/RoleProminence-235AFT7F.js +0 -116
- package/dist/RoleProminence-235AFT7F.js.map +0 -7
- package/dist/RoleProminence-6XN3POS5.css +0 -2780
- package/dist/RoleProminence-6XN3POS5.css.map +0 -7
- package/dist/RoomDetailsPane-O5TFMTPI.css +0 -2780
- package/dist/RoomDetailsPane-O5TFMTPI.css.map +0 -7
- package/dist/RoomDetailsPane-RF3D3TDR.js +0 -53
- package/dist/RoomDetailsPane-RF3D3TDR.js.map +0 -7
- package/dist/ScreenshareLayout-KNEB3AJJ.css +0 -2780
- package/dist/ScreenshareLayout-KNEB3AJJ.css.map +0 -7
- package/dist/ScreenshareLayout-PSQMS3NC.js +0 -358
- package/dist/ScreenshareLayout-PSQMS3NC.js.map +0 -7
- package/dist/SidePaneTabs-I6DECE5R.css +0 -2780
- package/dist/SidePaneTabs-I6DECE5R.css.map +0 -7
- package/dist/SidePaneTabs-NXHBI2JB.js +0 -1354
- package/dist/SidePaneTabs-NXHBI2JB.js.map +0 -7
- package/dist/VBPicker-2CQ3IIO7.js +0 -322
- package/dist/VBPicker-2CQ3IIO7.js.map +0 -7
- package/dist/VBPicker-DCNYGO23.css +0 -2780
- package/dist/VBPicker-DCNYGO23.css.map +0 -7
- package/dist/WaitingView-NZIUOXBI.js +0 -10
- package/dist/WaitingView-NZIUOXBI.js.map +0 -7
- package/dist/WhiteboardLayout-4YLFM3EY.js +0 -96
- package/dist/WhiteboardLayout-4YLFM3EY.js.map +0 -7
- package/dist/WhiteboardLayout-JUOBDFKY.css +0 -2780
- package/dist/WhiteboardLayout-JUOBDFKY.css.map +0 -7
- package/dist/chunk-3C7IESSI.js +0 -254
- package/dist/chunk-3C7IESSI.js.map +0 -7
- package/dist/chunk-7FD3VT6Q.js +0 -114
- package/dist/chunk-7FD3VT6Q.js.map +0 -7
- package/dist/chunk-AHI4HCY3.js +0 -62
- package/dist/chunk-AHI4HCY3.js.map +0 -7
- package/dist/chunk-BGSYLCVD.js +0 -6337
- package/dist/chunk-BGSYLCVD.js.map +0 -7
- package/dist/chunk-DANANDDE.js +0 -418
- package/dist/chunk-DANANDDE.js.map +0 -7
- package/dist/chunk-ETRNLEWQ.js +0 -2658
- package/dist/chunk-ETRNLEWQ.js.map +0 -7
- package/dist/chunk-EWPHJFZJ.js +0 -487
- package/dist/chunk-EWPHJFZJ.js.map +0 -7
- package/dist/chunk-F63YJBI4.js +0 -98
- package/dist/chunk-F63YJBI4.js.map +0 -7
- package/dist/chunk-GLAJUP3O.js +0 -576
- package/dist/chunk-GLAJUP3O.js.map +0 -7
- package/dist/chunk-GOXRTCTY.js +0 -90
- package/dist/chunk-GOXRTCTY.js.map +0 -7
- package/dist/chunk-HMCBZI3A.js +0 -59
- package/dist/chunk-HMCBZI3A.js.map +0 -7
- package/dist/chunk-HVYTC3PX.js +0 -171
- package/dist/chunk-HVYTC3PX.js.map +0 -7
- package/dist/chunk-LJVP6AWF.js +0 -262
- package/dist/chunk-LJVP6AWF.js.map +0 -7
- package/dist/chunk-LXJGCRKM.js +0 -30
- package/dist/chunk-LXJGCRKM.js.map +0 -7
- package/dist/chunk-MG3UGW66.js +0 -16800
- package/dist/chunk-MG3UGW66.js.map +0 -7
- package/dist/chunk-MUKUP7JU.js +0 -161
- package/dist/chunk-MUKUP7JU.js.map +0 -7
- package/dist/chunk-OV6MVDCL.js +0 -41
- package/dist/chunk-OV6MVDCL.js.map +0 -7
- package/dist/chunk-P6NV2XO4.js +0 -178
- package/dist/chunk-P6NV2XO4.js.map +0 -7
- package/dist/chunk-REL3HBSD.js +0 -71
- package/dist/chunk-REL3HBSD.js.map +0 -7
- package/dist/chunk-U4SQBXPZ.js +0 -830
- package/dist/chunk-U4SQBXPZ.js.map +0 -7
- package/dist/chunk-YEL5ZTFU.js +0 -136
- package/dist/chunk-YEL5ZTFU.js.map +0 -7
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"prebuilt",
|
11
11
|
"roomkit"
|
12
12
|
],
|
13
|
-
"version": "0.3.24-alpha.
|
13
|
+
"version": "0.3.24-alpha.2",
|
14
14
|
"author": "100ms",
|
15
15
|
"license": "MIT",
|
16
16
|
"repository": {
|
@@ -75,12 +75,12 @@
|
|
75
75
|
"react": ">=17.0.2 <19.0.0"
|
76
76
|
},
|
77
77
|
"dependencies": {
|
78
|
-
"@100mslive/hls-player": "0.3.24-alpha.
|
78
|
+
"@100mslive/hls-player": "0.3.24-alpha.2",
|
79
79
|
"@100mslive/hms-noise-cancellation": "0.0.1",
|
80
|
-
"@100mslive/hms-virtual-background": "1.13.24-alpha.
|
81
|
-
"@100mslive/hms-whiteboard": "0.0.14-alpha.
|
82
|
-
"@100mslive/react-icons": "0.10.24-alpha.
|
83
|
-
"@100mslive/react-sdk": "0.10.24-alpha.
|
80
|
+
"@100mslive/hms-virtual-background": "1.13.24-alpha.2",
|
81
|
+
"@100mslive/hms-whiteboard": "0.0.14-alpha.2",
|
82
|
+
"@100mslive/react-icons": "0.10.24-alpha.2",
|
83
|
+
"@100mslive/react-sdk": "0.10.24-alpha.2",
|
84
84
|
"@100mslive/types-prebuilt": "0.12.12",
|
85
85
|
"@emoji-mart/data": "^1.0.6",
|
86
86
|
"@emoji-mart/react": "^1.0.1",
|
@@ -117,5 +117,5 @@
|
|
117
117
|
"uuid": "^8.3.2",
|
118
118
|
"worker-timers": "^7.0.40"
|
119
119
|
},
|
120
|
-
"gitHead": "
|
120
|
+
"gitHead": "e4156f3df2ca373cfc388e1dcad98d242b026367"
|
121
121
|
}
|
package/src/Prebuilt/App.tsx
CHANGED
@@ -13,12 +13,14 @@ import {
|
|
13
13
|
import { AppData } from './components/AppData/AppData';
|
14
14
|
// @ts-ignore: No implicit Any
|
15
15
|
import AuthToken from './components/AuthToken';
|
16
|
+
import { ConferenceScreen } from './components/ConferenceScreen';
|
16
17
|
// @ts-ignore: No implicit Any
|
17
18
|
import { ErrorBoundary } from './components/ErrorBoundary';
|
18
19
|
// @ts-ignore: No implicit Any
|
19
20
|
import { Init } from './components/init/Init';
|
20
21
|
// @ts-ignore: No implicit Any
|
21
22
|
import { KeyboardHandler } from './components/Input/KeyboardInputManager';
|
23
|
+
import { LeaveScreen } from './components/LeaveScreen';
|
22
24
|
import { MwebLandscapePrompt } from './components/MwebLandscapePrompt';
|
23
25
|
import { Notifications } from './components/Notifications';
|
24
26
|
import { PIPProvider } from './components/PIP/PIPProvider';
|
@@ -48,12 +50,6 @@ import {
|
|
48
50
|
import { FeatureFlags } from './services/FeatureFlags';
|
49
51
|
// @ts-ignore: No implicit Any
|
50
52
|
import { DEFAULT_PORTAL_CONTAINER } from './common/constants';
|
51
|
-
const LeaveScreen = React.lazy(() =>
|
52
|
-
import('./components/LeaveScreen').then(module => ({ default: module.LeaveScreen })),
|
53
|
-
);
|
54
|
-
const ConferenceScreen = React.lazy(() =>
|
55
|
-
import('./components/ConferenceScreen').then(module => ({ default: module.ConferenceScreen })),
|
56
|
-
);
|
57
53
|
|
58
54
|
export type HMSPrebuiltOptions = {
|
59
55
|
userName?: string;
|
@@ -225,6 +221,7 @@ export const HMSPrebuilt = React.forwardRef<HMSPrebuiltRefType, HMSPrebuiltProps
|
|
225
221
|
sans: fontFamily,
|
226
222
|
},
|
227
223
|
}}
|
224
|
+
container={containerSelector}
|
228
225
|
>
|
229
226
|
<PIPProvider>
|
230
227
|
<Init />
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { MutableRefObject,
|
1
|
+
import React, { MutableRefObject, useCallback, useRef } from 'react';
|
2
2
|
import { useMedia } from 'react-use';
|
3
3
|
import { VariableSizeList } from 'react-window';
|
4
4
|
import { selectSessionStore, selectUnreadHMSMessagesCount } from '@100mslive/hms-video-store';
|
@@ -8,6 +8,10 @@ import { ChevronDownIcon } from '@100mslive/react-icons';
|
|
8
8
|
import { Button } from '../../../Button';
|
9
9
|
import { Box, Flex } from '../../../Layout';
|
10
10
|
import { config as cssConfig } from '../../../Theme';
|
11
|
+
// @ts-ignore: No implicit Any
|
12
|
+
import { EmojiReaction } from '../EmojiReaction';
|
13
|
+
import { MoreSettings } from '../MoreSettings/MoreSettings';
|
14
|
+
import { RaiseHand } from '../RaiseHand';
|
11
15
|
import { ChatBody } from './ChatBody';
|
12
16
|
import { ChatFooter } from './ChatFooter';
|
13
17
|
import { ChatBlocked, ChatPaused } from './ChatStates';
|
@@ -17,12 +21,6 @@ import { useSidepaneResetOnLayoutUpdate } from '../AppData/useSidepaneResetOnLay
|
|
17
21
|
import { useIsPeerBlacklisted } from '../hooks/useChatBlacklist';
|
18
22
|
import { useLandscapeHLSStream, useMobileHLSStream } from '../../common/hooks';
|
19
23
|
import { SESSION_STORE_KEY, SIDE_PANE_OPTIONS } from '../../common/constants';
|
20
|
-
const MoreSettings = React.lazy(() =>
|
21
|
-
import('../MoreSettings/MoreSettings').then(module => ({ default: module.MoreSettings })),
|
22
|
-
);
|
23
|
-
const RaiseHand = React.lazy(() => import('../RaiseHand').then(module => ({ default: module.RaiseHand })));
|
24
|
-
// @ts-ignore: No implicit any
|
25
|
-
const EmojiReaction = React.lazy(() => import('../EmojiReaction').then(module => ({ default: module.EmojiReaction })));
|
26
24
|
|
27
25
|
export const Chat = () => {
|
28
26
|
const { elements, screenType } = useRoomLayoutConferencingScreen();
|
@@ -67,10 +65,10 @@ export const Chat = () => {
|
|
67
65
|
<ChatPaused />
|
68
66
|
<ChatBlocked />
|
69
67
|
{streaming && (!isChatEnabled || isLocalPeerBlacklisted) && (
|
70
|
-
|
68
|
+
<>
|
71
69
|
<RaiseHand css={{ bg: '$surface_default' }} />
|
72
70
|
<MoreSettings elements={elements} screenType={screenType} />
|
73
|
-
|
71
|
+
</>
|
74
72
|
)}
|
75
73
|
</Flex>
|
76
74
|
{isMobile && elements?.chat?.is_overlay && !streaming ? <PinnedMessage /> : null}
|
@@ -131,9 +129,7 @@ export const Chat = () => {
|
|
131
129
|
.otherwise(() => ({})),
|
132
130
|
}}
|
133
131
|
>
|
134
|
-
<
|
135
|
-
<EmojiReaction />
|
136
|
-
</Suspense>
|
132
|
+
<EmojiReaction />
|
137
133
|
</Box>
|
138
134
|
)}
|
139
135
|
</Flex>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { useState } from 'react';
|
2
2
|
import { selectPeerScreenSharing, useHMSStore, useWhiteboard } from '@100mslive/react-sdk';
|
3
3
|
import { PencilDrawIcon } from '@100mslive/react-icons';
|
4
4
|
import { Tooltip } from '../../..';
|
@@ -11,6 +11,7 @@ export const WhiteboardToggle = () => {
|
|
11
11
|
const { toggle, open, isOwner } = useWhiteboard();
|
12
12
|
const peerSharing = useHMSStore(selectPeerScreenSharing);
|
13
13
|
const disabled = !!peerSharing || (open && !isOwner);
|
14
|
+
const [isLoading, setLoading] = useState(false);
|
14
15
|
|
15
16
|
if (!toggle) {
|
16
17
|
return null;
|
@@ -25,17 +26,23 @@ export const WhiteboardToggle = () => {
|
|
25
26
|
>
|
26
27
|
<IconButton
|
27
28
|
onClick={async () => {
|
28
|
-
if (disabled) {
|
29
|
+
if (disabled || isLoading) {
|
29
30
|
return;
|
30
31
|
}
|
31
32
|
try {
|
32
|
-
|
33
|
+
if (!open) {
|
34
|
+
setLoading(true);
|
35
|
+
await toggle();
|
36
|
+
setTimeout(() => setLoading(false), 500);
|
37
|
+
} else {
|
38
|
+
await toggle();
|
39
|
+
}
|
33
40
|
} catch (error) {
|
34
41
|
ToastManager.addToast({ title: (error as Error).message, variant: 'error' });
|
35
42
|
}
|
36
43
|
}}
|
37
44
|
active={!open}
|
38
|
-
disabled={disabled}
|
45
|
+
disabled={disabled || isLoading}
|
39
46
|
data-testid="whiteboard_btn"
|
40
47
|
>
|
41
48
|
<PencilDrawIcon />
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { forwardRef, useEffect, useState } from 'react';
|
2
2
|
import { Flex } from '../../../Layout';
|
3
3
|
|
4
|
-
export const HMSVideo = forwardRef(({ children, ...props }, videoRef) => {
|
4
|
+
export const HMSVideo = forwardRef(({ children, isFullScreen, ...props }, videoRef) => {
|
5
5
|
const [width, setWidth] = useState('auto');
|
6
6
|
|
7
7
|
useEffect(() => {
|
@@ -22,7 +22,7 @@ export const HMSVideo = forwardRef(({ children, ...props }, videoRef) => {
|
|
22
22
|
return () => {
|
23
23
|
videoEl.removeEventListener('loadedmetadata', updatingVideoWidth);
|
24
24
|
};
|
25
|
-
}, []);
|
25
|
+
}, [videoRef, width]);
|
26
26
|
return (
|
27
27
|
<Flex
|
28
28
|
data-testid="hms-video"
|
@@ -33,7 +33,7 @@ export const HMSVideo = forwardRef(({ children, ...props }, videoRef) => {
|
|
33
33
|
transition: 'all 0.3s ease-in-out',
|
34
34
|
'@md': {
|
35
35
|
'& video': {
|
36
|
-
height:
|
36
|
+
height: isFullScreen ? '' : '$60 !important',
|
37
37
|
},
|
38
38
|
},
|
39
39
|
'& video::cue': {
|
@@ -61,7 +61,7 @@ const useLocalTileAspectRatio = () => {
|
|
61
61
|
} else {
|
62
62
|
aspectRatio = isMobile ? 9 / 16 : 16 / 9;
|
63
63
|
}
|
64
|
-
return aspectRatio;
|
64
|
+
return aspectRatio.toString();
|
65
65
|
};
|
66
66
|
|
67
67
|
const PreviewJoin = ({
|
@@ -113,6 +113,7 @@ const PreviewJoin = ({
|
|
113
113
|
const { elements = {} } = useRoomLayoutPreviewScreen();
|
114
114
|
const { preview_header: previewHeader = {}, virtual_background } = elements || {};
|
115
115
|
const aspectRatio = useLocalTileAspectRatio();
|
116
|
+
|
116
117
|
useEffect(() => {
|
117
118
|
if (authToken) {
|
118
119
|
if (skipPreview) {
|
@@ -158,7 +159,7 @@ const PreviewJoin = ({
|
|
158
159
|
</Flex>
|
159
160
|
</Flex>
|
160
161
|
{toggleVideo ? <PreviewTile name={name} error={previewError} /> : null}
|
161
|
-
<Box css={{ w: '100%', maxWidth: `${Math.max(aspectRatio, 1) * 340}px` }}>
|
162
|
+
<Box css={{ w: '100%', maxWidth: `${Math.max(parseFloat(aspectRatio), 1) * 340}px` }}>
|
162
163
|
<PreviewControls hideSettings={!toggleVideo && !toggleAudio} vbEnabled={!!virtual_background} />
|
163
164
|
<PreviewForm
|
164
165
|
name={name}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
2
2
|
import { GridVideoTileLayout } from '@100mslive/types-prebuilt/elements/video_tile_layout';
|
3
3
|
import {
|
4
4
|
selectLocalPeerID,
|
@@ -9,22 +9,15 @@ import {
|
|
9
9
|
useHMSStore,
|
10
10
|
useHMSVanillaStore,
|
11
11
|
} from '@100mslive/react-sdk';
|
12
|
-
import FullPageProgress from '../FullPageProgress';
|
13
12
|
import { EqualProminence } from './EqualProminence';
|
13
|
+
import { RoleProminence } from './RoleProminence';
|
14
|
+
import { ScreenshareLayout } from './ScreenshareLayout';
|
15
|
+
import { WhiteboardLayout } from './WhiteboardLayout';
|
14
16
|
// @ts-ignore: No implicit Any
|
15
17
|
import { usePinnedTrack, useSetAppDataByKey } from '../AppData/useUISettings';
|
16
18
|
import { VideoTileContext } from '../hooks/useVideoTileLayout';
|
17
19
|
import PeersSorter from '../../common/PeersSorter';
|
18
20
|
import { APP_DATA } from '../../common/constants';
|
19
|
-
const RoleProminence = React.lazy(() =>
|
20
|
-
import('./RoleProminence').then(module => ({ default: module.RoleProminence })),
|
21
|
-
);
|
22
|
-
const ScreenshareLayout = React.lazy(() =>
|
23
|
-
import('./ScreenshareLayout').then(module => ({ default: module.ScreenshareLayout })),
|
24
|
-
);
|
25
|
-
const WhiteboardLayout = React.lazy(() =>
|
26
|
-
import('./WhiteboardLayout').then(module => ({ default: module.WhiteboardLayout })),
|
27
|
-
);
|
28
21
|
|
29
22
|
export type TileCustomisationProps = {
|
30
23
|
hide_participant_name_on_tile: boolean;
|
@@ -114,44 +107,38 @@ export const GridLayout = ({
|
|
114
107
|
|
115
108
|
if (peerSharing) {
|
116
109
|
return (
|
117
|
-
<
|
118
|
-
<
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
</VideoTileContext.Provider>
|
126
|
-
</Suspense>
|
110
|
+
<VideoTileContext.Provider value={tileLayout}>
|
111
|
+
<ScreenshareLayout
|
112
|
+
peers={sortedPeers}
|
113
|
+
onPageSize={setPageSize}
|
114
|
+
onPageChange={setMainPage}
|
115
|
+
edgeToEdge={edge_to_edge}
|
116
|
+
/>
|
117
|
+
</VideoTileContext.Provider>
|
127
118
|
);
|
128
119
|
} else if (whiteboard?.open) {
|
129
120
|
return (
|
130
|
-
<
|
131
|
-
<
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
</VideoTileContext.Provider>
|
139
|
-
</Suspense>
|
121
|
+
<VideoTileContext.Provider value={tileLayout}>
|
122
|
+
<WhiteboardLayout
|
123
|
+
peers={sortedPeers}
|
124
|
+
onPageSize={setPageSize}
|
125
|
+
onPageChange={setMainPage}
|
126
|
+
edgeToEdge={edge_to_edge}
|
127
|
+
/>
|
128
|
+
</VideoTileContext.Provider>
|
140
129
|
);
|
141
130
|
} else if (isRoleProminence) {
|
142
131
|
return (
|
143
|
-
<
|
144
|
-
<
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
</VideoTileContext.Provider>
|
154
|
-
</Suspense>
|
132
|
+
<VideoTileContext.Provider value={tileLayout}>
|
133
|
+
<RoleProminence
|
134
|
+
peers={sortedPeers}
|
135
|
+
onPageSize={setPageSize}
|
136
|
+
onPageChange={setMainPage}
|
137
|
+
prominentRoles={prominentRoles}
|
138
|
+
isInsetEnabled={isInsetEnabled}
|
139
|
+
edgeToEdge={edge_to_edge}
|
140
|
+
/>
|
141
|
+
</VideoTileContext.Provider>
|
155
142
|
);
|
156
143
|
}
|
157
144
|
return (
|
@@ -46,7 +46,6 @@ const toastMap = {};
|
|
46
46
|
const ToggleChat = ({ isFullScreen = false }) => {
|
47
47
|
const { elements } = useRoomLayoutConferencingScreen();
|
48
48
|
const sidepane = useHMSStore(selectAppData(APP_DATA.sidePane));
|
49
|
-
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
50
49
|
const showChat = !!elements?.chat;
|
51
50
|
const isMobile = useMedia(config.media.md);
|
52
51
|
const hmsActions = useHMSActions();
|
@@ -57,7 +56,7 @@ const ToggleChat = ({ isFullScreen = false }) => {
|
|
57
56
|
hmsActions.setAppData(APP_DATA.sidePane, '');
|
58
57
|
})
|
59
58
|
.with({ isMobile: true, showChat: true, sidepane: P.when(value => !value) }, () => {
|
60
|
-
|
59
|
+
hmsActions.setAppData(APP_DATA.sidePane, SIDE_PANE_OPTIONS.CHAT);
|
61
60
|
})
|
62
61
|
.with({ showChat: false, isMobile: true, sidepane: SIDE_PANE_OPTIONS.CHAT }, () => {
|
63
62
|
hmsActions.setAppData(APP_DATA.sidePane, '');
|
@@ -65,7 +64,7 @@ const ToggleChat = ({ isFullScreen = false }) => {
|
|
65
64
|
.otherwise(() => {
|
66
65
|
//do nothing
|
67
66
|
});
|
68
|
-
}, [sidepane, isMobile,
|
67
|
+
}, [sidepane, isMobile, showChat, hmsActions, isFullScreen]);
|
69
68
|
return null;
|
70
69
|
};
|
71
70
|
const HLSView = () => {
|
@@ -1,10 +1,14 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { useEffect } from 'react';
|
2
2
|
import { useMedia } from 'react-use';
|
3
3
|
import { match } from 'ts-pattern';
|
4
4
|
import { selectAppData, selectVideoTrackByPeerID, useHMSStore } from '@100mslive/react-sdk';
|
5
|
+
import { Polls } from '../components/Polls/Polls';
|
6
|
+
import { RoomDetailsPane } from '../components/RoomDetails/RoomDetailsPane';
|
5
7
|
import { LayoutMode } from '../components/Settings/LayoutSettings';
|
8
|
+
import { SidePaneTabs } from '../components/SidePaneTabs';
|
6
9
|
import { TileCustomisationProps } from '../components/VideoLayouts/GridLayout';
|
7
10
|
import VideoTile from '../components/VideoTile';
|
11
|
+
import { VBPicker } from '../components/VirtualBackground/VBPicker';
|
8
12
|
import { Flex } from '../../Layout';
|
9
13
|
import { config as cssConfig, styled } from '../../Theme';
|
10
14
|
// @ts-ignore: No implicit Any
|
@@ -18,16 +22,6 @@ import {
|
|
18
22
|
import { useLandscapeHLSStream, useMobileHLSStream } from '../common/hooks';
|
19
23
|
import { translateAcross } from '../../utils';
|
20
24
|
import { APP_DATA, SIDE_PANE_OPTIONS, UI_SETTINGS } from '../common/constants';
|
21
|
-
const SidePaneTabs = React.lazy(() =>
|
22
|
-
import('../components/SidePaneTabs').then(module => ({ default: module.SidePaneTabs })),
|
23
|
-
);
|
24
|
-
const Polls = React.lazy(() => import('../components/Polls/Polls').then(module => ({ default: module.Polls })));
|
25
|
-
const RoomDetailsPane = React.lazy(() =>
|
26
|
-
import('../components/RoomDetails/RoomDetailsPane').then(module => ({ default: module.RoomDetailsPane })),
|
27
|
-
);
|
28
|
-
const VBPicker = React.lazy(() =>
|
29
|
-
import('../components/VirtualBackground/VBPicker').then(module => ({ default: module.VBPicker })),
|
30
|
-
);
|
31
25
|
|
32
26
|
const Wrapper = styled('div', {
|
33
27
|
w: '$100',
|
@@ -239,7 +233,7 @@ const SidePane = ({
|
|
239
233
|
{...tileLayout}
|
240
234
|
/>
|
241
235
|
)}
|
242
|
-
|
236
|
+
{SidepaneComponent}
|
243
237
|
</Flex>
|
244
238
|
);
|
245
239
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { useEffect, useState } from 'react';
|
2
2
|
import { ControlPosition } from 'react-draggable';
|
3
3
|
import { useMedia } from 'react-use';
|
4
4
|
import {
|
@@ -15,24 +15,23 @@ import {
|
|
15
15
|
useHMSStore,
|
16
16
|
} from '@100mslive/react-sdk';
|
17
17
|
import { PeopleAddIcon, ShareScreenIcon } from '@100mslive/react-icons';
|
18
|
-
import FullPageProgress from '../components/FullPageProgress';
|
19
18
|
import { GridLayout } from '../components/VideoLayouts/GridLayout';
|
20
19
|
import { Box, Flex } from '../../Layout';
|
21
20
|
import { config } from '../../Theme';
|
21
|
+
// @ts-ignore: No implicit Any
|
22
|
+
import { EmbedView } from './EmbedView';
|
23
|
+
// @ts-ignore: No implicit Any
|
24
|
+
import HLSView from './HLSView';
|
25
|
+
// @ts-ignore: No implicit Any
|
26
|
+
import { PDFView } from './PDFView';
|
22
27
|
import SidePane from './SidePane';
|
28
|
+
import { WaitingView } from './WaitingView';
|
23
29
|
import { CaptionsViewer } from '../plugins/CaptionsViewer';
|
24
30
|
// @ts-ignore: No implicit Any
|
25
31
|
import { usePDFConfig, useUrlToEmbed } from '../components/AppData/useUISettings';
|
26
32
|
import { useCloseScreenshareWhiteboard } from '../components/hooks/useCloseScreenshareWhiteboard';
|
27
33
|
import { useLandscapeHLSStream, useMobileHLSStream, useWaitingRoomInfo } from '../common/hooks';
|
28
34
|
import { SESSION_STORE_KEY } from '../common/constants';
|
29
|
-
// @ts-ignore: No implicit Any
|
30
|
-
const HLSView = React.lazy(() => import('./HLSView'));
|
31
|
-
// @ts-ignore: No implicit Any
|
32
|
-
const EmbedView = React.lazy(() => import('./EmbedView').then(module => ({ default: module.EmbedView })));
|
33
|
-
// @ts-ignore: No implicit Any
|
34
|
-
const PDFView = React.lazy(() => import('./PDFView').then(module => ({ default: module.PDFView })));
|
35
|
-
const WaitingView = React.lazy(() => import('./WaitingView').then(module => ({ default: module.WaitingView })));
|
36
35
|
|
37
36
|
export const VideoStreamingSection = ({
|
38
37
|
screenType,
|
@@ -89,59 +88,57 @@ export const VideoStreamingSection = ({
|
|
89
88
|
.with({ isMobileHLSStream: true }, () => 'column')
|
90
89
|
.otherwise(() => 'row')}
|
91
90
|
>
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
)
|
91
|
+
{match({
|
92
|
+
screenType,
|
93
|
+
isNotAllowedToPublish,
|
94
|
+
isScreenOnlyPublishParams,
|
95
|
+
hasSubscribedRolePublishing,
|
96
|
+
isSharingScreen,
|
97
|
+
pdfAnnotatorActive,
|
98
|
+
urlToIframe,
|
99
|
+
})
|
100
|
+
.with(
|
101
|
+
{
|
102
|
+
screenType: 'hls_live_streaming',
|
103
|
+
},
|
104
|
+
() => <HLSView />,
|
105
|
+
)
|
106
|
+
.when(
|
107
|
+
({ isNotAllowedToPublish, hasSubscribedRolePublishing }) =>
|
108
|
+
isNotAllowedToPublish && !hasSubscribedRolePublishing,
|
109
|
+
() => (
|
110
|
+
<WaitingView
|
111
|
+
title="Waiting for Host to join"
|
112
|
+
subtitle="Sit back and relax"
|
113
|
+
icon={<PeopleAddIcon width="56px" height="56px" style={{ color: 'white' }} />}
|
114
|
+
/>
|
115
|
+
),
|
116
|
+
)
|
117
|
+
.when(
|
118
|
+
({ isScreenOnlyPublishParams, isSharingScreen, hasSubscribedRolePublishing }) =>
|
119
|
+
isScreenOnlyPublishParams && !isSharingScreen && !hasSubscribedRolePublishing,
|
120
|
+
() => (
|
121
|
+
<WaitingView
|
122
|
+
title="Ready to present"
|
123
|
+
subtitle="Select the Screenshare button to start presenting"
|
124
|
+
icon={<ShareScreenIcon width="56px" height="56px" style={{ color: 'white' }} />}
|
125
|
+
/>
|
126
|
+
),
|
127
|
+
)
|
128
|
+
.when(
|
129
|
+
({ pdfAnnotatorActive }) => !!pdfAnnotatorActive,
|
130
|
+
() => <PDFView />,
|
131
|
+
)
|
132
|
+
.when(
|
133
|
+
({ urlToIframe }) => !!urlToIframe,
|
134
|
+
() => <EmbedView />,
|
135
|
+
)
|
138
136
|
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
</Suspense>
|
137
|
+
.otherwise(() => {
|
138
|
+
// @ts-ignore
|
139
|
+
return <GridLayout {...(elements as DefaultConferencingScreen_Elements)?.video_tile_layout?.grid} />;
|
140
|
+
})}
|
141
|
+
<CaptionsViewer setDefaultPosition={setCaptionPosition} defaultPosition={captionPosition} />
|
145
142
|
<Box
|
146
143
|
css={{
|
147
144
|
flex: match({ isLandscapeHLSStream, isMobileHLSStream })
|
@@ -155,14 +152,12 @@ export const VideoStreamingSection = ({
|
|
155
152
|
overflowY: 'clip',
|
156
153
|
}}
|
157
154
|
>
|
158
|
-
<
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
/>
|
165
|
-
</Suspense>
|
155
|
+
<SidePane
|
156
|
+
screenType={screenType}
|
157
|
+
// @ts-ignore
|
158
|
+
tileProps={(elements as DefaultConferencingScreen_Elements)?.video_tile_layout?.grid}
|
159
|
+
hideControls={hideControls}
|
160
|
+
/>
|
166
161
|
</Box>
|
167
162
|
</Flex>
|
168
163
|
);
|
@@ -30,6 +30,7 @@ export type ThemeProviderProps = {
|
|
30
30
|
themeType?: string;
|
31
31
|
theme?: Theme;
|
32
32
|
aspectRatio?: { width: number; height: number };
|
33
|
+
container?: string;
|
33
34
|
};
|
34
35
|
|
35
36
|
const defaultContext = {
|
@@ -53,6 +54,7 @@ export const HMSThemeProvider: React.FC<React.PropsWithChildren<ThemeProviderPro
|
|
53
54
|
themeType,
|
54
55
|
theme: userTheme,
|
55
56
|
aspectRatio = defaultAspectRatio,
|
57
|
+
container = '',
|
56
58
|
children,
|
57
59
|
}) => {
|
58
60
|
const systemTheme = ThemeTypes.default;
|
@@ -64,13 +66,17 @@ export const HMSThemeProvider: React.FC<React.PropsWithChildren<ThemeProviderPro
|
|
64
66
|
if (!isBrowser) {
|
65
67
|
return updatedTheme;
|
66
68
|
}
|
69
|
+
let element = document.querySelector(container);
|
70
|
+
if (!element) {
|
71
|
+
element = document.documentElement;
|
72
|
+
}
|
67
73
|
if (previousClassName.current) {
|
68
|
-
|
74
|
+
element.classList.remove(previousClassName.current);
|
69
75
|
}
|
70
76
|
previousClassName.current = updatedTheme.className;
|
71
|
-
|
77
|
+
element.classList.add(updatedTheme);
|
72
78
|
return updatedTheme;
|
73
|
-
}, [userTheme, currentTheme, isBrowser]);
|
79
|
+
}, [userTheme, container, currentTheme, isBrowser]);
|
74
80
|
|
75
81
|
const toggleTheme = useCallback((themeToUpdateTo?: ThemeTypes) => {
|
76
82
|
if (themeToUpdateTo) {
|