@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
@@ -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
|
+
};
|
@@ -9,16 +9,17 @@ export const useEmojiPickerStyles = showing => {
|
|
9
9
|
const style = document.createElement('style');
|
10
10
|
style.textContent = `
|
11
11
|
#root {
|
12
|
-
--em-rgb-color: var(--hms-ui-colors-
|
12
|
+
--em-rgb-color: var(--hms-ui-colors-on_surface_high);
|
13
13
|
--em-rgb-input: var(--hms-ui-colors-on_primary_high);
|
14
|
-
--em-color-border: var(--hms-ui-colors-
|
15
|
-
--color-b: var(--hms-ui-colors-
|
14
|
+
--em-color-border: var(--hms-ui-colors-surface_bright);
|
15
|
+
--color-b: var(--hms-ui-colors-on_surface_high);
|
16
16
|
--rgb-background: transparent;
|
17
|
-
color: var(--hms-ui-colors-
|
17
|
+
color: var(--hms-ui-colors-on_surface_high);
|
18
18
|
font-family: var(--hms-ui-fonts-sans);
|
19
19
|
}
|
20
20
|
.sticky {
|
21
21
|
background-color: var(--hms-ui-colors-surface_bright);
|
22
|
+
margin-top: 0.5rem;
|
22
23
|
}
|
23
24
|
`;
|
24
25
|
root?.appendChild(style);
|
package/src/Prebuilt/components/Connection/{ConnectionIndicator.jsx → ConnectionIndicator.tsx}
RENAMED
@@ -1,7 +1,8 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { selectConnectionQualityByPeerID, useHMSStore } from '@100mslive/react-sdk';
|
3
3
|
import { PoorConnectivityIcon } from '@100mslive/react-icons';
|
4
|
-
import { styled, Tooltip, useTheme } from '
|
4
|
+
import { styled, Tooltip, useTheme } from '../../..';
|
5
|
+
// @ts-ignore
|
5
6
|
import { getColor, getTooltipText } from './connectionQualityUtils';
|
6
7
|
|
7
8
|
const Wrapper = styled('span', {
|
@@ -10,7 +11,6 @@ const Wrapper = styled('span', {
|
|
10
11
|
display: 'flex',
|
11
12
|
alignItems: 'center',
|
12
13
|
justifyContent: 'center',
|
13
|
-
backgroundColor: '$background_dim',
|
14
14
|
borderRadius: '$round',
|
15
15
|
variants: {
|
16
16
|
isTile: {
|
@@ -22,7 +22,15 @@ const Wrapper = styled('span', {
|
|
22
22
|
},
|
23
23
|
});
|
24
24
|
|
25
|
-
export const ConnectionIndicator = ({
|
25
|
+
export const ConnectionIndicator = ({
|
26
|
+
peerId,
|
27
|
+
isTile = false,
|
28
|
+
hideBg = false,
|
29
|
+
}: {
|
30
|
+
peerId: string;
|
31
|
+
isTile?: boolean;
|
32
|
+
hideBg?: boolean;
|
33
|
+
}) => {
|
26
34
|
const downlinkQuality = useHMSStore(selectConnectionQualityByPeerID(peerId))?.downlinkQuality;
|
27
35
|
const { theme } = useTheme();
|
28
36
|
const defaultColor = theme.colors.surface_brighter;
|
@@ -41,7 +49,7 @@ export const ConnectionIndicator = ({ peerId, isTile = false }) => {
|
|
41
49
|
const size = isTile ? 12 : 16;
|
42
50
|
return (
|
43
51
|
<Tooltip title={getTooltipText(downlinkQuality)}>
|
44
|
-
<Wrapper isTile={isTile} data-testid="tile_network">
|
52
|
+
<Wrapper isTile={isTile} data-testid="tile_network" css={{ backgroundColor: hideBg ? '' : '$surface_bright' }}>
|
45
53
|
<svg
|
46
54
|
width={size}
|
47
55
|
height={size}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { PinIcon, SpotlightIcon } from '@100mslive/react-icons';
|
3
|
+
import { Flex, styled, Text, textEllipsis } from '../../..';
|
4
|
+
import { ConnectionIndicator } from './ConnectionIndicator';
|
5
|
+
|
6
|
+
const TileConnection = ({
|
7
|
+
name,
|
8
|
+
peerId,
|
9
|
+
hideLabel,
|
10
|
+
width,
|
11
|
+
spotlighted,
|
12
|
+
pinned,
|
13
|
+
}: {
|
14
|
+
name: string;
|
15
|
+
peerId: string;
|
16
|
+
hideLabel: boolean;
|
17
|
+
width?: number;
|
18
|
+
spotlighted?: boolean;
|
19
|
+
pinned?: boolean;
|
20
|
+
}) => {
|
21
|
+
return (
|
22
|
+
<Wrapper>
|
23
|
+
{!hideLabel ? (
|
24
|
+
<>
|
25
|
+
<Flex align="center">
|
26
|
+
{pinned && (
|
27
|
+
<IconWrapper>
|
28
|
+
<PinIcon width="15" height="15" />
|
29
|
+
</IconWrapper>
|
30
|
+
)}
|
31
|
+
{spotlighted && (
|
32
|
+
<IconWrapper>
|
33
|
+
<SpotlightIcon width="15" height="15" />
|
34
|
+
</IconWrapper>
|
35
|
+
)}
|
36
|
+
<Text
|
37
|
+
css={{
|
38
|
+
c: '$on_surface_high',
|
39
|
+
verticalAlign: 'baseline',
|
40
|
+
...(width ? textEllipsis(width - 60) : {}),
|
41
|
+
}}
|
42
|
+
variant="xs"
|
43
|
+
>
|
44
|
+
{name}
|
45
|
+
</Text>
|
46
|
+
</Flex>
|
47
|
+
<ConnectionIndicator isTile peerId={peerId} hideBg />
|
48
|
+
</>
|
49
|
+
) : null}
|
50
|
+
</Wrapper>
|
51
|
+
);
|
52
|
+
};
|
53
|
+
|
54
|
+
const IconWrapper = styled('div', { c: '$on_surface_high', ml: '$3', mt: '$1' });
|
55
|
+
|
56
|
+
const Wrapper = styled('div', {
|
57
|
+
display: 'flex',
|
58
|
+
alignItems: 'center',
|
59
|
+
justifyContent: 'space-between',
|
60
|
+
position: 'absolute',
|
61
|
+
bottom: '$2',
|
62
|
+
left: '$2',
|
63
|
+
backgroundColor: '$background_dim',
|
64
|
+
borderRadius: '$1',
|
65
|
+
maxWidth: '85%',
|
66
|
+
'& p,span': {
|
67
|
+
p: '$2 $3',
|
68
|
+
},
|
69
|
+
});
|
70
|
+
|
71
|
+
export default TileConnection;
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import React, { Fragment,
|
1
|
+
import React, { Fragment, 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,43 +7,35 @@ 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]);
|
38
|
-
|
39
|
-
const onEmojiEvent = useCallback(data => {
|
40
|
-
window.showFlyingEmoji(data?.emojiId, data?.senderId);
|
41
|
-
}, []);
|
34
|
+
// const { isStreamingOn } = useRecordingStreaming();
|
35
|
+
const isMobile = useMedia(cssConfig.media.md);
|
42
36
|
|
43
37
|
const { sendEvent } = useCustomEvent({
|
44
38
|
type: EMOJI_REACTION_TYPE,
|
45
|
-
onEvent: onEmojiEvent,
|
46
39
|
});
|
47
40
|
|
48
41
|
const sendReaction = async emojiId => {
|
@@ -51,8 +44,10 @@ export const EmojiReaction = () => {
|
|
51
44
|
emojiId: emojiId,
|
52
45
|
senderId: localPeerId,
|
53
46
|
};
|
54
|
-
|
55
|
-
|
47
|
+
// TODO: RT find a way to figure out hls-viewer roles
|
48
|
+
sendEvent(data, { roleNames: roles });
|
49
|
+
window.showFlyingEmoji?.({ emojiId, senderId: localPeerId });
|
50
|
+
/* if (isStreamingOn) {
|
56
51
|
try {
|
57
52
|
await hmsActions.sendHLSTimedMetadata([
|
58
53
|
{
|
@@ -64,13 +59,15 @@ export const EmojiReaction = () => {
|
|
64
59
|
console.log(error);
|
65
60
|
ToastManager.addToast({ title: error.message });
|
66
61
|
}
|
67
|
-
}
|
62
|
+
} */
|
68
63
|
};
|
69
64
|
|
70
|
-
if (!isConnected
|
65
|
+
if (!isConnected) {
|
71
66
|
return null;
|
72
67
|
}
|
73
|
-
return (
|
68
|
+
return isMobile ? (
|
69
|
+
<EmojiCard sendReaction={sendReaction} />
|
70
|
+
) : (
|
74
71
|
<Fragment>
|
75
72
|
<Dropdown.Root open={open} onOpenChange={setOpen}>
|
76
73
|
<Dropdown.Trigger asChild data-testid="emoji_reaction_btn">
|
@@ -1,21 +1,25 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { useEffect } from 'react';
|
2
2
|
import { selectUnreadHMSMessagesCount, useHMSStore } from '@100mslive/react-sdk';
|
3
3
|
import { ChatIcon, ChatUnreadIcon } from '@100mslive/react-icons';
|
4
|
-
import { Tooltip } from '
|
4
|
+
import { Tooltip } from '../../..';
|
5
|
+
// @ts-ignore: No implicit Any
|
5
6
|
import IconButton from '../../IconButton';
|
7
|
+
// @ts-ignore: No implicit Any
|
6
8
|
import { useIsSidepaneTypeOpen, useSidepaneToggle } from '../AppData/useSidepane';
|
7
|
-
|
8
|
-
import {
|
9
|
+
// @ts-ignore: No implicit Any
|
10
|
+
import { SIDE_PANE_OPTIONS } from '../../common/constants';
|
9
11
|
|
10
|
-
export const ChatToggle = () => {
|
12
|
+
export const ChatToggle = ({ openByDefault }: { openByDefault: boolean }) => {
|
11
13
|
const countUnreadMessages = useHMSStore(selectUnreadHMSMessagesCount);
|
12
14
|
const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
|
13
15
|
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
14
|
-
const isFeatureEnabled = useIsFeatureEnabled(FEATURE_LIST.CHAT);
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
useEffect(() => {
|
18
|
+
if (!isChatOpen && openByDefault) {
|
19
|
+
toggleChat();
|
20
|
+
}
|
21
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
22
|
+
}, [toggleChat, openByDefault]);
|
19
23
|
|
20
24
|
return (
|
21
25
|
<Tooltip key="chat" title={`${isChatOpen ? 'Close' : 'Open'} chat`}>
|
@@ -0,0 +1,98 @@
|
|
1
|
+
import React, { Suspense } 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 { Chat_ChatState } from '@100mslive/types-prebuilt/elements/chat';
|
9
|
+
import { selectIsLocalVideoEnabled, useHMSStore } from '@100mslive/react-sdk';
|
10
|
+
import { config as cssConfig, Footer as AppFooter } from '../../..';
|
11
|
+
// @ts-ignore: No implicit Any
|
12
|
+
import { AudioVideoToggle } from '../AudioVideoToggle';
|
13
|
+
// @ts-ignore: No implicit Any
|
14
|
+
import { EmojiReaction } from '../EmojiReaction';
|
15
|
+
// @ts-ignore: No implicit Any
|
16
|
+
import { LeaveRoom } from '../Leave/LeaveRoom';
|
17
|
+
// @ts-ignore: No implicit Any
|
18
|
+
import { MoreSettings } from '../MoreSettings/MoreSettings';
|
19
|
+
// @ts-ignore: No implicit Any
|
20
|
+
import { RaiseHand } from '../RaiseHand';
|
21
|
+
// @ts-ignore: No implicit Any
|
22
|
+
import { ScreenshareToggle } from '../ScreenShareToggle';
|
23
|
+
// @ts-ignore: No implicit Any
|
24
|
+
import { ChatToggle } from './ChatToggle';
|
25
|
+
// @ts-ignore: No implicit Any
|
26
|
+
import { ParticipantCount } from './ParticipantList';
|
27
|
+
// @ts-ignore: No implicit Any
|
28
|
+
const VirtualBackground = React.lazy(() => import('../../plugins/VirtualBackground/VirtualBackground'));
|
29
|
+
|
30
|
+
export const Footer = ({
|
31
|
+
screenType,
|
32
|
+
elements,
|
33
|
+
}: {
|
34
|
+
screenType: keyof ConferencingScreen;
|
35
|
+
elements: DefaultConferencingScreen_Elements | HLSLiveStreamingScreen_Elements;
|
36
|
+
}) => {
|
37
|
+
const isMobile = useMedia(cssConfig.media.md);
|
38
|
+
const isOverlayChat = !!elements?.chat?.is_overlay;
|
39
|
+
const openByDefault = elements?.chat?.initial_state === Chat_ChatState.CHAT_STATE_OPEN;
|
40
|
+
const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);
|
41
|
+
|
42
|
+
return (
|
43
|
+
<AppFooter.Root
|
44
|
+
css={{
|
45
|
+
flexWrap: 'nowrap',
|
46
|
+
'@md': {
|
47
|
+
justifyContent: 'center',
|
48
|
+
gap: '$10',
|
49
|
+
position: 'relative',
|
50
|
+
// To prevent it from showing over the sidepane if chat type is not overlay
|
51
|
+
zIndex: isOverlayChat ? 20 : 1,
|
52
|
+
},
|
53
|
+
}}
|
54
|
+
>
|
55
|
+
<AppFooter.Left
|
56
|
+
css={{
|
57
|
+
'@md': {
|
58
|
+
w: 'unset',
|
59
|
+
p: '0',
|
60
|
+
gap: '$10',
|
61
|
+
},
|
62
|
+
}}
|
63
|
+
>
|
64
|
+
{isMobile ? <LeaveRoom screenType={screenType} /> : null}
|
65
|
+
<AudioVideoToggle />
|
66
|
+
{isMobile ? null : <Suspense fallback={<></>}>{isVideoOn ? <VirtualBackground /> : null}</Suspense>}
|
67
|
+
</AppFooter.Left>
|
68
|
+
<AppFooter.Center
|
69
|
+
css={{
|
70
|
+
'@md': {
|
71
|
+
w: 'unset',
|
72
|
+
gap: '$10',
|
73
|
+
},
|
74
|
+
}}
|
75
|
+
>
|
76
|
+
{isMobile ? (
|
77
|
+
<>
|
78
|
+
{screenType === 'hls_live_streaming' ? <RaiseHand /> : null}
|
79
|
+
{elements?.chat && <ChatToggle openByDefault={openByDefault} />}
|
80
|
+
<MoreSettings elements={elements} screenType={screenType} />
|
81
|
+
</>
|
82
|
+
) : (
|
83
|
+
<>
|
84
|
+
<ScreenshareToggle />
|
85
|
+
<RaiseHand />
|
86
|
+
{elements?.emoji_reactions && <EmojiReaction />}
|
87
|
+
<LeaveRoom screenType={screenType} />
|
88
|
+
</>
|
89
|
+
)}
|
90
|
+
</AppFooter.Center>
|
91
|
+
<AppFooter.Right>
|
92
|
+
{!isMobile && elements?.chat && <ChatToggle openByDefault={openByDefault} />}
|
93
|
+
{elements?.participant_list && <ParticipantCount />}
|
94
|
+
<MoreSettings elements={elements} screenType={screenType} />
|
95
|
+
</AppFooter.Right>
|
96
|
+
</AppFooter.Root>
|
97
|
+
);
|
98
|
+
};
|