@100mslive/roomkit-react 0.1.5 → 0.1.6-alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-P57IRMAR.js → HLSView-HNVYG5VE.js} +309 -151
- package/dist/HLSView-HNVYG5VE.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/Chat/ChatFooter.d.ts +7 -0
- package/dist/Prebuilt/components/Connection/ConnectionIndicator.d.ts +6 -0
- package/dist/Prebuilt/components/Connection/TileConnection.d.ts +10 -0
- package/dist/Prebuilt/components/Footer/ChatToggle.d.ts +4 -0
- package/dist/Prebuilt/components/Footer/Footer.d.ts +6 -0
- package/dist/Prebuilt/components/Footer/RoleAccordion.d.ts +14 -0
- package/dist/Prebuilt/components/Footer/RoleOptions.d.ts +6 -0
- package/dist/Prebuilt/components/Header/Header.d.ts +2 -0
- package/dist/Prebuilt/components/Header/StreamActions.d.ts +11 -0
- package/dist/Prebuilt/components/InsetTile.d.ts +2 -0
- package/dist/Prebuilt/components/Leave/DesktopLeaveRoom.d.ts +8 -0
- package/dist/Prebuilt/components/Leave/EndSessionContent.d.ts +9 -0
- package/dist/Prebuilt/components/Leave/LeaveAtoms.d.ts +2196 -0
- package/dist/Prebuilt/components/Leave/LeaveCard.d.ts +11 -0
- package/dist/Prebuilt/components/Leave/LeaveRoom.d.ts +5 -0
- package/dist/Prebuilt/components/Leave/LeaveSessionContent.d.ts +8 -0
- package/dist/Prebuilt/components/Leave/MwebLeaveRoom.d.ts +8 -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/MoreSettings/SplitComponents/MwebOptions.d.ts +6 -0
- package/dist/Prebuilt/components/Pagination.d.ts +6 -0
- package/dist/Prebuilt/components/Preview/PreviewContainer.d.ts +3 -0
- package/dist/Prebuilt/components/Preview/PreviewForm.d.ts +10 -0
- package/dist/Prebuilt/components/Preview/PreviewJoin.d.ts +16 -0
- package/dist/Prebuilt/components/RoleChangeRequestModal.d.ts +2 -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 +6 -0
- package/dist/Prebuilt/components/VideoLayouts/GridLayout.d.ts +12 -0
- package/dist/Prebuilt/components/VideoLayouts/ProminenceLayout.d.ts +15 -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 +9 -0
- package/dist/Prebuilt/components/hooks/useAutoStartStreaming.d.ts +1 -0
- package/dist/Prebuilt/components/hooks/useRedirectToLeave.d.ts +3 -0
- package/dist/Prebuilt/components/hooks/useRoleProminencePeers.d.ts +5 -0
- package/dist/Prebuilt/components/hooks/useTileLayout.d.ts +13 -0
- package/dist/Prebuilt/components/hooks/useVideoTileLayout.d.ts +13 -0
- package/dist/Prebuilt/layouts/SidePane.d.ts +9 -0
- package/dist/Prebuilt/layouts/VideoStreamingSection.d.ts +7 -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-UM2FOUHQ.js} +5 -11
- package/dist/VirtualBackground-UM2FOUHQ.js.map +7 -0
- package/dist/{chunk-P5X32KOD.js → chunk-364HP22I.js} +8 -5
- package/dist/chunk-364HP22I.js.map +7 -0
- package/dist/{chunk-OSM4QEQG.js → chunk-LYSAET4G.js} +3742 -5462
- package/dist/chunk-LYSAET4G.js.map +7 -0
- package/dist/chunk-POE7H4IE.js +898 -0
- package/dist/chunk-POE7H4IE.js.map +7 -0
- package/dist/conference-UWLJHMB2.js +5727 -0
- package/dist/conference-UWLJHMB2.js.map +7 -0
- package/dist/index.cjs.js +9655 -15326
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +2 -2
- package/dist/meta.cjs.json +2513 -3456
- package/dist/meta.esbuild.json +2807 -3838
- package/package.json +8 -7
- package/src/Button/Button.tsx +2 -2
- package/src/Prebuilt/App.tsx +58 -53
- package/src/Prebuilt/{AppContext.jsx → AppContext.tsx} +11 -3
- package/src/Prebuilt/IconButton.jsx +11 -0
- package/src/Prebuilt/Prebuilt.stories.tsx +1 -0
- package/src/Prebuilt/common/{PeersSorter.js → PeersSorter.ts} +16 -11
- package/src/Prebuilt/common/constants.js +4 -114
- package/src/Prebuilt/common/hooks.js +34 -1
- package/src/Prebuilt/common/utils.js +1 -9
- package/src/Prebuilt/components/AppData/AppData.jsx +11 -15
- package/src/Prebuilt/components/AppData/useUISettings.js +6 -10
- package/src/Prebuilt/components/AudioVideoToggle.jsx +10 -2
- package/src/Prebuilt/components/AuthToken.jsx +11 -42
- package/src/Prebuilt/components/Chat/Chat.jsx +75 -27
- package/src/Prebuilt/components/Chat/ChatBody.jsx +95 -36
- package/src/Prebuilt/components/Chat/ChatFooter.tsx +199 -0
- package/src/Prebuilt/components/Chat/ChatParticipantHeader.jsx +84 -0
- package/src/Prebuilt/components/Chat/ChatSelector.jsx +16 -17
- package/src/Prebuilt/components/Chat/ChatSelectorContainer.jsx +81 -0
- package/src/Prebuilt/components/Chat/useEmojiPickerStyles.js +5 -4
- package/src/Prebuilt/components/Connection/{ConnectionIndicator.jsx → ConnectionIndicator.tsx} +12 -4
- package/src/Prebuilt/components/Connection/TileConnection.tsx +71 -0
- package/src/Prebuilt/components/EmojiReaction.jsx +19 -22
- package/src/Prebuilt/components/Footer/{ChatToggle.jsx → ChatToggle.tsx} +13 -9
- package/src/Prebuilt/components/Footer/Footer.tsx +98 -0
- package/src/Prebuilt/components/Footer/ParticipantList.jsx +187 -179
- package/src/Prebuilt/components/Footer/RoleAccordion.tsx +94 -0
- package/src/Prebuilt/components/Footer/RoleOptions.tsx +155 -0
- package/src/Prebuilt/components/FullPageProgress.jsx +3 -3
- package/src/Prebuilt/components/HMSVideo/Controls.jsx +3 -2
- package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx +63 -18
- package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +2 -2
- package/src/Prebuilt/components/HMSVideo/PlayButton.jsx +1 -1
- package/src/Prebuilt/components/HMSVideo/VideoProgress.jsx +5 -6
- 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 → StreamActions.tsx} +54 -67
- package/src/Prebuilt/components/Header/common.jsx +5 -2
- package/src/Prebuilt/components/Header/index.tsx +1 -0
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +23 -4
- package/src/Prebuilt/components/InsetTile.tsx +128 -0
- package/src/Prebuilt/components/{MoreSettings/SplitComponents/DesktopLeaveRoom.jsx → Leave/DesktopLeaveRoom.tsx} +67 -25
- package/src/Prebuilt/components/{EndSessionContent.jsx → Leave/EndSessionContent.tsx} +18 -11
- package/src/Prebuilt/components/Leave/LeaveAtoms.tsx +26 -0
- package/src/Prebuilt/components/Leave/LeaveCard.tsx +36 -0
- package/src/Prebuilt/components/Leave/LeaveRoom.tsx +66 -0
- package/src/Prebuilt/components/{LeaveSessionContent.jsx → Leave/LeaveSessionContent.tsx} +20 -6
- package/src/Prebuilt/components/{MoreSettings/SplitComponents/MwebLeaveRoom.jsx → Leave/MwebLeaveRoom.tsx} +43 -18
- package/src/Prebuilt/components/MetaActions.jsx +15 -23
- package/src/Prebuilt/components/MoreSettings/ActionTile.jsx +5 -0
- package/src/Prebuilt/components/MoreSettings/ChangeNameContent.jsx +16 -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.tsx +216 -0
- package/src/Prebuilt/components/MoreSettings/SplitComponents/{MwebOptions.jsx → MwebOptions.tsx} +107 -45
- package/src/Prebuilt/components/Notifications/HLSFailureModal.jsx +3 -1
- package/src/Prebuilt/components/Notifications/Notifications.jsx +46 -30
- package/src/Prebuilt/components/Notifications/PeerNotifications.jsx +14 -2
- package/src/Prebuilt/components/Notifications/PermissionErrorModal.jsx +10 -4
- package/src/Prebuilt/components/Notifications/ReconnectNotifications.jsx +5 -11
- package/src/Prebuilt/components/PIP/PIPComponent.jsx +7 -16
- package/src/Prebuilt/components/PIP/PIPManager.js +1 -0
- package/src/Prebuilt/components/Pagination.tsx +60 -0
- package/src/Prebuilt/components/Playlist/Playlist.jsx +1 -6
- package/src/Prebuilt/components/PostLeave.jsx +7 -7
- package/src/Prebuilt/components/Preview/{PreviewContainer.jsx → PreviewContainer.tsx} +16 -15
- package/src/Prebuilt/components/Preview/{PreviewForm.jsx → PreviewForm.tsx} +16 -8
- package/src/Prebuilt/components/Preview/{PreviewJoin.jsx → PreviewJoin.tsx} +48 -22
- package/src/Prebuilt/components/RaiseHand.jsx +0 -7
- package/src/Prebuilt/components/RoleChangeRequestModal.tsx +119 -0
- package/src/Prebuilt/components/ScreenshareDisplay.jsx +4 -10
- package/src/Prebuilt/components/ScreenshareTile.jsx +43 -36
- package/src/Prebuilt/components/SecondaryTiles.tsx +36 -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 +16 -17
- package/src/Prebuilt/components/TileMenu/TileMenuContent.jsx +33 -27
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +58 -15
- package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +65 -0
- package/src/Prebuilt/components/VideoLayouts/Grid.tsx +43 -0
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +110 -0
- package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +74 -0
- package/src/Prebuilt/components/VideoLayouts/RoleProminence.tsx +59 -0
- package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +52 -0
- package/src/Prebuilt/components/VideoLayouts/interface.ts +10 -0
- package/src/Prebuilt/components/VideoTile.jsx +116 -74
- package/src/Prebuilt/components/conference.jsx +86 -85
- package/src/Prebuilt/components/hooks/useAutoStartStreaming.tsx +57 -0
- package/src/Prebuilt/components/hooks/useMetadata.jsx +19 -3
- package/src/Prebuilt/components/hooks/useRedirectToLeave.tsx +34 -0
- package/src/Prebuilt/components/hooks/useRoleProminencePeers.tsx +38 -0
- package/src/Prebuilt/components/hooks/useTileLayout.tsx +127 -0
- package/src/Prebuilt/components/hooks/useVideoTileLayout.ts +26 -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 -50
- package/src/Prebuilt/layouts/HLSView.jsx +138 -51
- package/src/Prebuilt/layouts/PDFView.jsx +1 -11
- package/src/Prebuilt/layouts/SidePane.tsx +108 -0
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +96 -0
- package/src/Prebuilt/layouts/WhiteboardView.jsx +10 -34
- package/src/Prebuilt/plugins/FlyingEmoji.jsx +14 -2
- 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/src/Prebuilt/services/FeatureFlags.jsx +0 -1
- package/src/VideoTile/StyledVideoTile.tsx +1 -0
- 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/AudioLevel/BeamSpeakerLabelsLogging.jsx +0 -16
- package/src/Prebuilt/components/Chat/ChatFooter.jsx +0 -150
- package/src/Prebuilt/components/Chat/ChatHeader.jsx +0 -67
- package/src/Prebuilt/components/Connection/TileConnection.jsx +0 -39
- 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/LeaveCard.jsx +0 -19
- package/src/Prebuilt/components/LeaveRoom.jsx +0 -94
- package/src/Prebuilt/components/MoreSettings/MoreSettings.jsx +0 -10
- package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.jsx +0 -219
- package/src/Prebuilt/components/Notifications/MessageNotifications.jsx +0 -25
- package/src/Prebuilt/components/Pagination.jsx +0 -29
- package/src/Prebuilt/components/RoleChangeRequestModal.jsx +0 -26
- package/src/Prebuilt/components/VideoList.jsx +0 -73
- 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/mainView.jsx +0 -141
- 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,16 +0,0 @@
|
|
1
|
-
import { useEffect } from 'react';
|
2
|
-
import { useHMSActions } from '@100mslive/react-sdk';
|
3
|
-
import { useIsHeadless } from '../AppData/useUISettings';
|
4
|
-
import { FeatureFlags } from '../../services/FeatureFlags';
|
5
|
-
|
6
|
-
export function BeamSpeakerLabelsLogging() {
|
7
|
-
const hmsActions = useHMSActions();
|
8
|
-
const isHeadless = useIsHeadless();
|
9
|
-
|
10
|
-
useEffect(() => {
|
11
|
-
if (FeatureFlags.enableBeamSpeakersLogging && isHeadless) {
|
12
|
-
hmsActions.enableBeamSpeakerLabelsLogging();
|
13
|
-
}
|
14
|
-
}, [hmsActions, isHeadless]);
|
15
|
-
return null;
|
16
|
-
}
|
@@ -1,150 +0,0 @@
|
|
1
|
-
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
2
|
-
import data from '@emoji-mart/data';
|
3
|
-
import Picker from '@emoji-mart/react';
|
4
|
-
import { useHMSActions } from '@100mslive/react-sdk';
|
5
|
-
import { EmojiIcon, SendIcon } from '@100mslive/react-icons';
|
6
|
-
import { Box, Flex, IconButton, Popover, styled } from '../../../';
|
7
|
-
import { ToastManager } from '../Toast/ToastManager';
|
8
|
-
import { useChatDraftMessage } from '../AppData/useChatState';
|
9
|
-
import { useEmojiPickerStyles } from './useEmojiPickerStyles';
|
10
|
-
|
11
|
-
const TextArea = styled('textarea', {
|
12
|
-
width: '100%',
|
13
|
-
bg: 'transparent',
|
14
|
-
color: '$on_primary_high',
|
15
|
-
resize: 'none',
|
16
|
-
lineHeight: '1rem',
|
17
|
-
position: 'relative',
|
18
|
-
fontFamily: '$sans',
|
19
|
-
fontSize: '100%',
|
20
|
-
margin: 0,
|
21
|
-
padding: 0,
|
22
|
-
top: '$3',
|
23
|
-
'&:focus': {
|
24
|
-
boxShadow: 'none',
|
25
|
-
outline: 'none',
|
26
|
-
},
|
27
|
-
});
|
28
|
-
|
29
|
-
function EmojiPicker({ onSelect }) {
|
30
|
-
const [showEmoji, setShowEmoji] = useState(false);
|
31
|
-
const ref = useEmojiPickerStyles(showEmoji);
|
32
|
-
return (
|
33
|
-
<Popover.Root open={showEmoji} onOpenChange={setShowEmoji}>
|
34
|
-
<Popover.Trigger asChild css={{ appearance: 'none' }}>
|
35
|
-
<IconButton as="div">
|
36
|
-
<EmojiIcon />
|
37
|
-
</IconButton>
|
38
|
-
</Popover.Trigger>
|
39
|
-
<Popover.Portal>
|
40
|
-
<Popover.Content
|
41
|
-
alignOffset={-40}
|
42
|
-
sideOffset={16}
|
43
|
-
align="end"
|
44
|
-
css={{
|
45
|
-
p: 0,
|
46
|
-
}}
|
47
|
-
>
|
48
|
-
<Box
|
49
|
-
css={{
|
50
|
-
minWidth: 352,
|
51
|
-
minHeight: 435,
|
52
|
-
}}
|
53
|
-
ref={ref}
|
54
|
-
>
|
55
|
-
<Picker onEmojiSelect={onSelect} data={data} previewPosition="none" skinPosition="search" />
|
56
|
-
</Box>
|
57
|
-
</Popover.Content>
|
58
|
-
</Popover.Portal>
|
59
|
-
</Popover.Root>
|
60
|
-
);
|
61
|
-
}
|
62
|
-
|
63
|
-
export const ChatFooter = ({ role, peerId, onSend, children }) => {
|
64
|
-
const hmsActions = useHMSActions();
|
65
|
-
const inputRef = useRef(null);
|
66
|
-
const [draftMessage, setDraftMessage] = useChatDraftMessage();
|
67
|
-
|
68
|
-
const sendMessage = useCallback(async () => {
|
69
|
-
const message = inputRef.current.value;
|
70
|
-
if (!message || !message.trim().length) {
|
71
|
-
return;
|
72
|
-
}
|
73
|
-
try {
|
74
|
-
if (role) {
|
75
|
-
await hmsActions.sendGroupMessage(message, [role]);
|
76
|
-
} else if (peerId) {
|
77
|
-
await hmsActions.sendDirectMessage(message, peerId);
|
78
|
-
} else {
|
79
|
-
await hmsActions.sendBroadcastMessage(message);
|
80
|
-
}
|
81
|
-
inputRef.current.value = '';
|
82
|
-
setTimeout(() => {
|
83
|
-
onSend();
|
84
|
-
}, 0);
|
85
|
-
} catch (error) {
|
86
|
-
ToastManager.addToast({ title: error.message });
|
87
|
-
}
|
88
|
-
}, [role, peerId, hmsActions, onSend]);
|
89
|
-
|
90
|
-
useEffect(() => {
|
91
|
-
const messageElement = inputRef.current;
|
92
|
-
if (messageElement) {
|
93
|
-
messageElement.value = draftMessage;
|
94
|
-
}
|
95
|
-
}, [draftMessage]);
|
96
|
-
|
97
|
-
useEffect(() => {
|
98
|
-
const messageElement = inputRef.current;
|
99
|
-
return () => {
|
100
|
-
setDraftMessage(messageElement?.value || '');
|
101
|
-
};
|
102
|
-
}, [setDraftMessage]);
|
103
|
-
|
104
|
-
return (
|
105
|
-
<Flex
|
106
|
-
align="center"
|
107
|
-
css={{
|
108
|
-
bg: '$surface_bright',
|
109
|
-
minHeight: '$16',
|
110
|
-
maxHeight: '$24',
|
111
|
-
position: 'relative',
|
112
|
-
py: '$6',
|
113
|
-
pl: '$8',
|
114
|
-
r: '$1',
|
115
|
-
}}
|
116
|
-
>
|
117
|
-
{children}
|
118
|
-
<TextArea
|
119
|
-
placeholder="Write something here"
|
120
|
-
ref={inputRef}
|
121
|
-
autoFocus
|
122
|
-
onKeyPress={async event => {
|
123
|
-
if (event.key === 'Enter') {
|
124
|
-
if (!event.shiftKey) {
|
125
|
-
event.preventDefault();
|
126
|
-
await sendMessage();
|
127
|
-
}
|
128
|
-
}
|
129
|
-
}}
|
130
|
-
autoComplete="off"
|
131
|
-
aria-autocomplete="none"
|
132
|
-
onPaste={e => e.stopPropagation()}
|
133
|
-
onCut={e => e.stopPropagation()}
|
134
|
-
onCopy={e => e.stopPropagation()}
|
135
|
-
/>
|
136
|
-
<EmojiPicker
|
137
|
-
onSelect={emoji => {
|
138
|
-
inputRef.current.value += ` ${emoji.native} `;
|
139
|
-
}}
|
140
|
-
/>
|
141
|
-
<IconButton
|
142
|
-
onClick={sendMessage}
|
143
|
-
css={{ ml: 'auto', height: 'max-content', mr: '$4' }}
|
144
|
-
data-testid="send_msg_btn"
|
145
|
-
>
|
146
|
-
<SendIcon />
|
147
|
-
</IconButton>
|
148
|
-
</Flex>
|
149
|
-
);
|
150
|
-
};
|
@@ -1,67 +0,0 @@
|
|
1
|
-
import React, { useState } from 'react';
|
2
|
-
import { ChevronDownIcon, ChevronUpIcon, CrossIcon } from '@100mslive/react-icons';
|
3
|
-
import { Box, Dropdown, Flex, IconButton, Text, textEllipsis } from '../../../';
|
4
|
-
import { ChatSelector } from './ChatSelector';
|
5
|
-
import { useSidepaneToggle } from '../AppData/useSidepane';
|
6
|
-
import { SIDE_PANE_OPTIONS } from '../../common/constants';
|
7
|
-
|
8
|
-
export const ChatHeader = React.memo(({ selection, selectorOpen, onToggle, onSelect, role, peerId }) => {
|
9
|
-
const [open, setOpen] = useState(false);
|
10
|
-
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
11
|
-
return (
|
12
|
-
<Flex
|
13
|
-
onClick={onToggle}
|
14
|
-
align="center"
|
15
|
-
css={{
|
16
|
-
color: '$on_primary_high',
|
17
|
-
h: '$16',
|
18
|
-
mb: '$2',
|
19
|
-
}}
|
20
|
-
>
|
21
|
-
<Text variant="h6">Chat </Text>
|
22
|
-
<Dropdown.Root open={open} onOpenChange={value => setOpen(value)}>
|
23
|
-
<Dropdown.Trigger
|
24
|
-
asChild
|
25
|
-
data-testid="participant_list_filter"
|
26
|
-
css={{
|
27
|
-
border: '1px solid $on_surface_low',
|
28
|
-
r: '$0',
|
29
|
-
p: '$2 $4',
|
30
|
-
ml: '$8',
|
31
|
-
}}
|
32
|
-
tabIndex={0}
|
33
|
-
>
|
34
|
-
<Flex align="center">
|
35
|
-
<Text variant="sm" css={{ ...textEllipsis(80) }}>
|
36
|
-
{selection}
|
37
|
-
</Text>
|
38
|
-
<Box css={{ ml: '$2', color: '$on_surface_low' }}>
|
39
|
-
{open ? <ChevronUpIcon width={14} height={14} /> : <ChevronDownIcon width={14} height={14} />}
|
40
|
-
</Box>
|
41
|
-
</Flex>
|
42
|
-
</Dropdown.Trigger>
|
43
|
-
<Dropdown.Content
|
44
|
-
css={{
|
45
|
-
w: '$64',
|
46
|
-
overflow: 'hidden',
|
47
|
-
maxHeight: 'unset',
|
48
|
-
}}
|
49
|
-
align="start"
|
50
|
-
sideOffset={8}
|
51
|
-
>
|
52
|
-
<ChatSelector onSelect={onSelect} role={role} peerId={peerId} />
|
53
|
-
</Dropdown.Content>
|
54
|
-
</Dropdown.Root>
|
55
|
-
<IconButton
|
56
|
-
css={{ ml: 'auto' }}
|
57
|
-
onClick={e => {
|
58
|
-
e.stopPropagation();
|
59
|
-
selectorOpen ? onToggle() : toggleChat();
|
60
|
-
}}
|
61
|
-
data-testid="close_chat"
|
62
|
-
>
|
63
|
-
<CrossIcon />
|
64
|
-
</IconButton>
|
65
|
-
</Flex>
|
66
|
-
);
|
67
|
-
});
|
@@ -1,39 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { styled, Text, textEllipsis } from '../../../';
|
3
|
-
import { ConnectionIndicator } from './ConnectionIndicator';
|
4
|
-
|
5
|
-
const TileConnection = ({ name, peerId, hideLabel, width }) => {
|
6
|
-
return (
|
7
|
-
<Wrapper>
|
8
|
-
{!hideLabel ? (
|
9
|
-
<Text
|
10
|
-
css={{
|
11
|
-
c: '$on_surface_high',
|
12
|
-
...textEllipsis(width - 60),
|
13
|
-
}}
|
14
|
-
variant="xs"
|
15
|
-
>
|
16
|
-
{name}
|
17
|
-
</Text>
|
18
|
-
) : null}
|
19
|
-
<ConnectionIndicator isTile peerId={peerId} />
|
20
|
-
</Wrapper>
|
21
|
-
);
|
22
|
-
};
|
23
|
-
|
24
|
-
const Wrapper = styled('div', {
|
25
|
-
display: 'flex',
|
26
|
-
alignItems: 'center',
|
27
|
-
justifyContent: 'space-between',
|
28
|
-
position: 'absolute',
|
29
|
-
bottom: '$2',
|
30
|
-
left: '$2',
|
31
|
-
backgroundColor: '$background_dim',
|
32
|
-
borderRadius: '$1',
|
33
|
-
maxWidth: '85%',
|
34
|
-
'& p,span': {
|
35
|
-
p: '$2 $3',
|
36
|
-
},
|
37
|
-
});
|
38
|
-
|
39
|
-
export default TileConnection;
|
@@ -1,180 +0,0 @@
|
|
1
|
-
import React, { useEffect, useMemo, useState } from 'react';
|
2
|
-
import { useMeasure, useMedia } from 'react-use';
|
3
|
-
import {
|
4
|
-
getPeersWithTiles,
|
5
|
-
selectLocalPeer,
|
6
|
-
selectPeers,
|
7
|
-
selectRemotePeers,
|
8
|
-
selectTracksMap,
|
9
|
-
useHMSStore,
|
10
|
-
useHMSVanillaStore,
|
11
|
-
} from '@100mslive/react-sdk';
|
12
|
-
import { Box, Flex } from '../../Layout';
|
13
|
-
import { config as cssConfig } from '../../Theme';
|
14
|
-
import { InsetTile } from '../layouts/InsetView';
|
15
|
-
import { useRoomLayout } from '../provider/roomLayoutProvider';
|
16
|
-
import { Pagination } from './Pagination';
|
17
|
-
import VideoTile from './VideoTile';
|
18
|
-
import { useUISettings } from './AppData/useUISettings';
|
19
|
-
import PeersSorter from '../common/PeersSorter';
|
20
|
-
import { UI_SETTINGS } from '../common/constants';
|
21
|
-
|
22
|
-
const aspectRatioConfig = { default: [1 / 1, 4 / 3, 16 / 9], mobile: [1 / 1, 3 / 4, 9 / 16] };
|
23
|
-
|
24
|
-
export function EqualProminence() {
|
25
|
-
const layout = useRoomLayout();
|
26
|
-
const { enable_local_tile_inset: isInsetEnabled = true } =
|
27
|
-
//@ts-ignore
|
28
|
-
layout?.screens?.conferencing?.default?.elements?.video_tile_layout?.grid || {};
|
29
|
-
const peers = useHMSStore(isInsetEnabled ? selectRemotePeers : selectPeers);
|
30
|
-
const [sortedPeers, setSortedPeers] = useState(peers);
|
31
|
-
const localPeer = useHMSStore(selectLocalPeer);
|
32
|
-
const vanillaStore = useHMSVanillaStore();
|
33
|
-
const isMobile = useMedia(cssConfig.media.md);
|
34
|
-
let maxTileCount = useUISettings(UI_SETTINGS.maxTileCount);
|
35
|
-
maxTileCount = isMobile ? Math.min(maxTileCount, 6) : maxTileCount;
|
36
|
-
const [pagesWithTiles, setPagesWithTiles] = useState([]);
|
37
|
-
const [page, setPage] = useState(0);
|
38
|
-
const [ref, { width, height }] = useMeasure();
|
39
|
-
const peersSorter = useMemo(() => new PeersSorter(vanillaStore), [vanillaStore]);
|
40
|
-
const pageSize = pagesWithTiles[0]?.length;
|
41
|
-
|
42
|
-
useEffect(() => {
|
43
|
-
// currentPageIndex should not exceed pages length
|
44
|
-
if (page >= pagesWithTiles.length) {
|
45
|
-
setPage(0);
|
46
|
-
}
|
47
|
-
}, [pagesWithTiles.length, page]);
|
48
|
-
|
49
|
-
useEffect(() => {
|
50
|
-
if (width === 0 || height === 0) {
|
51
|
-
return;
|
52
|
-
}
|
53
|
-
const tracksMap = vanillaStore.getState(selectTracksMap);
|
54
|
-
const peersWithTiles = getPeersWithTiles(
|
55
|
-
sortedPeers.length === 0 ? [localPeer] : sortedPeers,
|
56
|
-
tracksMap,
|
57
|
-
() => false,
|
58
|
-
);
|
59
|
-
const noOfPages = Math.ceil(peersWithTiles.length / maxTileCount);
|
60
|
-
let remaining = peersWithTiles.length;
|
61
|
-
let sliceStart = 0;
|
62
|
-
let pagesList = [];
|
63
|
-
// split into pages
|
64
|
-
for (let i = 0; i < noOfPages; i++) {
|
65
|
-
const count = Math.min(remaining, maxTileCount);
|
66
|
-
pagesList.push(peersWithTiles.slice(sliceStart, sliceStart + count));
|
67
|
-
remaining = remaining - count;
|
68
|
-
sliceStart += count;
|
69
|
-
}
|
70
|
-
// calculate dimesions for each page
|
71
|
-
for (const page of pagesList) {
|
72
|
-
const noOfTilesInPage = page.length;
|
73
|
-
let maxCols =
|
74
|
-
noOfTilesInPage > 2 && noOfTilesInPage < 9
|
75
|
-
? Math.ceil(noOfTilesInPage / 2)
|
76
|
-
: Math.ceil(Math.sqrt(noOfTilesInPage));
|
77
|
-
if (isMobile) {
|
78
|
-
maxCols = noOfTilesInPage < 4 ? 1 : Math.min(maxCols, 2);
|
79
|
-
}
|
80
|
-
let maxRows = Math.ceil(noOfTilesInPage / maxCols);
|
81
|
-
let index = 0;
|
82
|
-
// convert the current page to a matrix(grid)
|
83
|
-
const matrix = new Array(maxRows).fill(null).map((_, i) => {
|
84
|
-
const numCols = Math.min(maxCols, noOfTilesInPage - i * maxCols);
|
85
|
-
let rowElements = [];
|
86
|
-
for (let j = 0; j < numCols; j++) {
|
87
|
-
if (index < page.length) {
|
88
|
-
rowElements.push(page[index++]);
|
89
|
-
}
|
90
|
-
}
|
91
|
-
return rowElements;
|
92
|
-
});
|
93
|
-
|
94
|
-
const maxHeight = height - (maxRows - 1) * 8;
|
95
|
-
const maxRowHeight = maxHeight / matrix.length;
|
96
|
-
const aspectRatios =
|
97
|
-
isMobile && (noOfTilesInPage === 1 || noOfTilesInPage > 3)
|
98
|
-
? aspectRatioConfig.mobile
|
99
|
-
: aspectRatioConfig.default;
|
100
|
-
// calculate height and width of each tile in a row
|
101
|
-
for (const row of matrix) {
|
102
|
-
let tileWidth = (width - (row.length - 1) * 8) / row.length;
|
103
|
-
let tileHeight = 0;
|
104
|
-
const calcHeights = aspectRatios.map(aR => tileWidth / aR);
|
105
|
-
for (const h of calcHeights) {
|
106
|
-
if (h < maxRowHeight) {
|
107
|
-
if (tileHeight < h) {
|
108
|
-
tileHeight = h;
|
109
|
-
}
|
110
|
-
}
|
111
|
-
}
|
112
|
-
|
113
|
-
// tileHeight is not calculated as it could be exceeding the max possible height
|
114
|
-
// find the max possible width instead
|
115
|
-
if (tileHeight === 0) {
|
116
|
-
tileHeight = maxRowHeight;
|
117
|
-
const calcWidths = aspectRatios.map(aR => tileHeight * aR);
|
118
|
-
tileWidth = 0;
|
119
|
-
for (const w of calcWidths) {
|
120
|
-
if (w < width) {
|
121
|
-
if (tileWidth < w) {
|
122
|
-
tileWidth = w;
|
123
|
-
}
|
124
|
-
}
|
125
|
-
}
|
126
|
-
}
|
127
|
-
for (let i = 0; i < row.length; i++) {
|
128
|
-
row[i].width = tileWidth;
|
129
|
-
row[i].height = tileHeight;
|
130
|
-
}
|
131
|
-
}
|
132
|
-
}
|
133
|
-
setPagesWithTiles(pagesList);
|
134
|
-
}, [width, height, maxTileCount, vanillaStore, sortedPeers, page, isMobile, localPeer]);
|
135
|
-
|
136
|
-
useEffect(() => {
|
137
|
-
if (page !== 0) {
|
138
|
-
return;
|
139
|
-
}
|
140
|
-
peersSorter.setPeersAndTilesPerPage({
|
141
|
-
peers,
|
142
|
-
tilesPerPage: pageSize || maxTileCount,
|
143
|
-
});
|
144
|
-
peersSorter.onUpdate(setSortedPeers);
|
145
|
-
}, [page, peersSorter, peers, pageSize, maxTileCount]);
|
146
|
-
|
147
|
-
return (
|
148
|
-
<Flex direction="column" css={{ flex: '1 1 0', h: '100%', position: 'relative', minWidth: 0 }}>
|
149
|
-
<Box
|
150
|
-
ref={ref}
|
151
|
-
css={{
|
152
|
-
flex: '1 1 0',
|
153
|
-
gap: '$4',
|
154
|
-
display: 'flex',
|
155
|
-
placeContent: 'center',
|
156
|
-
alignItems: 'center',
|
157
|
-
justifyContent: 'center',
|
158
|
-
flexFlow: 'row wrap',
|
159
|
-
minHeight: 0,
|
160
|
-
}}
|
161
|
-
>
|
162
|
-
{pagesWithTiles[page]?.map(tile => {
|
163
|
-
return (
|
164
|
-
<VideoTile
|
165
|
-
key={tile.track?.id || tile.peer?.id}
|
166
|
-
width={tile.width}
|
167
|
-
height={tile.height}
|
168
|
-
peerId={tile.peer?.id}
|
169
|
-
trackId={tile.track?.id}
|
170
|
-
rootCSS={{ padding: 0 }}
|
171
|
-
objectFit="contain"
|
172
|
-
/>
|
173
|
-
);
|
174
|
-
})}
|
175
|
-
</Box>
|
176
|
-
{pagesWithTiles.length > 1 && <Pagination page={page} onPageChange={setPage} numPages={pagesWithTiles.length} />}
|
177
|
-
{isInsetEnabled && sortedPeers.length > 0 && <InsetTile />}
|
178
|
-
</Flex>
|
179
|
-
);
|
180
|
-
}
|
@@ -1,50 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { Box, Flex } from '../../Layout';
|
3
|
-
import { Text } from '../../Text';
|
4
|
-
import PlaceholderBg from '../images/first_person.png';
|
5
|
-
|
6
|
-
export const FirstPersonDisplay = React.memo(() => {
|
7
|
-
return (
|
8
|
-
<Box
|
9
|
-
css={{
|
10
|
-
position: 'relative',
|
11
|
-
overflow: 'hidden',
|
12
|
-
w: '37.5rem',
|
13
|
-
maxWidth: '80%',
|
14
|
-
h: '100%',
|
15
|
-
r: '$3',
|
16
|
-
m: '0 auto',
|
17
|
-
backgroundImage: `url(${PlaceholderBg})`,
|
18
|
-
backgroundSize: 'cover',
|
19
|
-
backgroundRepeat: 'no-repeat',
|
20
|
-
'@md': {
|
21
|
-
w: '100%',
|
22
|
-
maxWidth: 'unset',
|
23
|
-
},
|
24
|
-
}}
|
25
|
-
data-testid="first_person_img"
|
26
|
-
>
|
27
|
-
<Flex
|
28
|
-
align="center"
|
29
|
-
direction="column"
|
30
|
-
css={{
|
31
|
-
position: 'absolute',
|
32
|
-
w: '100%',
|
33
|
-
top: '33.33%',
|
34
|
-
left: 0,
|
35
|
-
textAlign: 'center',
|
36
|
-
}}
|
37
|
-
>
|
38
|
-
<Text color="white" variant="h4" css={{ '@md': { fontSize: '$md' } }}>
|
39
|
-
Welcome!
|
40
|
-
</Text>
|
41
|
-
<Text color="white" variant="h6" css={{ mt: '$4', '@md': { fontSize: '$sm' } }}>
|
42
|
-
You’re the first one here.
|
43
|
-
</Text>
|
44
|
-
<Text color="white" variant="h6" css={{ mt: '$2', '@md': { fontSize: '$sm' } }}>
|
45
|
-
Sit back and relax till the others join.
|
46
|
-
</Text>
|
47
|
-
</Flex>
|
48
|
-
</Box>
|
49
|
-
);
|
50
|
-
});
|
@@ -1,73 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { useMedia } from 'react-use';
|
3
|
-
import { selectLocalPeerRoleName, useHMSStore } from '@100mslive/react-sdk';
|
4
|
-
import { config as cssConfig, Footer as AppFooter } from '../../..';
|
5
|
-
import { AudioVideoToggle } from '../AudioVideoToggle';
|
6
|
-
import { EmojiReaction } from '../EmojiReaction';
|
7
|
-
import { LeaveRoom } from '../LeaveRoom';
|
8
|
-
import { MoreSettings } from '../MoreSettings/MoreSettings';
|
9
|
-
import { RaiseHand } from '../RaiseHand';
|
10
|
-
import { ScreenshareToggle } from '../ScreenShare';
|
11
|
-
import { ChatToggle } from './ChatToggle';
|
12
|
-
import { ParticipantCount } from './ParticipantList';
|
13
|
-
import { useHLSViewerRole } from '../AppData/useUISettings';
|
14
|
-
|
15
|
-
export const Footer = () => {
|
16
|
-
const isMobile = useMedia(cssConfig.media.md);
|
17
|
-
const localPeerRole = useHMSStore(selectLocalPeerRoleName);
|
18
|
-
const hlsViewerRole = useHLSViewerRole();
|
19
|
-
const isHlsViewer = hlsViewerRole === localPeerRole;
|
20
|
-
|
21
|
-
return (
|
22
|
-
<AppFooter.Root
|
23
|
-
css={{
|
24
|
-
flexWrap: 'nowrap',
|
25
|
-
'@md': {
|
26
|
-
justifyContent: 'center',
|
27
|
-
gap: '$10',
|
28
|
-
},
|
29
|
-
}}
|
30
|
-
>
|
31
|
-
<AppFooter.Left
|
32
|
-
css={{
|
33
|
-
'@md': {
|
34
|
-
w: 'unset',
|
35
|
-
p: '0',
|
36
|
-
gap: '$10',
|
37
|
-
},
|
38
|
-
}}
|
39
|
-
>
|
40
|
-
{isMobile ? <LeaveRoom /> : null}
|
41
|
-
<AudioVideoToggle />
|
42
|
-
</AppFooter.Left>
|
43
|
-
<AppFooter.Center
|
44
|
-
css={{
|
45
|
-
'@md': {
|
46
|
-
w: 'unset',
|
47
|
-
gap: '$10',
|
48
|
-
},
|
49
|
-
}}
|
50
|
-
>
|
51
|
-
{isMobile ? (
|
52
|
-
<>
|
53
|
-
{isHlsViewer ? <RaiseHand /> : null}
|
54
|
-
<ChatToggle />
|
55
|
-
<MoreSettings />
|
56
|
-
</>
|
57
|
-
) : (
|
58
|
-
<>
|
59
|
-
<ScreenshareToggle />
|
60
|
-
{isHlsViewer ? <RaiseHand /> : null}
|
61
|
-
<EmojiReaction />
|
62
|
-
<LeaveRoom />
|
63
|
-
</>
|
64
|
-
)}
|
65
|
-
</AppFooter.Center>
|
66
|
-
<AppFooter.Right>
|
67
|
-
<ChatToggle />
|
68
|
-
<ParticipantCount />
|
69
|
-
<MoreSettings />
|
70
|
-
</AppFooter.Right>
|
71
|
-
</AppFooter.Root>
|
72
|
-
);
|
73
|
-
};
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { ConferencingHeader } from './ConferencingHeader';
|
3
|
-
import { StreamingHeader } from './StreamingHeader';
|
4
|
-
import { isStreamingKit } from '../../common/utils';
|
5
|
-
|
6
|
-
export const Header = () => {
|
7
|
-
return isStreamingKit() ? <StreamingHeader /> : <ConferencingHeader />;
|
8
|
-
};
|
@@ -1,54 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { useMedia } from 'react-use';
|
3
|
-
import { config as cssConfig, Flex } from '../../../';
|
4
|
-
import { EmojiReaction } from '../EmojiReaction';
|
5
|
-
import { ParticipantCount } from '../Footer/ParticipantList';
|
6
|
-
import { LeaveRoom } from '../LeaveRoom';
|
7
|
-
import MetaActions from '../MetaActions';
|
8
|
-
import { SpeakerTag } from './HeaderComponents';
|
9
|
-
import { LiveStatus, RecordingStatus, StreamActions } from './StreamActions';
|
10
|
-
|
11
|
-
export const StreamingHeader = () => {
|
12
|
-
const isMobile = useMedia(cssConfig.media.md);
|
13
|
-
return (
|
14
|
-
<Flex justify="between" align="center" css={{ position: 'relative', height: '100%' }}>
|
15
|
-
<Flex
|
16
|
-
align="center"
|
17
|
-
css={{
|
18
|
-
position: 'absolute',
|
19
|
-
left: '$10',
|
20
|
-
}}
|
21
|
-
>
|
22
|
-
{isMobile ? (
|
23
|
-
<Flex align="center" gap={2}>
|
24
|
-
<LeaveRoom />
|
25
|
-
<LiveStatus />
|
26
|
-
<RecordingStatus />
|
27
|
-
</Flex>
|
28
|
-
) : null}
|
29
|
-
<SpeakerTag />
|
30
|
-
</Flex>
|
31
|
-
|
32
|
-
<Flex
|
33
|
-
align="center"
|
34
|
-
css={{
|
35
|
-
position: 'absolute',
|
36
|
-
right: '$10',
|
37
|
-
gap: '$4',
|
38
|
-
}}
|
39
|
-
>
|
40
|
-
{isMobile ? (
|
41
|
-
<>
|
42
|
-
<EmojiReaction />
|
43
|
-
<MetaActions compact />
|
44
|
-
</>
|
45
|
-
) : (
|
46
|
-
<Flex css={{ gap: '$4' }}>
|
47
|
-
<StreamActions />
|
48
|
-
</Flex>
|
49
|
-
)}
|
50
|
-
<ParticipantCount />
|
51
|
-
</Flex>
|
52
|
-
</Flex>
|
53
|
-
);
|
54
|
-
};
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { Box, Flex } from '../../Layout';
|
3
|
-
import { Text } from '../../Text';
|
4
|
-
|
5
|
-
export const LeaveCard = ({ icon, title, subtitle, onClick, bg, titleColor, subtitleColor, css = {} }) => {
|
6
|
-
return (
|
7
|
-
<Flex css={{ p: '$10', flexGrow: 1, gap: '$8', bg, ...css }} onClick={onClick}>
|
8
|
-
<Box css={{ color: titleColor }}>{icon}</Box>
|
9
|
-
<Box css={{ gap: '$2' }}>
|
10
|
-
<Text variant="lg" css={{ color: titleColor }}>
|
11
|
-
{title}
|
12
|
-
</Text>
|
13
|
-
<Text variant="sm" css={{ color: subtitleColor }}>
|
14
|
-
{subtitle}
|
15
|
-
</Text>
|
16
|
-
</Box>
|
17
|
-
</Flex>
|
18
|
-
);
|
19
|
-
};
|