@100mslive/roomkit-react 0.1.4 → 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-CTAJQUU4.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-GGGBJYVY.js → VirtualBackground-AYDHYLIZ.js} +5 -11
- package/dist/VirtualBackground-AYDHYLIZ.js.map +7 -0
- package/dist/{chunk-TJNDX446.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-L2SX7GBO.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-CTAJQUU4.js.map +0 -7
- package/dist/PinnedTrackView-CQKONH4O.js +0 -102
- package/dist/PinnedTrackView-CQKONH4O.js.map +0 -7
- package/dist/VirtualBackground-GGGBJYVY.js.map +0 -7
- package/dist/chunk-I2FJWE74.js +0 -827
- package/dist/chunk-I2FJWE74.js.map +0 -7
- package/dist/chunk-L2SX7GBO.js.map +0 -7
- package/dist/chunk-NOKIGB6Y.js +0 -1100
- package/dist/chunk-NOKIGB6Y.js.map +0 -7
- package/dist/chunk-TJNDX446.js.map +0 -7
- package/dist/conference-OEO7VOJD.js +0 -8995
- package/dist/conference-OEO7VOJD.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,8 +1,7 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { useRef, useState } from 'react';
|
2
2
|
import { useClickAway } from 'react-use';
|
3
3
|
import {
|
4
4
|
selectIsConnectedToRoom,
|
5
|
-
selectIsLocalVideoEnabled,
|
6
5
|
selectPeerCount,
|
7
6
|
selectPermissions,
|
8
7
|
useHMSActions,
|
@@ -13,7 +12,7 @@ import { CrossIcon, DragHandleIcon, EmojiIcon, PeopleIcon, RecordIcon, SettingsI
|
|
13
12
|
import { Box, Loading, Tooltip } from '../../../../';
|
14
13
|
import { Sheet } from '../../../../Sheet';
|
15
14
|
import IconButton from '../../../IconButton';
|
16
|
-
import {
|
15
|
+
import { EmojiReaction } from '../../EmojiReaction';
|
17
16
|
import { StopRecordingInSheet } from '../../Header/StreamActions';
|
18
17
|
import SettingsModal from '../../Settings/SettingsModal';
|
19
18
|
import { ToastManager } from '../../Toast/ToastManager';
|
@@ -25,7 +24,7 @@ import { useDropdownList } from '../../hooks/useDropdownList';
|
|
25
24
|
import { getFormattedCount } from '../../../common/utils';
|
26
25
|
import { SIDE_PANE_OPTIONS } from '../../../common/constants';
|
27
26
|
|
28
|
-
const VirtualBackground = React.lazy(() => import('../../../plugins/VirtualBackground/VirtualBackground'));
|
27
|
+
// const VirtualBackground = React.lazy(() => import('../../../plugins/VirtualBackground/VirtualBackground'));
|
29
28
|
|
30
29
|
const MODALS = {
|
31
30
|
CHANGE_NAME: 'changeName',
|
@@ -39,7 +38,7 @@ const MODALS = {
|
|
39
38
|
EMBED_URL: 'embedUrl',
|
40
39
|
};
|
41
40
|
|
42
|
-
export const MwebOptions = () => {
|
41
|
+
export const MwebOptions = ({ elements }) => {
|
43
42
|
const hmsActions = useHMSActions();
|
44
43
|
const permissions = useHMSStore(selectPermissions);
|
45
44
|
const isConnected = useHMSStore(selectIsConnectedToRoom);
|
@@ -55,9 +54,9 @@ export const MwebOptions = () => {
|
|
55
54
|
const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
56
55
|
const peerCount = useHMSStore(selectPeerCount);
|
57
56
|
const emojiCardRef = useRef(null);
|
58
|
-
const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);
|
57
|
+
// const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);
|
59
58
|
|
60
|
-
useDropdownList({ open: openModals.size > 0, name: 'MoreSettings' });
|
59
|
+
useDropdownList({ open: openModals.size > 0 || openOptionsSheet || openSettingsSheet, name: 'MoreSettings' });
|
61
60
|
|
62
61
|
const updateState = (modalName, value) => {
|
63
62
|
setOpenModals(modals => {
|
@@ -127,21 +126,23 @@ export const MwebOptions = () => {
|
|
127
126
|
<ActionTile.Title>Participants</ActionTile.Title>
|
128
127
|
</ActionTile.Root>
|
129
128
|
|
130
|
-
{isVideoOn ? (
|
129
|
+
{/* {isVideoOn ? (
|
131
130
|
<Suspense fallback="">
|
132
131
|
<VirtualBackground asActionTile onVBClick={() => setOpenOptionsSheet(false)} />
|
133
132
|
</Suspense>
|
134
|
-
) : null}
|
133
|
+
) : null} */}
|
135
134
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
135
|
+
{elements?.emoji_reactions && (
|
136
|
+
<ActionTile.Root
|
137
|
+
onClick={() => {
|
138
|
+
setShowEmojiCard(true);
|
139
|
+
setOpenOptionsSheet(false);
|
140
|
+
}}
|
141
|
+
>
|
142
|
+
<EmojiIcon />
|
143
|
+
<ActionTile.Title>Emoji Reactions</ActionTile.Title>
|
144
|
+
</ActionTile.Root>
|
145
|
+
)}
|
145
146
|
|
146
147
|
<ActionTile.Root
|
147
148
|
onClick={() => {
|
@@ -235,7 +236,7 @@ export const MwebOptions = () => {
|
|
235
236
|
mx: '$4',
|
236
237
|
}}
|
237
238
|
>
|
238
|
-
<
|
239
|
+
<EmojiReaction />
|
239
240
|
</Box>
|
240
241
|
)}
|
241
242
|
{showRecordingOn && (
|
@@ -60,7 +60,9 @@ export function HLSFailureModal() {
|
|
60
60
|
<Button outlined variant="standard" css={{ w: '100%' }} onClick={() => setOpenModal(false)}>
|
61
61
|
Dismiss
|
62
62
|
</Button>
|
63
|
-
<Button css={{ w: '100%' }}
|
63
|
+
<Button css={{ w: '100%' }} onClick={startHLS}>
|
64
|
+
Go Live
|
65
|
+
</Button>
|
64
66
|
</Flex>
|
65
67
|
</Dialog.Content>
|
66
68
|
</Dialog.Portal>
|
@@ -1,28 +1,35 @@
|
|
1
1
|
/* eslint-disable no-case-declarations */
|
2
2
|
import React, { useEffect } from 'react';
|
3
|
-
import {
|
3
|
+
import { useNavigate } from 'react-router-dom';
|
4
|
+
import {
|
5
|
+
HMSNotificationTypes,
|
6
|
+
HMSRoomState,
|
7
|
+
selectRoomState,
|
8
|
+
useHMSNotifications,
|
9
|
+
useHMSStore,
|
10
|
+
} from '@100mslive/react-sdk';
|
4
11
|
import { Button } from '../../../';
|
12
|
+
import { useUpdateRoomLayout } from '../../provider/roomLayoutProvider';
|
5
13
|
import { ToastBatcher } from '../Toast/ToastBatcher';
|
6
14
|
import { ToastManager } from '../Toast/ToastManager';
|
7
15
|
import { AutoplayBlockedModal } from './AutoplayBlockedModal';
|
8
16
|
import { InitErrorModal } from './InitErrorModal';
|
9
|
-
import { MessageNotifications } from './MessageNotifications';
|
10
17
|
import { PeerNotifications } from './PeerNotifications';
|
11
18
|
import { PermissionErrorModal } from './PermissionErrorModal';
|
12
19
|
import { ReconnectNotifications } from './ReconnectNotifications';
|
13
20
|
import { TrackBulkUnmuteModal } from './TrackBulkUnmuteModal';
|
14
21
|
import { TrackNotifications } from './TrackNotifications';
|
15
22
|
import { TrackUnmuteModal } from './TrackUnmuteModal';
|
16
|
-
import {
|
17
|
-
import { useNavigation } from '../hooks/useNavigation';
|
23
|
+
import { useIsHeadless, useSubscribedNotifications } from '../AppData/useUISettings';
|
18
24
|
import { getMetadata } from '../../common/utils';
|
19
25
|
|
20
26
|
export function Notifications() {
|
21
27
|
const notification = useHMSNotifications();
|
22
|
-
const navigate =
|
23
|
-
const HLS_VIEWER_ROLE = useHLSViewerRole();
|
28
|
+
const navigate = useNavigate();
|
24
29
|
const subscribedNotifications = useSubscribedNotifications() || {};
|
25
30
|
const isHeadless = useIsHeadless();
|
31
|
+
const roomState = useHMSStore(selectRoomState);
|
32
|
+
const updateRoomLayoutForRole = useUpdateRoomLayout();
|
26
33
|
|
27
34
|
useEffect(() => {
|
28
35
|
if (!notification) {
|
@@ -30,6 +37,9 @@ export function Notifications() {
|
|
30
37
|
}
|
31
38
|
switch (notification.type) {
|
32
39
|
case HMSNotificationTypes.METADATA_UPDATED:
|
40
|
+
if (roomState !== HMSRoomState.Connected) {
|
41
|
+
return;
|
42
|
+
}
|
33
43
|
// Don't toast message when metadata is updated and raiseHand is false.
|
34
44
|
// Don't toast message in case of local peer.
|
35
45
|
const metadata = getMetadata(notification.data?.metadata);
|
@@ -90,13 +100,11 @@ export function Notifications() {
|
|
90
100
|
});
|
91
101
|
break;
|
92
102
|
case HMSNotificationTypes.ROLE_UPDATED:
|
93
|
-
if (notification.data.roleName === HLS_VIEWER_ROLE) {
|
94
|
-
return;
|
95
|
-
}
|
96
103
|
if (notification.data?.isLocal) {
|
97
104
|
ToastManager.addToast({
|
98
105
|
title: `You are now a ${notification.data.roleName}`,
|
99
106
|
});
|
107
|
+
updateRoomLayoutForRole(notification.data.roleName);
|
100
108
|
}
|
101
109
|
break;
|
102
110
|
case HMSNotificationTypes.CHANGE_TRACK_STATE_REQUEST:
|
@@ -129,7 +137,7 @@ export function Notifications() {
|
|
129
137
|
break;
|
130
138
|
}
|
131
139
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
132
|
-
}, [notification, subscribedNotifications.ERROR, subscribedNotifications.METADATA_UPDATED
|
140
|
+
}, [notification, subscribedNotifications.ERROR, subscribedNotifications.METADATA_UPDATED]);
|
133
141
|
|
134
142
|
return (
|
135
143
|
<>
|
@@ -140,7 +148,6 @@ export function Notifications() {
|
|
140
148
|
<ReconnectNotifications />
|
141
149
|
<AutoplayBlockedModal />
|
142
150
|
<PermissionErrorModal />
|
143
|
-
<MessageNotifications />
|
144
151
|
<InitErrorModal notification={notification} />
|
145
152
|
</>
|
146
153
|
);
|
@@ -1,5 +1,11 @@
|
|
1
1
|
import { useEffect } from 'react';
|
2
|
-
import {
|
2
|
+
import {
|
3
|
+
HMSNotificationTypes,
|
4
|
+
HMSRoomState,
|
5
|
+
selectRoomState,
|
6
|
+
useHMSNotifications,
|
7
|
+
useHMSStore,
|
8
|
+
} from '@100mslive/react-sdk';
|
3
9
|
import { ToastBatcher } from '../Toast/ToastBatcher';
|
4
10
|
import { useSubscribedNotifications } from '../AppData/useUISettings';
|
5
11
|
import { isInternalRole } from '../../common/utils';
|
@@ -15,10 +21,15 @@ export const PeerNotifications = () => {
|
|
15
21
|
const notification = useHMSNotifications(notificationTypes);
|
16
22
|
const isPeerJoinSubscribed = useSubscribedNotifications(SUBSCRIBED_NOTIFICATIONS.PEER_JOINED);
|
17
23
|
const isPeerLeftSubscribed = useSubscribedNotifications(SUBSCRIBED_NOTIFICATIONS.PEER_LEFT);
|
24
|
+
const roomState = useHMSStore(selectRoomState);
|
18
25
|
useEffect(() => {
|
26
|
+
if (roomState !== HMSRoomState.Connected) {
|
27
|
+
return;
|
28
|
+
}
|
19
29
|
if (!notification || (notification?.data?.roleName && isInternalRole(notification.data.roleName))) {
|
20
30
|
return;
|
21
31
|
}
|
32
|
+
|
22
33
|
console.debug(`[${notification.type}]`, notification);
|
23
34
|
switch (notification.type) {
|
24
35
|
case HMSNotificationTypes.PEER_LIST:
|
@@ -39,8 +50,9 @@ export const PeerNotifications = () => {
|
|
39
50
|
default:
|
40
51
|
return;
|
41
52
|
}
|
53
|
+
|
42
54
|
ToastBatcher.showToast({ notification });
|
43
|
-
}, [notification, isPeerJoinSubscribed, isPeerLeftSubscribed]);
|
55
|
+
}, [notification, isPeerJoinSubscribed, isPeerLeftSubscribed, roomState]);
|
44
56
|
|
45
57
|
return null;
|
46
58
|
};
|
@@ -2,8 +2,8 @@ import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { useMedia } from 'react-use';
|
3
3
|
import { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';
|
4
4
|
import { Button, config as cssConfig, Dialog, Flex, Text } from '../../../';
|
5
|
-
import androidPermissionAlert from '
|
6
|
-
import iosPermissions from '
|
5
|
+
import androidPermissionAlert from '../../images/android-perm-1.png';
|
6
|
+
import iosPermissions from '../../images/ios-perm-0.png';
|
7
7
|
import { isAndroid, isIOS } from '../../common/constants';
|
8
8
|
|
9
9
|
export function PermissionErrorModal() {
|
@@ -47,11 +47,17 @@ export function PermissionErrorModal() {
|
|
47
47
|
borderBottom: '1px solid $border_default',
|
48
48
|
}}
|
49
49
|
>
|
50
|
-
{isMobile && isIOS ?
|
50
|
+
{isMobile && isIOS ? (
|
51
|
+
<img style={{ maxWidth: '100%', maxHeight: '100%' }} src={iosPermissions} alt="iOS Permission flow" />
|
52
|
+
) : null}
|
51
53
|
|
52
54
|
{/* Images for android */}
|
53
55
|
{isMobile && isAndroid ? (
|
54
|
-
<img
|
56
|
+
<img
|
57
|
+
src={androidPermissionAlert}
|
58
|
+
style={{ maxWidth: '100%', maxHeight: '100%' }}
|
59
|
+
alt="Android Permission flow "
|
60
|
+
/>
|
55
61
|
) : null}
|
56
62
|
|
57
63
|
<Text variant="h6">We can't access your {deviceType}</Text>
|
@@ -1,31 +1,20 @@
|
|
1
1
|
import React, { useCallback, useEffect, useState } from 'react';
|
2
|
-
import {
|
3
|
-
selectLocalPeerRoleName,
|
4
|
-
selectPeers,
|
5
|
-
selectTracksMap,
|
6
|
-
useHMSActions,
|
7
|
-
useHMSStore,
|
8
|
-
useHMSVanillaStore,
|
9
|
-
} from '@100mslive/react-sdk';
|
2
|
+
import { selectPeers, selectTracksMap, useHMSActions, useHMSStore, useHMSVanillaStore } from '@100mslive/react-sdk';
|
10
3
|
import { PipIcon } from '@100mslive/react-icons';
|
11
4
|
import { Flex, Tooltip } from '../../../';
|
12
5
|
import IconButton from '../../IconButton';
|
13
6
|
import { PictureInPicture } from './PIPManager';
|
14
7
|
import { MediaSession } from './SetupMediaSession';
|
15
8
|
import { usePinnedTrack } from '../AppData/useUISettings';
|
16
|
-
import { useIsFeatureEnabled } from '../hooks/useFeatures';
|
17
|
-
import { DEFAULT_HLS_VIEWER_ROLE, FEATURE_LIST } from '../../common/constants';
|
18
9
|
|
19
10
|
/**
|
20
11
|
* shows a button which when clicked shows some videos in PIP, clicking
|
21
12
|
* again turns it off.
|
22
13
|
*/
|
23
14
|
const PIPComponent = ({ content = null }) => {
|
24
|
-
const localPeerRole = useHMSStore(selectLocalPeerRoleName);
|
25
15
|
const [isPipOn, setIsPipOn] = useState(PictureInPicture.isOn());
|
26
16
|
const hmsActions = useHMSActions();
|
27
17
|
const store = useHMSVanillaStore();
|
28
|
-
const isFeatureEnabled = useIsFeatureEnabled(FEATURE_LIST.PICTURE_IN_PICTURE);
|
29
18
|
|
30
19
|
const onPipToggle = useCallback(() => {
|
31
20
|
if (!isPipOn) {
|
@@ -36,7 +25,7 @@ const PIPComponent = ({ content = null }) => {
|
|
36
25
|
}
|
37
26
|
}, [hmsActions, isPipOn, store]);
|
38
27
|
|
39
|
-
if (!PictureInPicture.isSupported()
|
28
|
+
if (!PictureInPicture.isSupported()) {
|
40
29
|
return null;
|
41
30
|
}
|
42
31
|
return (
|
@@ -66,8 +55,8 @@ export const ActivatedPIP = () => {
|
|
66
55
|
const pinnedTrack = usePinnedTrack();
|
67
56
|
|
68
57
|
useEffect(() => {
|
69
|
-
|
70
|
-
if (!
|
58
|
+
function updatePIP() {
|
59
|
+
if (!PictureInPicture.isOn()) {
|
71
60
|
return;
|
72
61
|
}
|
73
62
|
let pipPeers = storePeers;
|
@@ -77,7 +66,9 @@ export const ActivatedPIP = () => {
|
|
77
66
|
PictureInPicture.updatePeersAndTracks(pipPeers, tracksMap).catch(err => {
|
78
67
|
console.error('error in updating pip', err);
|
79
68
|
});
|
80
|
-
}
|
69
|
+
}
|
70
|
+
PictureInPicture.listenToStateChange(updatePIP);
|
71
|
+
updatePIP();
|
81
72
|
}, [storePeers, tracksMap, pinnedTrack]);
|
82
73
|
|
83
74
|
return <></>;
|
@@ -1,24 +1,53 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { useEffect } from 'react';
|
2
2
|
import { ChevronLeftIcon, ChevronRightIcon } from '@100mslive/react-icons';
|
3
3
|
import { StyledPagination } from '../../Pagination';
|
4
4
|
|
5
|
-
export const Pagination = ({
|
5
|
+
export const Pagination = ({
|
6
|
+
page,
|
7
|
+
onPageChange,
|
8
|
+
numPages,
|
9
|
+
}: {
|
10
|
+
page: number;
|
11
|
+
onPageChange: (page: number) => void;
|
12
|
+
numPages: number;
|
13
|
+
}) => {
|
6
14
|
const disableLeft = page === 0;
|
7
15
|
const disableRight = page === numPages - 1;
|
8
|
-
const nextPage = () => {
|
16
|
+
const nextPage = (e: React.SyntheticEvent) => {
|
17
|
+
e.stopPropagation();
|
9
18
|
onPageChange(Math.min(page + 1, numPages - 1));
|
10
19
|
};
|
11
|
-
const prevPage = () => {
|
20
|
+
const prevPage = (e: React.SyntheticEvent) => {
|
21
|
+
e.stopPropagation();
|
12
22
|
onPageChange(Math.max(page - 1, 0));
|
13
23
|
};
|
24
|
+
|
25
|
+
useEffect(() => {
|
26
|
+
// currentPageIndex should not exceed pages length
|
27
|
+
if (page >= numPages) {
|
28
|
+
onPageChange(Math.max(0, numPages - 1));
|
29
|
+
}
|
30
|
+
}, [numPages, onPageChange, page]);
|
31
|
+
|
32
|
+
if (numPages <= 1) {
|
33
|
+
return null;
|
34
|
+
}
|
35
|
+
|
14
36
|
return (
|
15
|
-
<StyledPagination.Root>
|
37
|
+
<StyledPagination.Root css={{ flexShrink: 0 }}>
|
16
38
|
<StyledPagination.Chevron disabled={disableLeft} onClick={prevPage}>
|
17
39
|
<ChevronLeftIcon width={16} height={16} style={{ cursor: disableLeft ? 'not-allowed' : 'pointer' }} />
|
18
40
|
</StyledPagination.Chevron>
|
19
41
|
<StyledPagination.Dots>
|
20
42
|
{[...Array(numPages)].map((_, i) => (
|
21
|
-
<StyledPagination.Dot
|
43
|
+
<StyledPagination.Dot
|
44
|
+
key={i}
|
45
|
+
active={page === i}
|
46
|
+
onClick={e => {
|
47
|
+
e.stopPropagation();
|
48
|
+
onPageChange(i);
|
49
|
+
}}
|
50
|
+
/>
|
22
51
|
))}
|
23
52
|
</StyledPagination.Dots>
|
24
53
|
<StyledPagination.Chevron disabled={disableRight} onClick={nextPage}>
|
@@ -5,9 +5,7 @@ import { Box, Dropdown, Flex, Text, Tooltip } from '../../../';
|
|
5
5
|
import IconButton from '../../IconButton';
|
6
6
|
import { AudioPlaylistControls } from './PlaylistControls';
|
7
7
|
import { PlaylistItem } from './PlaylistItem';
|
8
|
-
import { useIsFeatureEnabled } from '../hooks/useFeatures';
|
9
8
|
import { usePlaylist } from '../hooks/usePlaylist';
|
10
|
-
import { FEATURE_LIST } from '../../common/constants';
|
11
9
|
|
12
10
|
const BrowseAndPlayFromLocal = ({ type, actions }) => {
|
13
11
|
return (
|
@@ -44,10 +42,7 @@ export const Playlist = ({ type }) => {
|
|
44
42
|
const [open, setOpen] = useState(false);
|
45
43
|
const [collapse, setCollapse] = useState(false);
|
46
44
|
const isAllowedToPublish = useHMSStore(selectIsAllowedToPublish);
|
47
|
-
|
48
|
-
isAudioPlaylist ? FEATURE_LIST.AUDIO_PLAYLIST : FEATURE_LIST.VIDEO_PLAYLIST,
|
49
|
-
);
|
50
|
-
if (!isAllowedToPublish.screen || playlist.length === 0 || !isFeatureEnabled) {
|
45
|
+
if (!isAllowedToPublish.screen || playlist.length === 0) {
|
51
46
|
return null;
|
52
47
|
}
|
53
48
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { useParams } from 'react-router-dom';
|
2
|
+
import { useNavigate, useParams } from 'react-router-dom';
|
3
3
|
import { ExitIcon } from '@100mslive/react-icons';
|
4
4
|
import { ToastManager } from './Toast/ToastManager';
|
5
5
|
import { Button } from '../../Button';
|
@@ -7,14 +7,14 @@ import { Box, Flex } from '../../Layout';
|
|
7
7
|
import { Text } from '../../Text';
|
8
8
|
import { useHMSPrebuiltContext } from '../AppContext';
|
9
9
|
import { Header } from './Header';
|
10
|
-
import {
|
10
|
+
import { useRoomLayoutPreviewScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
11
11
|
import { defaultPreviewPreference, UserPreferencesKeys, useUserPreferences } from './hooks/useUserPreferences';
|
12
|
-
import { getRoutePrefix } from '../common/utils';
|
13
12
|
import { textEllipsis } from '../../utils';
|
14
13
|
|
15
14
|
const PostLeave = () => {
|
16
|
-
const navigate =
|
17
|
-
const {
|
15
|
+
const navigate = useNavigate();
|
16
|
+
const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();
|
17
|
+
const { roomCode } = useHMSPrebuiltContext();
|
18
18
|
const { roomId, role } = useParams();
|
19
19
|
const [previewPreference] = useUserPreferences(UserPreferencesKeys.PREVIEW, defaultPreviewPreference);
|
20
20
|
return (
|
@@ -32,7 +32,7 @@ const PostLeave = () => {
|
|
32
32
|
👋
|
33
33
|
</Text>
|
34
34
|
<Text variant="h4" css={{ color: '$on_surface_high', fontWeight: '$semiBold', mt: '$12' }}>
|
35
|
-
You left the
|
35
|
+
You left the room
|
36
36
|
</Text>
|
37
37
|
<Text
|
38
38
|
variant="body1"
|
@@ -57,7 +57,7 @@ const PostLeave = () => {
|
|
57
57
|
</Text>
|
58
58
|
<Button
|
59
59
|
onClick={() => {
|
60
|
-
let redirectUrl = `${
|
60
|
+
let redirectUrl = `${isPreviewScreenEnabled ? '/preview/' : '/meeting/'}${roomCode || roomId}`;
|
61
61
|
if (role && roomId) redirectUrl += '/' + role;
|
62
62
|
navigate(redirectUrl);
|
63
63
|
ToastManager.clearAllToast();
|
@@ -1,20 +1,19 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { useParams } from 'react-router-dom';
|
2
|
+
import { useNavigate, useParams } from 'react-router-dom';
|
3
3
|
import { useSearchParam } from 'react-use';
|
4
4
|
import { Flex } from '../../../';
|
5
5
|
import { useHMSPrebuiltContext } from '../../AppContext';
|
6
|
-
import SidePane from '../../layouts/SidePane';
|
7
6
|
import { useRoomLayout } from '../../provider/roomLayoutProvider';
|
8
7
|
import FullPageProgress from '../FullPageProgress';
|
9
8
|
import PreviewJoin from './PreviewJoin';
|
9
|
+
import { useRoomLayoutPreviewScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
10
10
|
import { useAuthToken } from '../AppData/useUISettings';
|
11
|
-
import { useNavigation } from '../hooks/useNavigation';
|
12
|
-
import { useSkipPreview } from '../hooks/useSkipPreview';
|
13
11
|
import { QUERY_PARAM_PREVIEW_AS_ROLE } from '../../common/constants';
|
14
12
|
|
15
13
|
const PreviewContainer = () => {
|
16
|
-
const navigate =
|
17
|
-
const
|
14
|
+
const navigate = useNavigate();
|
15
|
+
const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();
|
16
|
+
const skipPreview = !isPreviewScreenEnabled;
|
18
17
|
const previewAsRole = useSearchParam(QUERY_PARAM_PREVIEW_AS_ROLE);
|
19
18
|
const { userName } = useHMSPrebuiltContext();
|
20
19
|
const initialName = userName || (skipPreview ? 'Beam' : '');
|
@@ -42,13 +41,6 @@ const PreviewContainer = () => {
|
|
42
41
|
) : (
|
43
42
|
<FullPageProgress />
|
44
43
|
)}
|
45
|
-
<SidePane
|
46
|
-
css={{
|
47
|
-
position: 'unset',
|
48
|
-
mr: '$10',
|
49
|
-
'@lg': { position: 'fixed', mr: '$0' },
|
50
|
-
}}
|
51
|
-
/>
|
52
44
|
</Flex>
|
53
45
|
</Flex>
|
54
46
|
);
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { useMedia } from 'react-use';
|
3
|
+
import { JoinForm_JoinBtnType } from '@100mslive/types-prebuilt/elements/join_form';
|
3
4
|
import { selectPermissions, useHMSStore, useRecordingStreaming } from '@100mslive/react-sdk';
|
4
5
|
import { RadioIcon } from '@100mslive/react-icons';
|
5
6
|
import { Button, config as cssConfig, Flex, Input, styled } from '../../..';
|
6
7
|
import { useRoomLayout } from '../../provider/roomLayoutProvider';
|
8
|
+
// @ts-ignore: No implicit Any
|
7
9
|
import { PreviewSettings } from './PreviewJoin';
|
8
|
-
import { useShowStreamingUI } from '../../common/hooks';
|
9
10
|
|
10
11
|
const PreviewForm = ({
|
11
12
|
name,
|
@@ -14,8 +15,15 @@ const PreviewForm = ({
|
|
14
15
|
enableJoin,
|
15
16
|
cannotPublishVideo = false,
|
16
17
|
cannotPublishAudio = false,
|
18
|
+
}: {
|
19
|
+
name: string;
|
20
|
+
onChange: (name: string) => void;
|
21
|
+
onJoin: () => void;
|
22
|
+
enableJoin: boolean;
|
23
|
+
cannotPublishVideo: boolean;
|
24
|
+
cannotPublishAudio: boolean;
|
17
25
|
}) => {
|
18
|
-
const formSubmit = e => {
|
26
|
+
const formSubmit = (e: React.SyntheticEvent) => {
|
19
27
|
e.preventDefault();
|
20
28
|
};
|
21
29
|
const mediaQueryLg = cssConfig.media.md;
|
@@ -24,8 +32,10 @@ const PreviewForm = ({
|
|
24
32
|
const permissions = useHMSStore(selectPermissions);
|
25
33
|
const layout = useRoomLayout();
|
26
34
|
const { join_form: joinForm = {} } = layout?.screens?.preview?.default?.elements || {};
|
27
|
-
const
|
28
|
-
|
35
|
+
const showGoLive =
|
36
|
+
joinForm?.join_btn_type === JoinForm_JoinBtnType.JOIN_BTN_TYPE_JOIN_AND_GO_LIVE &&
|
37
|
+
!isHLSRunning &&
|
38
|
+
permissions?.hlsStreaming;
|
29
39
|
|
30
40
|
return (
|
31
41
|
<Form
|
@@ -12,7 +12,7 @@ import {
|
|
12
12
|
useRecordingStreaming,
|
13
13
|
} from '@100mslive/react-sdk';
|
14
14
|
import { MicOffIcon, SettingsIcon } from '@100mslive/react-icons';
|
15
|
-
import { Avatar, Box, Flex, flexCenter, styled, StyledVideoTile, Text,
|
15
|
+
import { Avatar, Box, Flex, flexCenter, styled, StyledVideoTile, Text, Video } from '../../../';
|
16
16
|
import { useHMSPrebuiltContext } from '../../AppContext';
|
17
17
|
import IconButton from '../../IconButton';
|
18
18
|
import { useRoomLayout } from '../../provider/roomLayoutProvider';
|
@@ -22,6 +22,7 @@ import TileConnection from '../Connection/TileConnection';
|
|
22
22
|
import FullPageProgress from '../FullPageProgress';
|
23
23
|
import { Logo } from '../Header/HeaderComponents';
|
24
24
|
import SettingsModal from '../Settings/SettingsModal';
|
25
|
+
import { AudioLevel } from '../VideoTile';
|
25
26
|
import PreviewForm from './PreviewForm';
|
26
27
|
import { useAuthToken, useUISettings } from '../AppData/useUISettings';
|
27
28
|
import { defaultPreviewPreference, UserPreferencesKeys, useUserPreferences } from '../hooks/useUserPreferences';
|
@@ -170,9 +171,8 @@ const Container = styled('div', {
|
|
170
171
|
px: '$10',
|
171
172
|
});
|
172
173
|
|
173
|
-
const PreviewTile = ({ name, error }) => {
|
174
|
+
export const PreviewTile = ({ name, error }) => {
|
174
175
|
const localPeer = useHMSStore(selectLocalPeer);
|
175
|
-
const borderAudioRef = useBorderAudioLevel(localPeer?.audioTrack);
|
176
176
|
const { isLocalAudioEnabled, toggleAudio } = useAVToggle();
|
177
177
|
const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);
|
178
178
|
const mirrorLocalVideo = useUISettings(UI_SETTINGS.mirrorLocalVideo);
|
@@ -189,11 +189,11 @@ const PreviewTile = ({ name, error }) => {
|
|
189
189
|
overflow: 'clip',
|
190
190
|
'@md': {
|
191
191
|
aspectRatio: 9 / 16,
|
192
|
-
width: 'min(
|
192
|
+
width: 'min(220px, 70vw)',
|
193
193
|
maxWidth: '100%',
|
194
|
+
my: '$4',
|
194
195
|
},
|
195
196
|
}}
|
196
|
-
ref={borderAudioRef}
|
197
197
|
>
|
198
198
|
{localPeer ? (
|
199
199
|
<>
|
@@ -216,12 +216,14 @@ const PreviewTile = ({ name, error }) => {
|
|
216
216
|
<StyledVideoTile.AudioIndicator size="medium">
|
217
217
|
<MicOffIcon />
|
218
218
|
</StyledVideoTile.AudioIndicator>
|
219
|
-
) :
|
219
|
+
) : (
|
220
|
+
<AudioLevel trackId={localPeer.audioTrack} />
|
221
|
+
)}
|
220
222
|
</StyledVideoTile.Container>
|
221
223
|
);
|
222
224
|
};
|
223
225
|
|
224
|
-
const PreviewControls = ({ hideSettings }) => {
|
226
|
+
export const PreviewControls = ({ hideSettings }) => {
|
225
227
|
const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);
|
226
228
|
return (
|
227
229
|
<Flex
|
@@ -3,20 +3,13 @@ import { selectLocalPeer, selectPeerMetadata, useHMSStore } from '@100mslive/rea
|
|
3
3
|
import { HandIcon } from '@100mslive/react-icons';
|
4
4
|
import { Tooltip } from '../../Tooltip';
|
5
5
|
import IconButton from '../IconButton';
|
6
|
-
import { useIsFeatureEnabled } from './hooks/useFeatures';
|
7
6
|
import { useMyMetadata } from './hooks/useMetadata';
|
8
|
-
import { FEATURE_LIST } from '../common/constants';
|
9
7
|
|
10
8
|
export const RaiseHand = () => {
|
11
|
-
const isHandRaiseEnabled = useIsFeatureEnabled(FEATURE_LIST.HAND_RAISE);
|
12
9
|
const { toggleHandRaise } = useMyMetadata();
|
13
10
|
const localPeer = useHMSStore(selectLocalPeer);
|
14
11
|
const isHandRaised = useHMSStore(selectPeerMetadata(localPeer.id))?.isHandRaised || false;
|
15
12
|
|
16
|
-
if (!isHandRaiseEnabled) {
|
17
|
-
return null;
|
18
|
-
}
|
19
|
-
|
20
13
|
return (
|
21
14
|
<Tooltip title={isHandRaised ? 'Lower hand' : 'Raise hand'}>
|
22
15
|
<IconButton active={!isHandRaised} onClick={toggleHandRaise}>
|