@100mslive/roomkit-react 0.1.5 → 0.1.6-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-P57IRMAR.js → HLSView-PY2FKWX3.js} +191 -123
- package/dist/HLSView-PY2FKWX3.js.map +7 -0
- package/dist/Prebuilt/App.d.ts +3 -0
- package/dist/Prebuilt/AppContext.d.ts +13 -0
- package/dist/Prebuilt/common/PeersSorter.d.ts +21 -0
- package/dist/Prebuilt/components/Footer/Footer.d.ts +6 -0
- package/dist/Prebuilt/components/Header/Header.d.ts +2 -0
- package/dist/Prebuilt/components/InsetTile.d.ts +2 -0
- package/dist/Prebuilt/components/Leave/DesktopLeaveRoom.d.ts +7 -0
- package/dist/Prebuilt/components/Leave/EndSessionContent.d.ts +8 -0
- package/dist/Prebuilt/components/Leave/LeaveAtoms.d.ts +2196 -0
- package/dist/Prebuilt/components/Leave/LeaveCard.d.ts +12 -0
- package/dist/Prebuilt/components/Leave/LeaveRoom.d.ts +5 -0
- package/dist/Prebuilt/components/Leave/LeaveSessionContent.d.ts +6 -0
- package/dist/Prebuilt/components/Leave/MwebLeaveRoom.d.ts +7 -0
- package/dist/Prebuilt/components/MoreSettings/MoreSettings.d.ts +6 -0
- package/dist/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.d.ts +6 -0
- package/dist/Prebuilt/components/Pagination.d.ts +6 -0
- package/dist/Prebuilt/components/Preview/PreviewForm.d.ts +10 -0
- package/dist/Prebuilt/components/SecondaryTiles.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/EqualProminence.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/Grid.d.ts +5 -0
- package/dist/Prebuilt/components/VideoLayouts/GridLayout.d.ts +10 -0
- package/dist/Prebuilt/components/VideoLayouts/ProminenceLayout.d.ts +12 -0
- package/dist/Prebuilt/components/VideoLayouts/RoleProminence.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/ScreenshareLayout.d.ts +3 -0
- package/dist/Prebuilt/components/VideoLayouts/interface.d.ts +8 -0
- package/dist/Prebuilt/components/hooks/useRoleProminencePeers.d.ts +5 -0
- package/dist/Prebuilt/components/hooks/useTileLayout.d.ts +12 -0
- package/dist/Prebuilt/components/hooks/useVideoTileLayout.d.ts +11 -0
- package/dist/Prebuilt/layouts/SidePane.d.ts +6 -0
- package/dist/Prebuilt/layouts/VideoStreamingSection.d.ts +6 -0
- package/dist/Prebuilt/plugins/whiteboard/ToggleWhiteboard.d.ts +5 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.d.ts +1 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.d.ts +1 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.d.ts +17 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/index.d.ts +6 -1
- package/dist/{VirtualBackground-GGCQJ5JM.js → VirtualBackground-AYDHYLIZ.js} +5 -11
- package/dist/VirtualBackground-AYDHYLIZ.js.map +7 -0
- package/dist/{chunk-P5X32KOD.js → chunk-E2M2ZSOL.js} +8 -5
- package/dist/chunk-E2M2ZSOL.js.map +7 -0
- package/dist/chunk-GQD2AGWW.js +888 -0
- package/dist/chunk-GQD2AGWW.js.map +7 -0
- package/dist/{chunk-OSM4QEQG.js → chunk-RXTHJUMZ.js} +2462 -4738
- package/dist/chunk-RXTHJUMZ.js.map +7 -0
- package/dist/conference-V2XZGTKU.js +5927 -0
- package/dist/conference-V2XZGTKU.js.map +7 -0
- package/dist/index.cjs.js +9414 -15534
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +2 -2
- package/dist/meta.cjs.json +2156 -3347
- package/dist/meta.esbuild.json +2601 -3885
- package/package.json +7 -7
- package/src/Button/Button.tsx +2 -2
- package/src/Prebuilt/App.tsx +49 -33
- package/src/Prebuilt/{AppContext.jsx → AppContext.tsx} +11 -3
- package/src/Prebuilt/IconButton.jsx +1 -0
- package/src/Prebuilt/Prebuilt.stories.tsx +1 -0
- package/src/Prebuilt/common/{PeersSorter.js → PeersSorter.ts} +15 -10
- package/src/Prebuilt/common/constants.js +3 -112
- package/src/Prebuilt/common/hooks.js +34 -1
- package/src/Prebuilt/common/utils.js +0 -8
- package/src/Prebuilt/components/AppData/AppData.jsx +3 -13
- package/src/Prebuilt/components/AppData/useUISettings.js +0 -4
- package/src/Prebuilt/components/AudioVideoToggle.jsx +6 -0
- package/src/Prebuilt/components/AuthToken.jsx +11 -42
- package/src/Prebuilt/components/Chat/Chat.jsx +57 -26
- package/src/Prebuilt/components/Chat/ChatBody.jsx +92 -32
- package/src/Prebuilt/components/Chat/ChatFooter.jsx +72 -48
- package/src/Prebuilt/components/Chat/ChatParticipantHeader.jsx +73 -0
- package/src/Prebuilt/components/Chat/ChatSelector.jsx +16 -17
- package/src/Prebuilt/components/Chat/ChatSelectorContainer.jsx +81 -0
- package/src/Prebuilt/components/Connection/TileConnection.jsx +30 -12
- package/src/Prebuilt/components/EmojiReaction.jsx +18 -17
- package/src/Prebuilt/components/Footer/ChatToggle.jsx +1 -7
- package/src/Prebuilt/components/Footer/Footer.tsx +89 -0
- package/src/Prebuilt/components/Footer/ParticipantList.jsx +213 -173
- package/src/Prebuilt/components/Footer/RoleAccordion.jsx +78 -0
- package/src/Prebuilt/components/HMSVideo/Controls.jsx +2 -2
- package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx +33 -10
- package/src/Prebuilt/components/HMSVideo/PlayButton.jsx +1 -1
- package/src/Prebuilt/components/HMSVideo/VideoTime.jsx +3 -3
- package/src/Prebuilt/components/HMSVideo/VolumeControl.jsx +38 -9
- package/src/Prebuilt/components/Header/{ConferencingHeader.jsx → Header.tsx} +9 -7
- package/src/Prebuilt/components/Header/HeaderComponents.jsx +13 -4
- package/src/Prebuilt/components/Header/StreamActions.jsx +33 -60
- package/src/Prebuilt/components/Header/index.tsx +1 -0
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +17 -3
- package/src/Prebuilt/components/InsetTile.tsx +122 -0
- package/src/Prebuilt/components/{MoreSettings/SplitComponents/DesktopLeaveRoom.jsx → Leave/DesktopLeaveRoom.tsx} +50 -18
- package/src/Prebuilt/components/{EndSessionContent.jsx → Leave/EndSessionContent.tsx} +19 -9
- package/src/Prebuilt/components/Leave/LeaveAtoms.tsx +26 -0
- package/src/Prebuilt/components/{LeaveCard.jsx → Leave/LeaveCard.tsx} +22 -3
- package/src/Prebuilt/components/Leave/LeaveRoom.tsx +63 -0
- package/src/Prebuilt/components/{LeaveSessionContent.jsx → Leave/LeaveSessionContent.tsx} +13 -5
- package/src/Prebuilt/components/{MoreSettings/SplitComponents/MwebLeaveRoom.jsx → Leave/MwebLeaveRoom.tsx} +38 -13
- package/src/Prebuilt/components/MetaActions.jsx +15 -23
- package/src/Prebuilt/components/MoreSettings/ActionTile.jsx +5 -0
- package/src/Prebuilt/components/MoreSettings/ChangeNameContent.jsx +12 -7
- package/src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx +1 -1
- package/src/Prebuilt/components/MoreSettings/FullScreenItem.jsx +1 -4
- package/src/Prebuilt/components/MoreSettings/MoreSettings.tsx +27 -0
- package/src/Prebuilt/components/MoreSettings/SplitComponents/{DesktopOptions.jsx → DesktopOptions.tsx} +86 -75
- package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.jsx +20 -19
- package/src/Prebuilt/components/Notifications/HLSFailureModal.jsx +3 -1
- package/src/Prebuilt/components/Notifications/Notifications.jsx +18 -11
- package/src/Prebuilt/components/Notifications/PeerNotifications.jsx +14 -2
- package/src/Prebuilt/components/Notifications/PermissionErrorModal.jsx +10 -4
- package/src/Prebuilt/components/PIP/PIPComponent.jsx +7 -16
- package/src/Prebuilt/components/PIP/PIPManager.js +1 -0
- package/src/Prebuilt/components/{Pagination.jsx → Pagination.tsx} +35 -6
- package/src/Prebuilt/components/Playlist/Playlist.jsx +1 -6
- package/src/Prebuilt/components/PostLeave.jsx +7 -7
- package/src/Prebuilt/components/Preview/PreviewContainer.jsx +5 -13
- package/src/Prebuilt/components/Preview/{PreviewForm.jsx → PreviewForm.tsx} +14 -4
- package/src/Prebuilt/components/Preview/PreviewJoin.jsx +9 -7
- package/src/Prebuilt/components/RaiseHand.jsx +0 -7
- package/src/Prebuilt/components/RoleChangeRequestModal.jsx +82 -6
- package/src/Prebuilt/components/ScreenshareDisplay.jsx +4 -10
- package/src/Prebuilt/components/ScreenshareTile.jsx +41 -33
- package/src/Prebuilt/components/SecondaryTiles.tsx +34 -0
- package/src/Prebuilt/components/Settings/LayoutSettings.jsx +2 -12
- package/src/Prebuilt/components/Settings/NotificationSettings.jsx +3 -9
- package/src/Prebuilt/components/Settings/SettingsModal.jsx +3 -9
- package/src/Prebuilt/components/StatsForNerds.jsx +3 -1
- package/src/Prebuilt/components/TileMenu/TileMenu.jsx +15 -16
- package/src/Prebuilt/components/TileMenu/TileMenuContent.jsx +21 -19
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +53 -11
- package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +62 -0
- package/src/Prebuilt/components/VideoLayouts/Grid.tsx +41 -0
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +92 -0
- package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +60 -0
- package/src/Prebuilt/components/VideoLayouts/RoleProminence.tsx +56 -0
- package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +36 -0
- package/src/Prebuilt/components/VideoLayouts/interface.ts +9 -0
- package/src/Prebuilt/components/VideoTile.jsx +93 -43
- package/src/Prebuilt/components/conference.jsx +24 -20
- package/src/Prebuilt/components/hooks/useMetadata.jsx +7 -0
- package/src/Prebuilt/components/hooks/useRoleProminencePeers.tsx +38 -0
- package/src/Prebuilt/components/hooks/useTileLayout.tsx +121 -0
- package/src/Prebuilt/components/hooks/useVideoTileLayout.ts +22 -0
- package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +5 -72
- package/src/Prebuilt/components/pdfAnnotator/submitPdf.jsx +4 -45
- package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +2 -17
- package/src/Prebuilt/components/peerTileUtils.jsx +1 -1
- package/src/Prebuilt/images/empty-chat.svg +12 -0
- package/src/Prebuilt/layouts/EmbedView.jsx +17 -40
- package/src/Prebuilt/layouts/HLSView.jsx +83 -66
- package/src/Prebuilt/layouts/PDFView.jsx +1 -11
- package/src/Prebuilt/layouts/SidePane.tsx +96 -0
- package/src/Prebuilt/layouts/{mainView.jsx → VideoStreamingSection.tsx} +38 -47
- package/src/Prebuilt/layouts/WhiteboardView.jsx +10 -34
- package/src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx +1 -4
- package/src/Prebuilt/plugins/whiteboard/{ToggleWhiteboard.jsx → ToggleWhiteboard.tsx} +5 -9
- package/src/Prebuilt/primitives/DialogContent.jsx +15 -11
- package/src/Prebuilt/provider/roomLayoutProvider/constants/index.ts +17 -2
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts +36 -13
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.ts +10 -0
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts +65 -0
- package/src/Prebuilt/provider/roomLayoutProvider/index.tsx +17 -6
- package/dist/HLSView-P57IRMAR.js.map +0 -7
- package/dist/PinnedTrackView-4FYJEBTB.js +0 -102
- package/dist/PinnedTrackView-4FYJEBTB.js.map +0 -7
- package/dist/VirtualBackground-GGCQJ5JM.js.map +0 -7
- package/dist/chunk-IVTWKQI3.js +0 -827
- package/dist/chunk-IVTWKQI3.js.map +0 -7
- package/dist/chunk-OSM4QEQG.js.map +0 -7
- package/dist/chunk-P5X32KOD.js.map +0 -7
- package/dist/chunk-RVCZPPTL.js +0 -1100
- package/dist/chunk-RVCZPPTL.js.map +0 -7
- package/dist/conference-P6I6ESVF.js +0 -8995
- package/dist/conference-P6I6ESVF.js.map +0 -7
- package/src/Prebuilt/components/Chat/ChatHeader.jsx +0 -67
- package/src/Prebuilt/components/EqualProminence.jsx +0 -180
- package/src/Prebuilt/components/FirstPersonDisplay.jsx +0 -50
- package/src/Prebuilt/components/Footer/Footer.jsx +0 -73
- package/src/Prebuilt/components/Header/Header.jsx +0 -8
- package/src/Prebuilt/components/Header/StreamingHeader.jsx +0 -54
- package/src/Prebuilt/components/LeaveRoom.jsx +0 -94
- package/src/Prebuilt/components/MoreSettings/MoreSettings.jsx +0 -10
- package/src/Prebuilt/components/Notifications/MessageNotifications.jsx +0 -25
- package/src/Prebuilt/components/gridView.jsx +0 -85
- package/src/Prebuilt/components/hooks/useFeatures.js +0 -22
- package/src/Prebuilt/components/hooks/useNavigation.js +0 -19
- package/src/Prebuilt/components/hooks/useSkipPreview.jsx +0 -20
- package/src/Prebuilt/components/pdfAnnotator/pdfErrorView.jsx +0 -29
- package/src/Prebuilt/images/Logo.svg +0 -8
- package/src/Prebuilt/layouts/ActiveSpeakerView.jsx +0 -34
- package/src/Prebuilt/layouts/InsetView.jsx +0 -260
- package/src/Prebuilt/layouts/PinnedTrackView.jsx +0 -59
- package/src/Prebuilt/layouts/SidePane.jsx +0 -52
- package/src/Prebuilt/layouts/mainGridView.jsx +0 -98
- package/src/Prebuilt/layouts/screenShareView.jsx +0 -183
- /package/{src/Prebuilt/components/Header/index.jsx → dist/Prebuilt/components/Header/index.d.ts} +0 -0
- /package/src/Prebuilt/components/{ScreenShare.jsx → ScreenShareToggle.jsx} +0 -0
- /package/src/{assets → Prebuilt/images}/android-perm-1.png +0 -0
- /package/src/{assets → Prebuilt/images}/ios-perm-0.png +0 -0
@@ -0,0 +1,73 @@
|
|
1
|
+
import React, { useState } from 'react';
|
2
|
+
import { selectPeerCount, useHMSStore } from '@100mslive/react-sdk';
|
3
|
+
import { CrossIcon } from '@100mslive/react-icons';
|
4
|
+
import { Flex, IconButton, Tabs } from '../../..';
|
5
|
+
import { useSidepaneToggle } from '../AppData/useSidepane';
|
6
|
+
import { SIDE_PANE_OPTIONS } from '../../common/constants';
|
7
|
+
|
8
|
+
const tabTriggerCSS = {
|
9
|
+
color: '$on_surface_high',
|
10
|
+
p: '$4',
|
11
|
+
fontWeight: '$semiBold',
|
12
|
+
fontSize: '$sm',
|
13
|
+
w: '100%',
|
14
|
+
justifyContent: 'center',
|
15
|
+
};
|
16
|
+
|
17
|
+
export const ChatParticipantHeader = React.memo(({ activeTabValue = SIDE_PANE_OPTIONS.CHAT }) => {
|
18
|
+
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
19
|
+
const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
20
|
+
const [activeTab, setActiveTab] = useState(activeTabValue);
|
21
|
+
const peerCount = useHMSStore(selectPeerCount);
|
22
|
+
|
23
|
+
return (
|
24
|
+
<Flex
|
25
|
+
align="center"
|
26
|
+
css={{
|
27
|
+
color: '$on_primary_high',
|
28
|
+
h: '$16',
|
29
|
+
}}
|
30
|
+
>
|
31
|
+
<Flex css={{ w: '100%', bg: '$surface_default', borderRadius: '$2' }}>
|
32
|
+
<Tabs.Root value={activeTab} onValueChange={setActiveTab} css={{ w: '100%' }}>
|
33
|
+
<Tabs.List css={{ w: '100%', p: '$2' }}>
|
34
|
+
<Tabs.Trigger
|
35
|
+
value={SIDE_PANE_OPTIONS.CHAT}
|
36
|
+
onClick={toggleChat}
|
37
|
+
css={{
|
38
|
+
...tabTriggerCSS,
|
39
|
+
color: activeTab !== SIDE_PANE_OPTIONS.CHAT ? '$on_surface_low' : '$on_surface_high',
|
40
|
+
}}
|
41
|
+
>
|
42
|
+
Chat
|
43
|
+
</Tabs.Trigger>
|
44
|
+
<Tabs.Trigger
|
45
|
+
value={SIDE_PANE_OPTIONS.PARTICIPANTS}
|
46
|
+
onClick={toggleParticipants}
|
47
|
+
css={{
|
48
|
+
...tabTriggerCSS,
|
49
|
+
color: activeTab !== SIDE_PANE_OPTIONS.PARTICIPANTS ? '$on_surface_low' : '$on_surface_high',
|
50
|
+
}}
|
51
|
+
>
|
52
|
+
Participants ({peerCount})
|
53
|
+
</Tabs.Trigger>
|
54
|
+
</Tabs.List>
|
55
|
+
</Tabs.Root>
|
56
|
+
</Flex>
|
57
|
+
<IconButton
|
58
|
+
css={{ ml: 'auto' }}
|
59
|
+
onClick={e => {
|
60
|
+
e.stopPropagation();
|
61
|
+
if (activeTab === SIDE_PANE_OPTIONS.CHAT) {
|
62
|
+
toggleChat();
|
63
|
+
} else {
|
64
|
+
toggleParticipants();
|
65
|
+
}
|
66
|
+
}}
|
67
|
+
data-testid="close_chat"
|
68
|
+
>
|
69
|
+
<CrossIcon />
|
70
|
+
</IconButton>
|
71
|
+
</Flex>
|
72
|
+
);
|
73
|
+
});
|
@@ -1,6 +1,4 @@
|
|
1
|
-
import React, {
|
2
|
-
import { useMeasure } from 'react-use';
|
3
|
-
import { FixedSizeList } from 'react-window';
|
1
|
+
import React, { useMemo, useState } from 'react';
|
4
2
|
import {
|
5
3
|
selectMessagesUnreadCountByPeerID,
|
6
4
|
selectMessagesUnreadCountByRole,
|
@@ -19,7 +17,11 @@ const ChatDotIcon = () => {
|
|
19
17
|
|
20
18
|
const SelectorItem = ({ value, active, onClick, unreadCount }) => {
|
21
19
|
return (
|
22
|
-
<Dropdown.Item
|
20
|
+
<Dropdown.Item
|
21
|
+
data-testid="chat_members"
|
22
|
+
css={{ align: 'center', px: '$10', bg: '$surface_default' }}
|
23
|
+
onClick={onClick}
|
24
|
+
>
|
23
25
|
<Text variant="sm">{value}</Text>
|
24
26
|
<Flex align="center" css={{ ml: 'auto', color: '$on_primary_high' }}>
|
25
27
|
{unreadCount > 0 && (
|
@@ -89,7 +91,6 @@ const PeerItem = ({ onSelect, peerId, name, active }) => {
|
|
89
91
|
};
|
90
92
|
|
91
93
|
const VirtualizedSelectItemList = ({ peers, selectedRole, selectedPeerId, searchValue, onSelect }) => {
|
92
|
-
const [ref, { width, height }] = useMeasure();
|
93
94
|
const roles = useFilteredRoles();
|
94
95
|
const filteredPeers = useMemo(
|
95
96
|
() =>
|
@@ -127,14 +128,12 @@ const VirtualizedSelectItemList = ({ peers, selectedRole, selectedPeerId, search
|
|
127
128
|
}, [onSelect, selectedRole, selectedPeerId, roles, filteredPeers]);
|
128
129
|
|
129
130
|
return (
|
130
|
-
<Dropdown.Group
|
131
|
-
<
|
132
|
-
{(
|
133
|
-
<
|
134
|
-
|
135
|
-
|
136
|
-
)}
|
137
|
-
</FixedSizeList>
|
131
|
+
<Dropdown.Group css={{ overflowY: 'auto', maxHeight: '$64', bg: '$surface_default' }}>
|
132
|
+
<Box>
|
133
|
+
{listItems.map((item, index) => (
|
134
|
+
<Box key={index}>{item}</Box>
|
135
|
+
))}
|
136
|
+
</Box>
|
138
137
|
</Dropdown.Group>
|
139
138
|
);
|
140
139
|
};
|
@@ -144,10 +143,10 @@ export const ChatSelector = ({ role, peerId, onSelect }) => {
|
|
144
143
|
const [search, setSearch] = useState('');
|
145
144
|
|
146
145
|
return (
|
147
|
-
|
146
|
+
<>
|
148
147
|
{peers.length > 0 && (
|
149
|
-
<Box css={{ px: '$
|
150
|
-
<ParticipantSearch onSearch={setSearch} placeholder="Search participants" />
|
148
|
+
<Box css={{ px: '$4' }}>
|
149
|
+
<ParticipantSearch onSearch={setSearch} placeholder="Search for participants" />
|
151
150
|
</Box>
|
152
151
|
)}
|
153
152
|
<VirtualizedSelectItemList
|
@@ -157,6 +156,6 @@ export const ChatSelector = ({ role, peerId, onSelect }) => {
|
|
157
156
|
peers={peers}
|
158
157
|
searchValue={search}
|
159
158
|
/>
|
160
|
-
|
159
|
+
</>
|
161
160
|
);
|
162
161
|
};
|
@@ -0,0 +1,81 @@
|
|
1
|
+
import React, { useState } from 'react';
|
2
|
+
import { useMedia } from 'react-use';
|
3
|
+
import { ChevronDownIcon, ChevronUpIcon, CrossIcon } from '@100mslive/react-icons';
|
4
|
+
import { Dropdown } from '../../../Dropdown';
|
5
|
+
import { Flex } from '../../../Layout';
|
6
|
+
import { Sheet } from '../../../Sheet';
|
7
|
+
import { Text } from '../../../Text';
|
8
|
+
import { config as cssConfig } from '../../../Theme';
|
9
|
+
import { ChatSelector } from './ChatSelector';
|
10
|
+
import { textEllipsis } from '../../../utils';
|
11
|
+
|
12
|
+
export const ChatSelectorContainer = ({ onSelect, role, peerId, selection }) => {
|
13
|
+
const [open, setOpen] = useState(false);
|
14
|
+
const isMobile = useMedia(cssConfig.media.md);
|
15
|
+
|
16
|
+
return (
|
17
|
+
<Flex align="center" css={{ mb: '$8' }}>
|
18
|
+
<Text variant="tiny" css={{ color: '$on_surface_medium', textTransform: 'uppercase' }}>
|
19
|
+
Send To
|
20
|
+
</Text>
|
21
|
+
|
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 $border_bright',
|
28
|
+
r: '$0',
|
29
|
+
p: '$1 $2',
|
30
|
+
ml: '$8',
|
31
|
+
}}
|
32
|
+
tabIndex={0}
|
33
|
+
>
|
34
|
+
<Flex align="center" css={{ c: '$on_surface_medium' }}>
|
35
|
+
<Text variant="tiny" css={{ ...textEllipsis(80), textTransform: 'uppercase', c: '$on_surface_high' }}>
|
36
|
+
{selection}
|
37
|
+
</Text>
|
38
|
+
{open ? <ChevronUpIcon width={16} height={16} /> : <ChevronDownIcon width={16} height={16} />}
|
39
|
+
</Flex>
|
40
|
+
</Dropdown.Trigger>
|
41
|
+
|
42
|
+
<Dropdown.Content
|
43
|
+
css={{
|
44
|
+
w: '$64',
|
45
|
+
overflow: 'hidden',
|
46
|
+
maxHeight: 'unset',
|
47
|
+
bg: '$surface_default',
|
48
|
+
}}
|
49
|
+
align="start"
|
50
|
+
sideOffset={8}
|
51
|
+
>
|
52
|
+
{isMobile ? (
|
53
|
+
<Sheet.Root open={open} onOpenChange={value => setOpen(value)}>
|
54
|
+
<Sheet.Content css={{ pt: '$8' }}>
|
55
|
+
<Sheet.Title
|
56
|
+
css={{
|
57
|
+
display: 'flex',
|
58
|
+
w: '100%',
|
59
|
+
justifyContent: 'space-between',
|
60
|
+
px: '$10',
|
61
|
+
pb: '$4',
|
62
|
+
mb: '$8',
|
63
|
+
borderBottom: '1px solid $border_bright',
|
64
|
+
}}
|
65
|
+
>
|
66
|
+
<Text css={{ color: '$on_surface_medium', fontWeight: '$semiBold' }}>Send message to</Text>
|
67
|
+
<Sheet.Close css={{ color: '$on_surface_medium' }}>
|
68
|
+
<CrossIcon />
|
69
|
+
</Sheet.Close>
|
70
|
+
</Sheet.Title>
|
71
|
+
<ChatSelector onSelect={onSelect} role={role} peerId={peerId} />
|
72
|
+
</Sheet.Content>
|
73
|
+
</Sheet.Root>
|
74
|
+
) : (
|
75
|
+
<ChatSelector onSelect={onSelect} role={role} peerId={peerId} />
|
76
|
+
)}
|
77
|
+
</Dropdown.Content>
|
78
|
+
</Dropdown.Root>
|
79
|
+
</Flex>
|
80
|
+
);
|
81
|
+
};
|
@@ -1,26 +1,44 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import { PinIcon, SpotlightIcon } from '@100mslive/react-icons';
|
3
|
+
import { Flex, styled, Text, textEllipsis } from '../../../';
|
3
4
|
import { ConnectionIndicator } from './ConnectionIndicator';
|
4
5
|
|
5
|
-
const TileConnection = ({ name, peerId, hideLabel, width }) => {
|
6
|
+
const TileConnection = ({ name, peerId, hideLabel, width, spotlighted, pinned }) => {
|
6
7
|
return (
|
7
8
|
<Wrapper>
|
8
9
|
{!hideLabel ? (
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
10
|
+
<>
|
11
|
+
<Flex align="center">
|
12
|
+
{pinned && (
|
13
|
+
<IconWrapper>
|
14
|
+
<PinIcon width="15" height="15" css={{ display: 'block' }} />
|
15
|
+
</IconWrapper>
|
16
|
+
)}
|
17
|
+
{spotlighted && (
|
18
|
+
<IconWrapper>
|
19
|
+
<SpotlightIcon width="15" height="15" css={{ display: 'block' }} />
|
20
|
+
</IconWrapper>
|
21
|
+
)}
|
22
|
+
<Text
|
23
|
+
css={{
|
24
|
+
c: '$on_surface_high',
|
25
|
+
verticalAlign: 'baseline',
|
26
|
+
...textEllipsis(width - 60),
|
27
|
+
}}
|
28
|
+
variant="xs"
|
29
|
+
>
|
30
|
+
{name}
|
31
|
+
</Text>
|
32
|
+
</Flex>
|
33
|
+
<ConnectionIndicator isTile peerId={peerId} />
|
34
|
+
</>
|
18
35
|
) : null}
|
19
|
-
<ConnectionIndicator isTile peerId={peerId} />
|
20
36
|
</Wrapper>
|
21
37
|
);
|
22
38
|
};
|
23
39
|
|
40
|
+
const IconWrapper = styled('div', { c: '$on_surface_high', ml: '$3', mt: '$1' });
|
41
|
+
|
24
42
|
const Wrapper = styled('div', {
|
25
43
|
display: 'flex',
|
26
44
|
alignItems: 'center',
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import React, { Fragment, useCallback,
|
1
|
+
import React, { Fragment, useCallback, useState } from 'react';
|
2
|
+
import { useMedia } from 'react-use';
|
2
3
|
import data from '@emoji-mart/data/sets/14/apple.json';
|
3
4
|
import { init } from 'emoji-mart';
|
4
5
|
import {
|
@@ -6,35 +7,32 @@ import {
|
|
6
7
|
selectIsConnectedToRoom,
|
7
8
|
selectLocalPeerID,
|
8
9
|
useCustomEvent,
|
9
|
-
useHMSActions,
|
10
|
+
// useHMSActions,
|
10
11
|
useHMSStore,
|
11
|
-
useRecordingStreaming,
|
12
|
+
// useRecordingStreaming,
|
12
13
|
} from '@100mslive/react-sdk';
|
13
14
|
import { EmojiIcon } from '@100mslive/react-icons';
|
14
15
|
import { EmojiCard } from './Footer/EmojiCard';
|
15
|
-
import { ToastManager } from './Toast/ToastManager';
|
16
|
+
// import { ToastManager } from './Toast/ToastManager';
|
16
17
|
import { Dropdown } from '../../Dropdown';
|
17
18
|
import { Box } from '../../Layout';
|
19
|
+
import { config as cssConfig } from '../../Theme';
|
18
20
|
import { Tooltip } from '../../Tooltip';
|
19
21
|
import IconButton from '../IconButton';
|
20
|
-
import { useHLSViewerRole } from './AppData/useUISettings';
|
21
22
|
import { useDropdownList } from './hooks/useDropdownList';
|
22
|
-
import {
|
23
|
-
import { EMOJI_REACTION_TYPE, FEATURE_LIST } from '../common/constants';
|
23
|
+
import { EMOJI_REACTION_TYPE } from '../common/constants';
|
24
24
|
|
25
25
|
init({ data });
|
26
26
|
|
27
27
|
export const EmojiReaction = () => {
|
28
28
|
const [open, setOpen] = useState(false);
|
29
29
|
const isConnected = useHMSStore(selectIsConnectedToRoom);
|
30
|
-
const isFeatureEnabled = useIsFeatureEnabled(FEATURE_LIST.EMOJI_REACTION);
|
31
30
|
useDropdownList({ open: open, name: 'EmojiReaction' });
|
32
|
-
const hmsActions = useHMSActions();
|
31
|
+
// const hmsActions = useHMSActions();
|
33
32
|
const roles = useHMSStore(selectAvailableRoleNames);
|
34
33
|
const localPeerId = useHMSStore(selectLocalPeerID);
|
35
|
-
const
|
36
|
-
const
|
37
|
-
const filteredRoles = useMemo(() => roles.filter(role => role !== hlsViewerRole), [roles, hlsViewerRole]);
|
34
|
+
// const { isStreamingOn } = useRecordingStreaming();
|
35
|
+
const isMobile = useMedia(cssConfig.media.md);
|
38
36
|
|
39
37
|
const onEmojiEvent = useCallback(data => {
|
40
38
|
window.showFlyingEmoji(data?.emojiId, data?.senderId);
|
@@ -51,8 +49,9 @@ export const EmojiReaction = () => {
|
|
51
49
|
emojiId: emojiId,
|
52
50
|
senderId: localPeerId,
|
53
51
|
};
|
54
|
-
|
55
|
-
|
52
|
+
// TODO: RT find a way to figure out hls-viewer roles
|
53
|
+
sendEvent(data, { roleNames: roles });
|
54
|
+
/* if (isStreamingOn) {
|
56
55
|
try {
|
57
56
|
await hmsActions.sendHLSTimedMetadata([
|
58
57
|
{
|
@@ -64,13 +63,15 @@ export const EmojiReaction = () => {
|
|
64
63
|
console.log(error);
|
65
64
|
ToastManager.addToast({ title: error.message });
|
66
65
|
}
|
67
|
-
}
|
66
|
+
} */
|
68
67
|
};
|
69
68
|
|
70
|
-
if (!isConnected
|
69
|
+
if (!isConnected) {
|
71
70
|
return null;
|
72
71
|
}
|
73
|
-
return (
|
72
|
+
return isMobile ? (
|
73
|
+
<EmojiCard sendReaction={sendReaction} />
|
74
|
+
) : (
|
74
75
|
<Fragment>
|
75
76
|
<Dropdown.Root open={open} onOpenChange={setOpen}>
|
76
77
|
<Dropdown.Trigger asChild data-testid="emoji_reaction_btn">
|
@@ -4,18 +4,12 @@ import { ChatIcon, ChatUnreadIcon } from '@100mslive/react-icons';
|
|
4
4
|
import { Tooltip } from '../../../';
|
5
5
|
import IconButton from '../../IconButton';
|
6
6
|
import { useIsSidepaneTypeOpen, useSidepaneToggle } from '../AppData/useSidepane';
|
7
|
-
import {
|
8
|
-
import { FEATURE_LIST, SIDE_PANE_OPTIONS } from '../../common/constants';
|
7
|
+
import { SIDE_PANE_OPTIONS } from '../../common/constants';
|
9
8
|
|
10
9
|
export const ChatToggle = () => {
|
11
10
|
const countUnreadMessages = useHMSStore(selectUnreadHMSMessagesCount);
|
12
11
|
const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
|
13
12
|
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
14
|
-
const isFeatureEnabled = useIsFeatureEnabled(FEATURE_LIST.CHAT);
|
15
|
-
|
16
|
-
if (!isFeatureEnabled) {
|
17
|
-
return;
|
18
|
-
}
|
19
13
|
|
20
14
|
return (
|
21
15
|
<Tooltip key="chat" title={`${isChatOpen ? 'Close' : 'Open'} chat`}>
|
@@ -0,0 +1,89 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { useMedia } from 'react-use';
|
3
|
+
import {
|
4
|
+
ConferencingScreen,
|
5
|
+
DefaultConferencingScreen_Elements,
|
6
|
+
HLSLiveStreamingScreen_Elements,
|
7
|
+
} from '@100mslive/types-prebuilt';
|
8
|
+
import { config as cssConfig, Footer as AppFooter } from '../../..';
|
9
|
+
// @ts-ignore: No implicit Any
|
10
|
+
import { AudioVideoToggle } from '../AudioVideoToggle';
|
11
|
+
// @ts-ignore: No implicit Any
|
12
|
+
import { EmojiReaction } from '../EmojiReaction';
|
13
|
+
// @ts-ignore: No implicit Any
|
14
|
+
import { LeaveRoom } from '../Leave/LeaveRoom';
|
15
|
+
// @ts-ignore: No implicit Any
|
16
|
+
import { MoreSettings } from '../MoreSettings/MoreSettings';
|
17
|
+
// @ts-ignore: No implicit Any
|
18
|
+
import { RaiseHand } from '../RaiseHand';
|
19
|
+
// @ts-ignore: No implicit Any
|
20
|
+
import { ScreenshareToggle } from '../ScreenShareToggle';
|
21
|
+
// @ts-ignore: No implicit Any
|
22
|
+
import { ChatToggle } from './ChatToggle';
|
23
|
+
// @ts-ignore: No implicit Any
|
24
|
+
import { ParticipantCount } from './ParticipantList';
|
25
|
+
|
26
|
+
export const Footer = ({
|
27
|
+
screenType,
|
28
|
+
elements,
|
29
|
+
}: {
|
30
|
+
screenType: keyof ConferencingScreen;
|
31
|
+
elements: DefaultConferencingScreen_Elements | HLSLiveStreamingScreen_Elements;
|
32
|
+
}) => {
|
33
|
+
const isMobile = useMedia(cssConfig.media.md);
|
34
|
+
|
35
|
+
return (
|
36
|
+
<AppFooter.Root
|
37
|
+
css={{
|
38
|
+
flexWrap: 'nowrap',
|
39
|
+
'@md': {
|
40
|
+
justifyContent: 'center',
|
41
|
+
gap: '$10',
|
42
|
+
position: 'relative',
|
43
|
+
zIndex: 20,
|
44
|
+
},
|
45
|
+
}}
|
46
|
+
>
|
47
|
+
<AppFooter.Left
|
48
|
+
css={{
|
49
|
+
'@md': {
|
50
|
+
w: 'unset',
|
51
|
+
p: '0',
|
52
|
+
gap: '$10',
|
53
|
+
},
|
54
|
+
}}
|
55
|
+
>
|
56
|
+
{isMobile ? <LeaveRoom screenType={screenType} /> : null}
|
57
|
+
<AudioVideoToggle />
|
58
|
+
</AppFooter.Left>
|
59
|
+
<AppFooter.Center
|
60
|
+
css={{
|
61
|
+
'@md': {
|
62
|
+
w: 'unset',
|
63
|
+
gap: '$10',
|
64
|
+
},
|
65
|
+
}}
|
66
|
+
>
|
67
|
+
{isMobile ? (
|
68
|
+
<>
|
69
|
+
{screenType === 'hls_live_streaming' ? <RaiseHand /> : null}
|
70
|
+
{elements?.chat && <ChatToggle />}
|
71
|
+
<MoreSettings elements={elements} screenType={screenType} />
|
72
|
+
</>
|
73
|
+
) : (
|
74
|
+
<>
|
75
|
+
<ScreenshareToggle />
|
76
|
+
{screenType === 'hls_live_streaming' ? <RaiseHand /> : null}
|
77
|
+
{elements?.emoji_reactions && <EmojiReaction />}
|
78
|
+
<LeaveRoom screenType={screenType} />
|
79
|
+
</>
|
80
|
+
)}
|
81
|
+
</AppFooter.Center>
|
82
|
+
<AppFooter.Right>
|
83
|
+
{elements?.chat && <ChatToggle />}
|
84
|
+
<ParticipantCount />
|
85
|
+
<MoreSettings elements={elements} screenType={screenType} />
|
86
|
+
</AppFooter.Right>
|
87
|
+
</AppFooter.Root>
|
88
|
+
);
|
89
|
+
};
|