@100mslive/roomkit-react 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -0
- package/dist/Accordion/Accordion.d.ts +964 -0
- package/dist/Accordion/index.d.ts +979 -0
- package/dist/ActiveSpeakerView-H3VYXANB.js +39 -0
- package/dist/ActiveSpeakerView-H3VYXANB.js.map +7 -0
- package/dist/ActiveSpeakerView-REZLWPPI.css +11 -0
- package/dist/ActiveSpeakerView-REZLWPPI.css.map +7 -0
- package/dist/AudioLevel/AudioLevel.d.ts +8 -0
- package/dist/AudioLevel/index.d.ts +1 -0
- package/dist/Avatar/Avatar.d.ts +487 -0
- package/dist/Avatar/getAvatarBg.d.ts +7 -0
- package/dist/Avatar/index.d.ts +1 -0
- package/dist/Button/Button.d.ts +488 -0
- package/dist/Button/index.d.ts +1 -0
- package/dist/Checkbox/Checkbox.d.ts +958 -0
- package/dist/Checkbox/index.d.ts +1 -0
- package/dist/Collapsible/Collapsible.d.ts +1434 -0
- package/dist/Collapsible/index.d.ts +1 -0
- package/dist/Divider/Divider.d.ts +958 -0
- package/dist/Divider/index.d.ts +1 -0
- package/dist/Dropdown/Dropdown.d.ts +5728 -0
- package/dist/Dropdown/index.d.ts +1 -0
- package/dist/Fieldset/Fieldset.d.ts +477 -0
- package/dist/Fieldset/index.d.ts +1 -0
- package/dist/Footer/Footer.d.ts +3834 -0
- package/dist/Footer/index.d.ts +1 -0
- package/dist/HLSView-3RDXRV7Y.js +689 -0
- package/dist/HLSView-3RDXRV7Y.js.map +7 -0
- package/dist/HLSView-6BVBCQM7.css +11 -0
- package/dist/HLSView-6BVBCQM7.css.map +7 -0
- package/dist/IconButton/IconButton.d.ts +479 -0
- package/dist/IconButton/index.d.ts +1 -0
- package/dist/Input/Input.d.ts +2917 -0
- package/dist/Input/index.d.ts +1 -0
- package/dist/Label/Label.d.ts +479 -0
- package/dist/Label/index.d.ts +1 -0
- package/dist/Layout/Box.d.ts +477 -0
- package/dist/Layout/Flex.d.ts +482 -0
- package/dist/Layout/index.d.ts +2 -0
- package/dist/Link/Link.d.ts +489 -0
- package/dist/Link/index.d.ts +2 -0
- package/dist/Loading/Loading.d.ts +14 -0
- package/dist/Loading/index.d.ts +1 -0
- package/dist/Modal/Dialog.d.ts +3826 -0
- package/dist/Modal/DialogContent.d.ts +3343 -0
- package/dist/Modal/index.d.ts +1 -0
- package/dist/Pagination/StyledPagination.d.ts +1918 -0
- package/dist/Pagination/index.d.ts +1 -0
- package/dist/PinnedTrackView-453PELNU.js +70 -0
- package/dist/PinnedTrackView-453PELNU.js.map +7 -0
- package/dist/PinnedTrackView-QQ5FDXJX.css +11 -0
- package/dist/PinnedTrackView-QQ5FDXJX.css.map +7 -0
- package/dist/Popover/index.d.ts +1436 -0
- package/dist/Progress/index.d.ts +957 -0
- package/dist/QRCode/QRCode.d.ts +3 -0
- package/dist/QRCode/index.d.ts +1 -0
- package/dist/RadioGroup/RadioGroup.d.ts +1435 -0
- package/dist/RadioGroup/index.d.ts +1 -0
- package/dist/ReactSelect/ReactSelect.d.ts +4778 -0
- package/dist/ReactSelect/index.d.ts +1 -0
- package/dist/Select/Select.d.ts +1437 -0
- package/dist/Select/index.d.ts +1 -0
- package/dist/Slider/Slider.d.ts +488 -0
- package/dist/Slider/index.d.ts +1 -0
- package/dist/Stats/Stats.d.ts +19 -0
- package/dist/Stats/StyledStats.d.ts +2872 -0
- package/dist/Stats/formatBytes.d.ts +1 -0
- package/dist/Stats/index.d.ts +1 -0
- package/dist/Switch/Switch.d.ts +482 -0
- package/dist/Switch/index.d.ts +1 -0
- package/dist/Tabs/Tabs.d.ts +1912 -0
- package/dist/Tabs/index.d.ts +1 -0
- package/dist/Text/Text.d.ts +605 -0
- package/dist/Text/index.d.ts +1 -0
- package/dist/Theme/ThemeProvider.d.ts +397 -0
- package/dist/Theme/base.config.d.ts +417 -0
- package/dist/Theme/index.d.ts +3 -0
- package/dist/Theme/stitches.config.d.ts +4702 -0
- package/dist/Theme/themes.d.ts +64 -0
- package/dist/Theme/useSSR.d.ts +6 -0
- package/dist/TileMenu/StyledMenuTile.d.ts +3351 -0
- package/dist/TileMenu/TileMenu.d.ts +6 -0
- package/dist/TileMenu/index.d.ts +1 -0
- package/dist/Toast/Toast.d.ts +2881 -0
- package/dist/Toast/index.d.ts +1 -0
- package/dist/Tooltip/Tooltip.d.ts +14 -0
- package/dist/Tooltip/index.d.ts +1 -0
- package/dist/Video/Video.d.ts +499 -0
- package/dist/Video/index.d.ts +1 -0
- package/dist/VideoList/StyledVideoList.d.ts +1438 -0
- package/dist/VideoList/index.d.ts +2 -0
- package/dist/VideoList/videoListUtils.d.ts +1 -0
- package/dist/VideoTile/StyledVideoTile.d.ts +4309 -0
- package/dist/VideoTile/index.d.ts +1 -0
- package/dist/VirtualBackground-LHYBWUT5.js +158 -0
- package/dist/VirtualBackground-LHYBWUT5.js.map +7 -0
- package/dist/chunk-7YUYZ64D.js +6843 -0
- package/dist/chunk-7YUYZ64D.js.map +7 -0
- package/dist/chunk-HCAGFNXW.js +8270 -0
- package/dist/chunk-HCAGFNXW.js.map +7 -0
- package/dist/chunk-KYYP6ZVK.js +907 -0
- package/dist/chunk-KYYP6ZVK.js.map +7 -0
- package/dist/chunk-ULXGBUSC.js +65 -0
- package/dist/chunk-ULXGBUSC.js.map +7 -0
- package/dist/chunk-XRJXE6UO.js +243 -0
- package/dist/chunk-XRJXE6UO.js.map +7 -0
- package/dist/conference-IDNRO4WK.js +3812 -0
- package/dist/conference-IDNRO4WK.js.map +7 -0
- package/dist/conference-KN6OKGDU.css +11 -0
- package/dist/conference-KN6OKGDU.css.map +7 -0
- package/dist/fixtures/chats.d.ts +4 -0
- package/dist/fixtures/peers.d.ts +3 -0
- package/dist/fixtures/tracks.d.ts +2 -0
- package/dist/index.cjs.css +11 -0
- package/dist/index.cjs.css.map +7 -0
- package/dist/index.cjs.js +22987 -0
- package/dist/index.cjs.js.map +7 -0
- package/dist/index.css +11 -0
- package/dist/index.css.map +7 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.js +133 -0
- package/dist/index.js.map +7 -0
- package/dist/meta.cjs.json +13085 -0
- package/dist/meta.esbuild.json +13693 -0
- package/dist/transcription-BTSB7FZH.js +356 -0
- package/dist/transcription-BTSB7FZH.js.map +7 -0
- package/dist/utils/animations.d.ts +92 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/styles.d.ts +21 -0
- package/package.json +116 -0
- package/src/Accordion/Accordion.stories.tsx +50 -0
- package/src/Accordion/Accordion.tsx +88 -0
- package/src/Accordion/index.ts +8 -0
- package/src/AudioLevel/AudioLevel.tsx +34 -0
- package/src/AudioLevel/index.ts +1 -0
- package/src/Avatar/Avatar.stories.tsx +33 -0
- package/src/Avatar/Avatar.tsx +55 -0
- package/src/Avatar/getAvatarBg.ts +46 -0
- package/src/Avatar/index.ts +1 -0
- package/src/Button/Button.mdx +43 -0
- package/src/Button/Button.stories.tsx +52 -0
- package/src/Button/Button.tsx +144 -0
- package/src/Button/index.tsx +1 -0
- package/src/Chat/Chat.mdx +39 -0
- package/src/Chat/Chat.stories.tsx +39 -0
- package/src/Checkbox/Checkbox.stories.tsx +61 -0
- package/src/Checkbox/Checkbox.tsx +33 -0
- package/src/Checkbox/index.tsx +1 -0
- package/src/Collapsible/Collapsible.tsx +34 -0
- package/src/Collapsible/index.tsx +1 -0
- package/src/Divider/Divider.tsx +45 -0
- package/src/Divider/HorizontalDivider.stories.tsx +34 -0
- package/src/Divider/VerticalDivider.stories.tsx +40 -0
- package/src/Divider/index.ts +1 -0
- package/src/Dropdown/Dropdown.stories.tsx +94 -0
- package/src/Dropdown/Dropdown.tsx +142 -0
- package/src/Dropdown/index.tsx +1 -0
- package/src/Fieldset/Fieldset.stories.tsx +29 -0
- package/src/Fieldset/Fieldset.tsx +11 -0
- package/src/Fieldset/index.tsx +1 -0
- package/src/Footer/Footer.stories.tsx +61 -0
- package/src/Footer/Footer.tsx +47 -0
- package/src/Footer/index.tsx +1 -0
- package/src/IconButton/IconButton.tsx +45 -0
- package/src/IconButton/index.tsx +1 -0
- package/src/Icons/Icons.stories.mdx +10 -0
- package/src/Icons/IconsList.jsx +17 -0
- package/src/Input/Input.stories.tsx +25 -0
- package/src/Input/Input.tsx +105 -0
- package/src/Input/PasswordInput.stories.tsx +53 -0
- package/src/Input/index.tsx +1 -0
- package/src/Introduction/Integrating.stories.mdx +100 -0
- package/src/Introduction/Introduction.stories.mdx +9 -0
- package/src/Label/Label.tsx +8 -0
- package/src/Label/index.ts +1 -0
- package/src/Layout/Box.tsx +3 -0
- package/src/Layout/Flex.tsx +76 -0
- package/src/Layout/index.tsx +2 -0
- package/src/Link/Link.stories.tsx +18 -0
- package/src/Link/Link.tsx +54 -0
- package/src/Link/index.tsx +2 -0
- package/src/Loading/Loading.mdx +15 -0
- package/src/Loading/Loading.stories.tsx +37 -0
- package/src/Loading/Loading.tsx +33 -0
- package/src/Loading/index.ts +1 -0
- package/src/Modal/Dialog.mdx +19 -0
- package/src/Modal/Dialog.stories.tsx +68 -0
- package/src/Modal/Dialog.tsx +26 -0
- package/src/Modal/DialogContent.tsx +63 -0
- package/src/Modal/index.ts +1 -0
- package/src/Pagination/StyledPagination.stories.tsx +80 -0
- package/src/Pagination/StyledPagination.tsx +68 -0
- package/src/Pagination/index.tsx +1 -0
- package/src/Popover/Popover.mdx +9 -0
- package/src/Popover/Popover.stories.tsx +95 -0
- package/src/Popover/index.tsx +26 -0
- package/src/Prebuilt/App.jsx +273 -0
- package/src/Prebuilt/AppContext.jsx +21 -0
- package/src/Prebuilt/IconButton.jsx +19 -0
- package/src/Prebuilt/Prebuilt.stories.tsx +20 -0
- package/src/Prebuilt/common/PeersSorter.js +89 -0
- package/src/Prebuilt/common/constants.js +208 -0
- package/src/Prebuilt/common/hooks.js +47 -0
- package/src/Prebuilt/common/roles.js +4 -0
- package/src/Prebuilt/common/useSortedPeers.js +28 -0
- package/src/Prebuilt/common/utils.js +91 -0
- package/src/Prebuilt/components/AppData/AppData.jsx +189 -0
- package/src/Prebuilt/components/AppData/useAppConfig.js +7 -0
- package/src/Prebuilt/components/AppData/useAppLayout.js +6 -0
- package/src/Prebuilt/components/AppData/useChatState.js +18 -0
- package/src/Prebuilt/components/AppData/useSidepane.js +49 -0
- package/src/Prebuilt/components/AppData/useUISettings.js +164 -0
- package/src/Prebuilt/components/AudioLevel/BeamSpeakerLabelsLogging.jsx +16 -0
- package/src/Prebuilt/components/AudioVideoToggle.jsx +67 -0
- package/src/Prebuilt/components/AuthToken.jsx +133 -0
- package/src/Prebuilt/components/BottomActionSheet/BottomActionSheet.jsx +96 -0
- package/src/Prebuilt/components/BottomActionSheet/BottomActionSheet.stories.tsx +46 -0
- package/src/Prebuilt/components/Chat/Chat.jsx +155 -0
- package/src/Prebuilt/components/Chat/ChatBody.jsx +370 -0
- package/src/Prebuilt/components/Chat/ChatFooter.jsx +150 -0
- package/src/Prebuilt/components/Chat/ChatHeader.jsx +67 -0
- package/src/Prebuilt/components/Chat/ChatSelector.jsx +162 -0
- package/src/Prebuilt/components/Chat/useEmojiPickerStyles.js +30 -0
- package/src/Prebuilt/components/Chat/useUnreadCount.js +17 -0
- package/src/Prebuilt/components/Connection/ConnectionIndicator.jsx +80 -0
- package/src/Prebuilt/components/Connection/TileConnection.jsx +40 -0
- package/src/Prebuilt/components/Connection/connectionQualityUtils.js +39 -0
- package/src/Prebuilt/components/EmojiReaction.jsx +138 -0
- package/src/Prebuilt/components/ErrorBoundary.jsx +105 -0
- package/src/Prebuilt/components/FirstPersonDisplay.jsx +50 -0
- package/src/Prebuilt/components/Footer/ChatToggle.jsx +27 -0
- package/src/Prebuilt/components/Footer/ConferencingFooter.jsx +104 -0
- package/src/Prebuilt/components/Footer/StreamingFooter.jsx +71 -0
- package/src/Prebuilt/components/Footer.jsx +8 -0
- package/src/Prebuilt/components/FullPageProgress.jsx +11 -0
- package/src/Prebuilt/components/GoLiveButton.jsx +45 -0
- package/src/Prebuilt/components/HMSVideo/Controls.jsx +21 -0
- package/src/Prebuilt/components/HMSVideo/FullscreenButton.jsx +18 -0
- package/src/Prebuilt/components/HMSVideo/HLSAutoplayBlockedPrompt.jsx +35 -0
- package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx +82 -0
- package/src/Prebuilt/components/HMSVideo/HMSVIdeoUtils.js +27 -0
- package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +11 -0
- package/src/Prebuilt/components/HMSVideo/PlayButton.jsx +13 -0
- package/src/Prebuilt/components/HMSVideo/VideoProgress.jsx +77 -0
- package/src/Prebuilt/components/HMSVideo/VideoTime.jsx +31 -0
- package/src/Prebuilt/components/HMSVideo/VolumeControl.jsx +39 -0
- package/src/Prebuilt/components/HMSVideo/index.js +19 -0
- package/src/Prebuilt/components/Header/AdditionalRoomState.jsx +217 -0
- package/src/Prebuilt/components/Header/AmbientMusic.jsx +88 -0
- package/src/Prebuilt/components/Header/ConferencingHeader.jsx +29 -0
- package/src/Prebuilt/components/Header/Header.jsx +8 -0
- package/src/Prebuilt/components/Header/HeaderComponents.jsx +41 -0
- package/src/Prebuilt/components/Header/ParticipantFilter.jsx +91 -0
- package/src/Prebuilt/components/Header/ParticipantList.jsx +337 -0
- package/src/Prebuilt/components/Header/StreamActions.jsx +225 -0
- package/src/Prebuilt/components/Header/StreamingHeader.jsx +55 -0
- package/src/Prebuilt/components/Header/index.jsx +1 -0
- package/src/Prebuilt/components/HlsStatsOverlay.jsx +101 -0
- package/src/Prebuilt/components/Image.jsx +7 -0
- package/src/Prebuilt/components/Input/KeyboardInputManager.js +107 -0
- package/src/Prebuilt/components/LeaveRoom.jsx +202 -0
- package/src/Prebuilt/components/MetaActions.jsx +45 -0
- package/src/Prebuilt/components/MoreSettings/BulkRoleChangeModal.jsx +139 -0
- package/src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx +92 -0
- package/src/Prebuilt/components/MoreSettings/ChangeSelfRole.jsx +67 -0
- package/src/Prebuilt/components/MoreSettings/EmbedUrl.jsx +106 -0
- package/src/Prebuilt/components/MoreSettings/FullScreenItem.jsx +29 -0
- package/src/Prebuilt/components/MoreSettings/MoreSettings.jsx +225 -0
- package/src/Prebuilt/components/MoreSettings/MuteAllModal.jsx +90 -0
- package/src/Prebuilt/components/Notifications/AutoplayBlockedModal.jsx +38 -0
- package/src/Prebuilt/components/Notifications/InitErrorModal.jsx +39 -0
- package/src/Prebuilt/components/Notifications/MessageNotifications.jsx +25 -0
- package/src/Prebuilt/components/Notifications/Notifications.jsx +151 -0
- package/src/Prebuilt/components/Notifications/PeerNotifications.jsx +45 -0
- package/src/Prebuilt/components/Notifications/PermissionErrorModal.jsx +67 -0
- package/src/Prebuilt/components/Notifications/ReconnectNotifications.jsx +69 -0
- package/src/Prebuilt/components/Notifications/TrackBulkUnmuteModal.jsx +51 -0
- package/src/Prebuilt/components/Notifications/TrackNotifications.jsx +19 -0
- package/src/Prebuilt/components/Notifications/TrackUnmuteModal.jsx +49 -0
- package/src/Prebuilt/components/Notifications/index.jsx +1 -0
- package/src/Prebuilt/components/PIP/PIPComponent.jsx +82 -0
- package/src/Prebuilt/components/PIP/PIPManager.js +296 -0
- package/src/Prebuilt/components/PIP/SetupMediaSession.js +60 -0
- package/src/Prebuilt/components/PIP/index.jsx +11 -0
- package/src/Prebuilt/components/PIP/pip.test.js +72 -0
- package/src/Prebuilt/components/PIP/pipUtils.js +183 -0
- package/src/Prebuilt/components/Pagination.jsx +29 -0
- package/src/Prebuilt/components/Playlist/Playlist.jsx +129 -0
- package/src/Prebuilt/components/Playlist/PlaylistControls.jsx +172 -0
- package/src/Prebuilt/components/Playlist/PlaylistItem.jsx +51 -0
- package/src/Prebuilt/components/Playlist/VideoPlayer.jsx +95 -0
- package/src/Prebuilt/components/PostLeave.jsx +76 -0
- package/src/Prebuilt/components/Preview/PreviewContainer.jsx +51 -0
- package/src/Prebuilt/components/Preview/PreviewJoin.jsx +196 -0
- package/src/Prebuilt/components/Preview/PreviewName.jsx +37 -0
- package/src/Prebuilt/components/RoleChangeModal.jsx +185 -0
- package/src/Prebuilt/components/RoleChangeRequestModal.jsx +26 -0
- package/src/Prebuilt/components/ScreenShare.jsx +45 -0
- package/src/Prebuilt/components/ScreenshareDisplay.jsx +45 -0
- package/src/Prebuilt/components/ScreenshareHintModal.jsx +37 -0
- package/src/Prebuilt/components/ScreenshareTile.jsx +91 -0
- package/src/Prebuilt/components/Settings/DeviceSettings.jsx +220 -0
- package/src/Prebuilt/components/Settings/LayoutSettings.jsx +91 -0
- package/src/Prebuilt/components/Settings/NotificationSettings.jsx +61 -0
- package/src/Prebuilt/components/Settings/SettingsModal.jsx +171 -0
- package/src/Prebuilt/components/Settings/StartRecording.jsx +130 -0
- package/src/Prebuilt/components/Settings/SwitchWithLabel.jsx +40 -0
- package/src/Prebuilt/components/Settings/common.js +15 -0
- package/src/Prebuilt/components/ShareMenuIcon.jsx +26 -0
- package/src/Prebuilt/components/StatsForNerds.jsx +250 -0
- package/src/Prebuilt/components/Streaming/Common.jsx +132 -0
- package/src/Prebuilt/components/Streaming/HLSStreaming.jsx +226 -0
- package/src/Prebuilt/components/Streaming/RTMPIcon.jsx +24 -0
- package/src/Prebuilt/components/Streaming/RTMPStreaming.jsx +336 -0
- package/src/Prebuilt/components/Streaming/ResolutionInput.jsx +88 -0
- package/src/Prebuilt/components/Streaming/StreamingLanding.jsx +76 -0
- package/src/Prebuilt/components/TileMenu.jsx +275 -0
- package/src/Prebuilt/components/Toast/Toast.jsx +17 -0
- package/src/Prebuilt/components/Toast/ToastBatcher.js +57 -0
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +134 -0
- package/src/Prebuilt/components/Toast/ToastContainer.jsx +30 -0
- package/src/Prebuilt/components/Toast/ToastManager.js +44 -0
- package/src/Prebuilt/components/VideoList.jsx +101 -0
- package/src/Prebuilt/components/VideoTile.jsx +177 -0
- package/src/Prebuilt/components/conference.jsx +164 -0
- package/src/Prebuilt/components/gridView.jsx +85 -0
- package/src/Prebuilt/components/hooks/useDropdownList.jsx +23 -0
- package/src/Prebuilt/components/hooks/useDropdownSelection.jsx +6 -0
- package/src/Prebuilt/components/hooks/useFeatures.js +22 -0
- package/src/Prebuilt/components/hooks/useFullscreen.js +43 -0
- package/src/Prebuilt/components/hooks/useMetadata.jsx +52 -0
- package/src/Prebuilt/components/hooks/useNavigation.js +19 -0
- package/src/Prebuilt/components/hooks/usePlaylist.js +25 -0
- package/src/Prebuilt/components/hooks/usePlaylistMusic.js +35 -0
- package/src/Prebuilt/components/hooks/useScreenshareAudio.js +28 -0
- package/src/Prebuilt/components/hooks/useSetPinnedMessage.js +38 -0
- package/src/Prebuilt/components/hooks/useSkipPreview.jsx +20 -0
- package/src/Prebuilt/components/hooks/useUserPreferences.jsx +25 -0
- package/src/Prebuilt/components/init/Init.jsx +58 -0
- package/src/Prebuilt/components/init/initUtils.js +90 -0
- package/src/Prebuilt/components/pdfAnnotator/pdfErrorView.jsx +29 -0
- package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +108 -0
- package/src/Prebuilt/components/pdfAnnotator/pdfHeader.jsx +31 -0
- package/src/Prebuilt/components/pdfAnnotator/pdfInfo.jsx +32 -0
- package/src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx +233 -0
- package/src/Prebuilt/components/pdfAnnotator/submitPdf.jsx +89 -0
- package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +85 -0
- package/src/Prebuilt/components/peerTileUtils.jsx +27 -0
- package/src/Prebuilt/hms.js +7 -0
- package/src/Prebuilt/images/first_person.png +0 -0
- package/src/Prebuilt/index.d.ts +15 -0
- package/src/Prebuilt/index.js +2 -0
- package/src/Prebuilt/layouts/ActiveSpeakerView.jsx +34 -0
- package/src/Prebuilt/layouts/EmbedView.jsx +141 -0
- package/src/Prebuilt/layouts/HLSView.jsx +290 -0
- package/src/Prebuilt/layouts/InsetView.jsx +222 -0
- package/src/Prebuilt/layouts/NonPublisherView.jsx +51 -0
- package/src/Prebuilt/layouts/PDFView.jsx +122 -0
- package/src/Prebuilt/layouts/PinnedTrackView.jsx +59 -0
- package/src/Prebuilt/layouts/SidePane.jsx +51 -0
- package/src/Prebuilt/layouts/WaitingView.jsx +51 -0
- package/src/Prebuilt/layouts/WhiteboardView.jsx +66 -0
- package/src/Prebuilt/layouts/mainGridView.jsx +98 -0
- package/src/Prebuilt/layouts/mainView.jsx +113 -0
- package/src/Prebuilt/layouts/screenShareView.jsx +185 -0
- package/src/Prebuilt/plugins/FlyingEmoji.jsx +132 -0
- package/src/Prebuilt/plugins/RemoteStopScreenshare.jsx +18 -0
- package/src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx +90 -0
- package/src/Prebuilt/plugins/VirtualBackground/vbutils.js +66 -0
- package/src/Prebuilt/plugins/confetti.jsx +60 -0
- package/src/Prebuilt/plugins/transcription/Transcriber.js +216 -0
- package/src/Prebuilt/plugins/transcription/TranscriptionButton.jsx +138 -0
- package/src/Prebuilt/plugins/transcription/index.jsx +1 -0
- package/src/Prebuilt/plugins/whiteboard/PusherCommunicationProvider.js +110 -0
- package/src/Prebuilt/plugins/whiteboard/README.md +29 -0
- package/src/Prebuilt/plugins/whiteboard/ToggleWhiteboard.jsx +43 -0
- package/src/Prebuilt/plugins/whiteboard/Whiteboard.css +12 -0
- package/src/Prebuilt/plugins/whiteboard/Whiteboard.jsx +11 -0
- package/src/Prebuilt/plugins/whiteboard/WhiteboardEvents.js +8 -0
- package/src/Prebuilt/plugins/whiteboard/index.js +3 -0
- package/src/Prebuilt/plugins/whiteboard/useMultiplayerState.js +212 -0
- package/src/Prebuilt/plugins/whiteboard/useWhiteboardMetadata.js +47 -0
- package/src/Prebuilt/primitives/DialogContent.jsx +280 -0
- package/src/Prebuilt/primitives/DropdownTrigger.jsx +46 -0
- package/src/Prebuilt/services/FeatureFlags.jsx +47 -0
- package/src/Prebuilt/services/tokenService.js +49 -0
- package/src/Progress/index.tsx +17 -0
- package/src/QRCode/QRCode.mdx +9 -0
- package/src/QRCode/QRCode.stories.tsx +29 -0
- package/src/QRCode/QRCode.tsx +6 -0
- package/src/QRCode/index.tsx +1 -0
- package/src/RadioGroup/RadioGroup.stories.tsx +32 -0
- package/src/RadioGroup/RadioGroup.tsx +33 -0
- package/src/RadioGroup/index.tsx +1 -0
- package/src/ReactSelect/ReactSelect.stories.tsx +83 -0
- package/src/ReactSelect/ReactSelect.tsx +97 -0
- package/src/ReactSelect/index.ts +1 -0
- package/src/Select/Select.stories.tsx +33 -0
- package/src/Select/Select.tsx +63 -0
- package/src/Select/index.ts +1 -0
- package/src/Slider/Slider.stories.tsx +21 -0
- package/src/Slider/Slider.tsx +70 -0
- package/src/Slider/index.ts +1 -0
- package/src/Stats/Stats.tsx +211 -0
- package/src/Stats/StyledStats.tsx +57 -0
- package/src/Stats/formatBytes.ts +19 -0
- package/src/Stats/index.tsx +1 -0
- package/src/Switch/Switch.mdx +11 -0
- package/src/Switch/Switch.stories.tsx +46 -0
- package/src/Switch/Switch.tsx +52 -0
- package/src/Switch/index.ts +1 -0
- package/src/Tabs/Tabs.stories.tsx +77 -0
- package/src/Tabs/Tabs.tsx +41 -0
- package/src/Tabs/index.tsx +1 -0
- package/src/Text/Text.stories.tsx +21 -0
- package/src/Text/Text.tsx +149 -0
- package/src/Text/index.tsx +1 -0
- package/src/Theme/Theme.stories.mdx +8 -0
- package/src/Theme/ThemeProvider.tsx +104 -0
- package/src/Theme/ThemeStory.jsx +58 -0
- package/src/Theme/base.config.ts +264 -0
- package/src/Theme/index.tsx +3 -0
- package/src/Theme/stitches.config.ts +100 -0
- package/src/Theme/themes.ts +70 -0
- package/src/Theme/useSSR.tsx +24 -0
- package/src/TileMenu/StyledMenuTile.tsx +101 -0
- package/src/TileMenu/TileMenu.tsx +96 -0
- package/src/TileMenu/index.tsx +1 -0
- package/src/Toast/AppToast.stories.tsx +56 -0
- package/src/Toast/Toast.mdx +19 -0
- package/src/Toast/Toast.stories.tsx +57 -0
- package/src/Toast/Toast.tsx +168 -0
- package/src/Toast/index.tsx +1 -0
- package/src/Tooltip/Tooltip.stories.tsx +62 -0
- package/src/Tooltip/Tooltip.tsx +79 -0
- package/src/Tooltip/index.ts +1 -0
- package/src/Video/UseVideo.mdx +22 -0
- package/src/Video/UseVideo.stories.tsx +26 -0
- package/src/Video/Video.mdx +24 -0
- package/src/Video/Video.stories.tsx +27 -0
- package/src/Video/Video.tsx +61 -0
- package/src/Video/index.tsx +1 -0
- package/src/VideoList/StyledVideoList.tsx +39 -0
- package/src/VideoList/VideoList.stories.tsx +92 -0
- package/src/VideoList/index.tsx +2 -0
- package/src/VideoList/videoListUtils.tsx +20 -0
- package/src/VideoTile/StyledVideoTile.tsx +148 -0
- package/src/VideoTile/VideoTile.mdx +28 -0
- package/src/VideoTile/VideoTile.stories.tsx +32 -0
- package/src/VideoTile/index.tsx +1 -0
- package/src/fixtures/chats.ts +25 -0
- package/src/fixtures/peers.ts +24 -0
- package/src/fixtures/tracks.ts +11 -0
- package/src/index.ts +38 -0
- package/src/store/SetupFakeStore.ts +33 -0
- package/src/store/StorybookSDK.ts +229 -0
- package/src/utils/animations.ts +90 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/styles.ts +22 -0
@@ -0,0 +1,67 @@
|
|
1
|
+
import React, { useMemo } from 'react';
|
2
|
+
import { useMedia } from 'react-use';
|
3
|
+
import {
|
4
|
+
selectLocalPeerID,
|
5
|
+
selectLocalPeerRoleName,
|
6
|
+
selectPermissions,
|
7
|
+
useHMSActions,
|
8
|
+
useHMSStore,
|
9
|
+
} from '@100mslive/react-sdk';
|
10
|
+
import { ArrowRightIcon, CheckIcon, PersonIcon } from '@100mslive/react-icons';
|
11
|
+
import { config, Dropdown, Text } from '../../../';
|
12
|
+
import { ToastManager } from '../Toast/ToastManager';
|
13
|
+
import { useAppLayout } from '../AppData/useAppLayout';
|
14
|
+
import { useFilteredRoles } from '../../common/hooks';
|
15
|
+
import { arrayIntersection } from '../../common/utils';
|
16
|
+
|
17
|
+
export const ChangeSelfRole = ({ onClick }) => {
|
18
|
+
const roles = useFilteredRoles();
|
19
|
+
const permissions = useHMSStore(selectPermissions);
|
20
|
+
const localPeerId = useHMSStore(selectLocalPeerID);
|
21
|
+
const localPeerRole = useHMSStore(selectLocalPeerRoleName);
|
22
|
+
const hmsActions = useHMSActions();
|
23
|
+
const hideTriggerItem = useMedia(config.media.sm);
|
24
|
+
const selfRoleChangeTo = useAppLayout('selfRoleChangeTo');
|
25
|
+
const availableSelfChangeRoles = useMemo(() => arrayIntersection(selfRoleChangeTo, roles), [roles, selfRoleChangeTo]);
|
26
|
+
|
27
|
+
if (!permissions.changeRole) {
|
28
|
+
return null;
|
29
|
+
}
|
30
|
+
return hideTriggerItem ? (
|
31
|
+
<Dropdown.Item onClick={onClick}>
|
32
|
+
<PersonIcon />
|
33
|
+
<Text variant="sm" css={{ mx: '$4' }}>
|
34
|
+
Change My Role
|
35
|
+
</Text>
|
36
|
+
</Dropdown.Item>
|
37
|
+
) : (
|
38
|
+
<Dropdown.SubMenu>
|
39
|
+
<Dropdown.TriggerItem data-testid="change_my_role_btn">
|
40
|
+
<PersonIcon />
|
41
|
+
<Text variant="sm" css={{ flex: '1 1 0', mx: '$4' }}>
|
42
|
+
Change My Role
|
43
|
+
</Text>
|
44
|
+
<ArrowRightIcon />
|
45
|
+
</Dropdown.TriggerItem>
|
46
|
+
<Dropdown.SubMenuContent sideOffset={8} alignOffset={-5} css={{ '@md': { w: '$64' } }}>
|
47
|
+
{availableSelfChangeRoles.map(role => (
|
48
|
+
<Dropdown.Item
|
49
|
+
key={role}
|
50
|
+
css={{ justifyContent: 'space-between' }}
|
51
|
+
onClick={async () => {
|
52
|
+
try {
|
53
|
+
await hmsActions.changeRole(localPeerId, role, true);
|
54
|
+
} catch (error) {
|
55
|
+
ToastManager.addToast({ title: error.message });
|
56
|
+
}
|
57
|
+
}}
|
58
|
+
data-testid={'change_to_role_' + role}
|
59
|
+
>
|
60
|
+
<Text variant="sm">{role}</Text>
|
61
|
+
{localPeerRole === role && <CheckIcon width={16} height={16} />}
|
62
|
+
</Dropdown.Item>
|
63
|
+
))}
|
64
|
+
</Dropdown.SubMenuContent>
|
65
|
+
</Dropdown.SubMenu>
|
66
|
+
);
|
67
|
+
};
|
@@ -0,0 +1,106 @@
|
|
1
|
+
import React, { useState } from 'react';
|
2
|
+
import { ViewIcon } from '@100mslive/react-icons';
|
3
|
+
import { Button, Dialog, Dropdown, Text } from '../../../';
|
4
|
+
import { DialogContent, DialogInput, DialogRow } from '../../primitives/DialogContent';
|
5
|
+
import { useSetAppDataByKey } from '../AppData/useUISettings';
|
6
|
+
import { APP_DATA } from '../../common/constants';
|
7
|
+
|
8
|
+
export const EmbedUrl = ({ setShowOpenUrl }) => {
|
9
|
+
if (!window.CropTarget) {
|
10
|
+
return null;
|
11
|
+
}
|
12
|
+
|
13
|
+
return (
|
14
|
+
<Dropdown.Item
|
15
|
+
onClick={() => {
|
16
|
+
setShowOpenUrl(true);
|
17
|
+
}}
|
18
|
+
data-testid="embed_url_btn"
|
19
|
+
>
|
20
|
+
<ViewIcon />
|
21
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
22
|
+
Embed URL
|
23
|
+
</Text>
|
24
|
+
</Dropdown.Item>
|
25
|
+
);
|
26
|
+
};
|
27
|
+
|
28
|
+
export function EmbedUrlModal({ onOpenChange }) {
|
29
|
+
const [embedConfig, setEmbedConfig] = useSetAppDataByKey(APP_DATA.embedConfig);
|
30
|
+
const [url, setUrl] = useState(embedConfig?.url || '');
|
31
|
+
|
32
|
+
const isAnythingEmbedded = !!embedConfig?.url;
|
33
|
+
const isModifying = isAnythingEmbedded && url && url !== embedConfig.url;
|
34
|
+
|
35
|
+
return (
|
36
|
+
<Dialog.Root defaultOpen onOpenChange={onOpenChange}>
|
37
|
+
<DialogContent title="Embed URL" Icon={ViewIcon}>
|
38
|
+
<DialogInput title="URL" value={url} onChange={setUrl} placeholder="https://www.tldraw.com/" type="url" />
|
39
|
+
<DialogRow>
|
40
|
+
<Text>
|
41
|
+
Embed a url and share with everyone in the room. Ensure that you're sharing the current tab when the prompt
|
42
|
+
opens. Note that not all websites support being embedded.
|
43
|
+
</Text>
|
44
|
+
</DialogRow>
|
45
|
+
<DialogRow justify="end">
|
46
|
+
{isAnythingEmbedded ? (
|
47
|
+
<>
|
48
|
+
<Button
|
49
|
+
variant="primary"
|
50
|
+
type="submit"
|
51
|
+
disabled={!isModifying}
|
52
|
+
onClick={() => {
|
53
|
+
setEmbedConfig({ url, shareScreen: embedConfig.shareScreen });
|
54
|
+
onOpenChange(false);
|
55
|
+
}}
|
56
|
+
data-testid="embed_url_btn"
|
57
|
+
css={{ mr: '$4' }}
|
58
|
+
>
|
59
|
+
Update Embed
|
60
|
+
</Button>
|
61
|
+
<Button
|
62
|
+
variant="danger"
|
63
|
+
type="submit"
|
64
|
+
onClick={() => {
|
65
|
+
setEmbedConfig({ url: '' });
|
66
|
+
onOpenChange(false);
|
67
|
+
}}
|
68
|
+
data-testid="embed_url_btn"
|
69
|
+
>
|
70
|
+
Stop Embed
|
71
|
+
</Button>
|
72
|
+
</>
|
73
|
+
) : (
|
74
|
+
<>
|
75
|
+
<Button
|
76
|
+
variant="primary"
|
77
|
+
type="submit"
|
78
|
+
disabled={!url.trim()}
|
79
|
+
onClick={() => {
|
80
|
+
setEmbedConfig({ url });
|
81
|
+
onOpenChange(false);
|
82
|
+
}}
|
83
|
+
data-testid="embed_url_btn"
|
84
|
+
css={{ mr: '$4' }}
|
85
|
+
>
|
86
|
+
Just Embed
|
87
|
+
</Button>
|
88
|
+
<Button
|
89
|
+
variant="primary"
|
90
|
+
type="submit"
|
91
|
+
disabled={!url.trim()}
|
92
|
+
onClick={() => {
|
93
|
+
setEmbedConfig({ url, shareScreen: true });
|
94
|
+
onOpenChange(false);
|
95
|
+
}}
|
96
|
+
data-testid="embed_url_btn"
|
97
|
+
>
|
98
|
+
Embed and Share
|
99
|
+
</Button>
|
100
|
+
</>
|
101
|
+
)}
|
102
|
+
</DialogRow>
|
103
|
+
</DialogContent>
|
104
|
+
</Dialog.Root>
|
105
|
+
);
|
106
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ExpandIcon } from '@100mslive/react-icons';
|
3
|
+
import { Dropdown, Text } from '../../../';
|
4
|
+
import { useIsFeatureEnabled } from '../hooks/useFeatures';
|
5
|
+
import { useFullscreen } from '../hooks/useFullscreen';
|
6
|
+
import { FEATURE_LIST } from '../../common/constants';
|
7
|
+
|
8
|
+
export const FullScreenItem = () => {
|
9
|
+
const { allowed, isFullscreen, toggleFullscreen } = useFullscreen();
|
10
|
+
const isFullscreenEnabled = useIsFeatureEnabled(FEATURE_LIST.FULLSCREEN);
|
11
|
+
|
12
|
+
if (!isFullscreenEnabled || !allowed) {
|
13
|
+
return null;
|
14
|
+
}
|
15
|
+
|
16
|
+
return (
|
17
|
+
<Dropdown.Item
|
18
|
+
onClick={() => {
|
19
|
+
toggleFullscreen();
|
20
|
+
}}
|
21
|
+
data-testid="full_screen_btn"
|
22
|
+
>
|
23
|
+
<ExpandIcon />
|
24
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
25
|
+
{isFullscreen ? 'Exit ' : 'Go '}Fullscreen
|
26
|
+
</Text>
|
27
|
+
</Dropdown.Item>
|
28
|
+
);
|
29
|
+
};
|
@@ -0,0 +1,225 @@
|
|
1
|
+
import React, { Fragment, useState } from 'react';
|
2
|
+
import { useMedia } from 'react-use';
|
3
|
+
import Hls from 'hls.js';
|
4
|
+
import {
|
5
|
+
selectAppData,
|
6
|
+
selectIsAllowedToPublish,
|
7
|
+
selectLocalPeerID,
|
8
|
+
selectLocalPeerRoleName,
|
9
|
+
selectPermissions,
|
10
|
+
useHMSActions,
|
11
|
+
useHMSStore,
|
12
|
+
useRecordingStreaming,
|
13
|
+
} from '@100mslive/react-sdk';
|
14
|
+
import {
|
15
|
+
ChangeRoleIcon,
|
16
|
+
CheckIcon,
|
17
|
+
InfoIcon,
|
18
|
+
MicOffIcon,
|
19
|
+
PencilIcon,
|
20
|
+
RecordIcon,
|
21
|
+
SettingsIcon,
|
22
|
+
VerticalMenuIcon,
|
23
|
+
} from '@100mslive/react-icons';
|
24
|
+
import { Box, Checkbox, config as cssConfig, Dropdown, Flex, Text, Tooltip } from '../../../';
|
25
|
+
import IconButton from '../../IconButton';
|
26
|
+
import { RoleChangeModal } from '../RoleChangeModal';
|
27
|
+
import SettingsModal from '../Settings/SettingsModal';
|
28
|
+
import StartRecording from '../Settings/StartRecording';
|
29
|
+
import { StatsForNerds } from '../StatsForNerds';
|
30
|
+
import { BulkRoleChangeModal } from './BulkRoleChangeModal';
|
31
|
+
import { ChangeNameModal } from './ChangeNameModal';
|
32
|
+
import { ChangeSelfRole } from './ChangeSelfRole';
|
33
|
+
import { EmbedUrl, EmbedUrlModal } from './EmbedUrl';
|
34
|
+
import { FullScreenItem } from './FullScreenItem';
|
35
|
+
import { MuteAllModal } from './MuteAllModal';
|
36
|
+
import { useDropdownList } from '../hooks/useDropdownList';
|
37
|
+
import { useIsFeatureEnabled } from '../hooks/useFeatures';
|
38
|
+
import { FeatureFlags } from '../../services/FeatureFlags';
|
39
|
+
import { APP_DATA, FEATURE_LIST, isAndroid, isIOS, isMacOS } from '../../common/constants';
|
40
|
+
|
41
|
+
const isMobileOS = isAndroid || isIOS;
|
42
|
+
|
43
|
+
const MODALS = {
|
44
|
+
CHANGE_NAME: 'changeName',
|
45
|
+
SELF_ROLE_CHANGE: 'selfRoleChange',
|
46
|
+
MORE_SETTINGS: 'moreSettings',
|
47
|
+
START_RECORDING: 'startRecording',
|
48
|
+
DEVICE_SETTINGS: 'deviceSettings',
|
49
|
+
STATS_FOR_NERDS: 'statsForNerds',
|
50
|
+
BULK_ROLE_CHANGE: 'bulkRoleChange',
|
51
|
+
MUTE_ALL: 'muteAll',
|
52
|
+
EMBED_URL: 'embedUrl',
|
53
|
+
};
|
54
|
+
|
55
|
+
export const MoreSettings = () => {
|
56
|
+
const permissions = useHMSStore(selectPermissions);
|
57
|
+
const isAllowedToPublish = useHMSStore(selectIsAllowedToPublish);
|
58
|
+
const localPeerId = useHMSStore(selectLocalPeerID);
|
59
|
+
const localPeerRole = useHMSStore(selectLocalPeerRoleName);
|
60
|
+
const hmsActions = useHMSActions();
|
61
|
+
const enablHlsStats = useHMSStore(selectAppData(APP_DATA.hlsStats));
|
62
|
+
const isMobile = useMedia(cssConfig.media.md);
|
63
|
+
const { isBrowserRecordingOn } = useRecordingStreaming();
|
64
|
+
const isChangeNameEnabled = useIsFeatureEnabled(FEATURE_LIST.CHANGE_NAME);
|
65
|
+
const isEmbedEnabled = useIsFeatureEnabled(FEATURE_LIST.EMBED_URL);
|
66
|
+
const isSFNEnabled = useIsFeatureEnabled(FEATURE_LIST.STARTS_FOR_NERDS);
|
67
|
+
const [openModals, setOpenModals] = useState(new Set());
|
68
|
+
useDropdownList({ open: openModals.size > 0, name: 'MoreSettings' });
|
69
|
+
|
70
|
+
const updateState = (modalName, value) => {
|
71
|
+
setOpenModals(modals => {
|
72
|
+
const copy = new Set(modals);
|
73
|
+
if (value) {
|
74
|
+
copy.add(modalName);
|
75
|
+
} else {
|
76
|
+
copy.delete(modalName);
|
77
|
+
}
|
78
|
+
return copy;
|
79
|
+
});
|
80
|
+
};
|
81
|
+
|
82
|
+
return (
|
83
|
+
<Fragment>
|
84
|
+
<Dropdown.Root
|
85
|
+
open={openModals.has(MODALS.MORE_SETTINGS)}
|
86
|
+
onOpenChange={value => updateState(MODALS.MORE_SETTINGS, value)}
|
87
|
+
>
|
88
|
+
<Dropdown.Trigger asChild data-testid="more_settings_btn">
|
89
|
+
<IconButton>
|
90
|
+
<Tooltip title="More options">
|
91
|
+
<Box>
|
92
|
+
<VerticalMenuIcon />
|
93
|
+
</Box>
|
94
|
+
</Tooltip>
|
95
|
+
</IconButton>
|
96
|
+
</Dropdown.Trigger>
|
97
|
+
|
98
|
+
<Dropdown.Content
|
99
|
+
sideOffset={5}
|
100
|
+
align="center"
|
101
|
+
css={{
|
102
|
+
maxHeight: '$96',
|
103
|
+
'@md': { w: '$64' },
|
104
|
+
"div[role='separator']:first-child": {
|
105
|
+
display: 'none',
|
106
|
+
},
|
107
|
+
}}
|
108
|
+
>
|
109
|
+
{isMobile && permissions?.browserRecording ? (
|
110
|
+
<>
|
111
|
+
<Dropdown.Item onClick={() => updateState(MODALS.START_RECORDING, true)}>
|
112
|
+
<RecordIcon />
|
113
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
114
|
+
{isBrowserRecordingOn ? 'Stop' : 'Start'} Recording
|
115
|
+
</Text>
|
116
|
+
</Dropdown.Item>
|
117
|
+
<Dropdown.ItemSeparator />
|
118
|
+
</>
|
119
|
+
) : null}
|
120
|
+
{isChangeNameEnabled && (
|
121
|
+
<Dropdown.Item onClick={() => updateState(MODALS.CHANGE_NAME, true)} data-testid="change_name_btn">
|
122
|
+
<PencilIcon />
|
123
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
124
|
+
Change Name
|
125
|
+
</Text>
|
126
|
+
</Dropdown.Item>
|
127
|
+
)}
|
128
|
+
<ChangeSelfRole onClick={() => updateState(MODALS.SELF_ROLE_CHANGE, true)} />
|
129
|
+
{permissions?.changeRole && (
|
130
|
+
<Dropdown.Item
|
131
|
+
onClick={() => updateState(MODALS.BULK_ROLE_CHANGE, true)}
|
132
|
+
data-testid="bulk_role_change_btn"
|
133
|
+
>
|
134
|
+
<ChangeRoleIcon />
|
135
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
136
|
+
Bulk Role Change
|
137
|
+
</Text>
|
138
|
+
</Dropdown.Item>
|
139
|
+
)}
|
140
|
+
<FullScreenItem />
|
141
|
+
{isAllowedToPublish.screen && isEmbedEnabled && (
|
142
|
+
<EmbedUrl setShowOpenUrl={() => updateState(MODALS.EMBED_URL, true)} />
|
143
|
+
)}
|
144
|
+
{permissions.mute && (
|
145
|
+
<Dropdown.Item onClick={() => updateState(MODALS.MUTE_ALL, true)} data-testid="mute_all_btn">
|
146
|
+
<MicOffIcon />
|
147
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
148
|
+
Mute All
|
149
|
+
</Text>
|
150
|
+
</Dropdown.Item>
|
151
|
+
)}
|
152
|
+
<Dropdown.ItemSeparator />
|
153
|
+
<Dropdown.Item onClick={() => updateState(MODALS.DEVICE_SETTINGS, true)} data-testid="device_settings_btn">
|
154
|
+
<SettingsIcon />
|
155
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
156
|
+
Settings
|
157
|
+
</Text>
|
158
|
+
</Dropdown.Item>
|
159
|
+
{FeatureFlags.enableStatsForNerds &&
|
160
|
+
isSFNEnabled &&
|
161
|
+
(localPeerRole === 'hls-viewer' ? (
|
162
|
+
Hls.isSupported() ? (
|
163
|
+
<Dropdown.Item
|
164
|
+
onClick={() => hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats)}
|
165
|
+
data-testid="hls_stats"
|
166
|
+
>
|
167
|
+
<Checkbox.Root
|
168
|
+
css={{ margin: '$2' }}
|
169
|
+
checked={enablHlsStats}
|
170
|
+
onCheckedChange={() => hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats)}
|
171
|
+
>
|
172
|
+
<Checkbox.Indicator>
|
173
|
+
<CheckIcon width={16} height={16} />
|
174
|
+
</Checkbox.Indicator>
|
175
|
+
</Checkbox.Root>
|
176
|
+
<Flex justify="between" css={{ width: '100%' }}>
|
177
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
178
|
+
Show HLS Stats
|
179
|
+
</Text>
|
180
|
+
{!isMobileOS ? (
|
181
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
182
|
+
{`${isMacOS ? '⌘' : 'ctrl'} + ]`}
|
183
|
+
</Text>
|
184
|
+
) : null}
|
185
|
+
</Flex>
|
186
|
+
</Dropdown.Item>
|
187
|
+
) : null
|
188
|
+
) : (
|
189
|
+
<Dropdown.Item
|
190
|
+
onClick={() => updateState(MODALS.STATS_FOR_NERDS, true)}
|
191
|
+
data-testid="stats_for_nreds_btn"
|
192
|
+
>
|
193
|
+
<InfoIcon />
|
194
|
+
<Text variant="sm" css={{ ml: '$4' }}>
|
195
|
+
Stats for Nerds
|
196
|
+
</Text>
|
197
|
+
</Dropdown.Item>
|
198
|
+
))}
|
199
|
+
</Dropdown.Content>
|
200
|
+
</Dropdown.Root>
|
201
|
+
{openModals.has(MODALS.BULK_ROLE_CHANGE) && (
|
202
|
+
<BulkRoleChangeModal onOpenChange={value => updateState(MODALS.BULK_ROLE_CHANGE, value)} />
|
203
|
+
)}
|
204
|
+
{openModals.has(MODALS.MUTE_ALL) && <MuteAllModal onOpenChange={value => updateState(MODALS.MUTE_ALL, value)} />}
|
205
|
+
{openModals.has(MODALS.CHANGE_NAME) && (
|
206
|
+
<ChangeNameModal onOpenChange={value => updateState(MODALS.CHANGE_NAME, value)} />
|
207
|
+
)}
|
208
|
+
{openModals.has(MODALS.DEVICE_SETTINGS) && (
|
209
|
+
<SettingsModal open onOpenChange={value => updateState(MODALS.DEVICE_SETTINGS, value)} />
|
210
|
+
)}
|
211
|
+
{FeatureFlags.enableStatsForNerds && openModals.has(MODALS.STATS_FOR_NERDS) && (
|
212
|
+
<StatsForNerds open onOpenChange={value => updateState(MODALS.STATS_FOR_NERDS, value)} />
|
213
|
+
)}
|
214
|
+
{openModals.has(MODALS.SELF_ROLE_CHANGE) && (
|
215
|
+
<RoleChangeModal peerId={localPeerId} onOpenChange={value => updateState(MODALS.SELF_ROLE_CHANGE, value)} />
|
216
|
+
)}
|
217
|
+
{openModals.has(MODALS.START_RECORDING) && (
|
218
|
+
<StartRecording open onOpenChange={value => updateState(MODALS.START_RECORDING, value)} />
|
219
|
+
)}
|
220
|
+
{openModals.has(MODALS.EMBED_URL) && (
|
221
|
+
<EmbedUrlModal onOpenChange={value => updateState(MODALS.EMBED_URL, value)} />
|
222
|
+
)}
|
223
|
+
</Fragment>
|
224
|
+
);
|
225
|
+
};
|
@@ -0,0 +1,90 @@
|
|
1
|
+
import React, { useCallback, useState } from 'react';
|
2
|
+
import { useHMSActions } from '@100mslive/react-sdk';
|
3
|
+
import { MicOffIcon } from '@100mslive/react-icons';
|
4
|
+
import { Button, Dialog, Flex, Label, RadioGroup, Text } from '../../../';
|
5
|
+
import { DialogContent, DialogRow, DialogSelect } from '../../primitives/DialogContent';
|
6
|
+
import { useFilteredRoles } from '../../common/hooks';
|
7
|
+
|
8
|
+
const trackSourceOptions = [
|
9
|
+
{ label: 'All Track Sources', value: '' },
|
10
|
+
{ label: 'regular', value: 'regular' },
|
11
|
+
{ label: 'screen', value: 'screen' },
|
12
|
+
{ label: 'audioplaylist', value: 'audioplaylist' },
|
13
|
+
{ label: 'videoplaylist', value: 'videoplaylist' },
|
14
|
+
];
|
15
|
+
const trackTypeOptions = [
|
16
|
+
{ label: 'All Track Types', value: '' },
|
17
|
+
{ label: 'audio', value: 'audio' },
|
18
|
+
{ label: 'video', value: 'video' },
|
19
|
+
];
|
20
|
+
export const MuteAllModal = ({ onOpenChange }) => {
|
21
|
+
const roles = useFilteredRoles();
|
22
|
+
const hmsActions = useHMSActions();
|
23
|
+
const [enabled, setEnabled] = useState(false);
|
24
|
+
const [trackType, setTrackType] = useState();
|
25
|
+
const [selectedRole, setRole] = useState();
|
26
|
+
const [selectedSource, setSource] = useState();
|
27
|
+
|
28
|
+
const muteAll = useCallback(async () => {
|
29
|
+
await hmsActions.setRemoteTracksEnabled({
|
30
|
+
enabled: enabled,
|
31
|
+
type: trackType,
|
32
|
+
source: selectedSource,
|
33
|
+
roles: selectedRole ? [selectedRole] : undefined,
|
34
|
+
});
|
35
|
+
onOpenChange(false);
|
36
|
+
}, [selectedRole, enabled, trackType, selectedSource, hmsActions, onOpenChange]);
|
37
|
+
|
38
|
+
return (
|
39
|
+
<Dialog.Root defaultOpen onOpenChange={onOpenChange}>
|
40
|
+
<DialogContent title="Mute/Unmute Remote Tracks" Icon={MicOffIcon}>
|
41
|
+
<DialogSelect
|
42
|
+
title="Role"
|
43
|
+
options={[{ label: 'All Roles', value: '' }, ...roles.map(role => ({ label: role, value: role }))]}
|
44
|
+
selected={selectedRole}
|
45
|
+
keyField="value"
|
46
|
+
labelField="label"
|
47
|
+
onChange={setRole}
|
48
|
+
/>
|
49
|
+
<DialogSelect
|
50
|
+
title="Track type"
|
51
|
+
options={trackTypeOptions}
|
52
|
+
selected={trackType}
|
53
|
+
onChange={setTrackType}
|
54
|
+
keyField="value"
|
55
|
+
labelField="label"
|
56
|
+
/>
|
57
|
+
<DialogSelect
|
58
|
+
title="Track source"
|
59
|
+
options={trackSourceOptions}
|
60
|
+
selected={selectedSource}
|
61
|
+
onChange={setSource}
|
62
|
+
keyField="value"
|
63
|
+
labelField="label"
|
64
|
+
/>
|
65
|
+
<DialogRow>
|
66
|
+
<Text variant="md">Track status</Text>
|
67
|
+
<RadioGroup.Root value={enabled} onValueChange={setEnabled}>
|
68
|
+
<Flex align="center" css={{ mr: '$8' }}>
|
69
|
+
<RadioGroup.Item value={false} id="trackDisableRadio" css={{ mr: '$4' }}>
|
70
|
+
<RadioGroup.Indicator />
|
71
|
+
</RadioGroup.Item>
|
72
|
+
<Label htmlFor="trackDisableRadio">Mute</Label>
|
73
|
+
</Flex>
|
74
|
+
<Flex align="center" css={{ cursor: 'pointer' }}>
|
75
|
+
<RadioGroup.Item value={true} id="trackEnableRadio" css={{ mr: '$4' }}>
|
76
|
+
<RadioGroup.Indicator />
|
77
|
+
</RadioGroup.Item>
|
78
|
+
<Label htmlFor="trackEnableRadio">Request Unmute</Label>
|
79
|
+
</Flex>
|
80
|
+
</RadioGroup.Root>
|
81
|
+
</DialogRow>
|
82
|
+
<DialogRow justify="end">
|
83
|
+
<Button variant="primary" onClick={muteAll}>
|
84
|
+
Apply
|
85
|
+
</Button>
|
86
|
+
</DialogRow>
|
87
|
+
</DialogContent>
|
88
|
+
</Dialog.Root>
|
89
|
+
);
|
90
|
+
};
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { useAutoplayError } from '@100mslive/react-sdk';
|
3
|
+
import { Button, Dialog, Text } from '../../../';
|
4
|
+
import { DialogContent, DialogRow } from '../../primitives/DialogContent';
|
5
|
+
|
6
|
+
export function AutoplayBlockedModal() {
|
7
|
+
const { error, resetError, unblockAudio } = useAutoplayError();
|
8
|
+
return (
|
9
|
+
<Dialog.Root
|
10
|
+
open={!!error}
|
11
|
+
onOpenChange={value => {
|
12
|
+
if (!value) {
|
13
|
+
unblockAudio();
|
14
|
+
}
|
15
|
+
resetError();
|
16
|
+
}}
|
17
|
+
>
|
18
|
+
<DialogContent title="Permission Error" closeable={false}>
|
19
|
+
<DialogRow>
|
20
|
+
<Text variant="md">
|
21
|
+
The browser wants us to get a confirmation for playing the Audio. Please allow audio to proceed.
|
22
|
+
</Text>
|
23
|
+
</DialogRow>
|
24
|
+
<DialogRow justify="end">
|
25
|
+
<Button
|
26
|
+
variant="primary"
|
27
|
+
onClick={() => {
|
28
|
+
unblockAudio();
|
29
|
+
resetError();
|
30
|
+
}}
|
31
|
+
>
|
32
|
+
Allow Audio
|
33
|
+
</Button>
|
34
|
+
</DialogRow>
|
35
|
+
</DialogContent>
|
36
|
+
</Dialog.Root>
|
37
|
+
);
|
38
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
2
|
+
import { Text } from '../../../';
|
3
|
+
import { ErrorDialog } from '../../primitives/DialogContent';
|
4
|
+
|
5
|
+
export const InitErrorModal = ({ notification }) => {
|
6
|
+
const [showModal, setShowModal] = useState(false);
|
7
|
+
const [info, setInfo] = useState({ title: 'Init Error', description: '' });
|
8
|
+
|
9
|
+
useEffect(() => {
|
10
|
+
const data = notification?.data;
|
11
|
+
if (!data || data.action !== 'INIT') {
|
12
|
+
return;
|
13
|
+
}
|
14
|
+
let description;
|
15
|
+
let title;
|
16
|
+
if (data.description.includes('role is invalid')) {
|
17
|
+
description = 'This role does not exist for the given room. Try again with a valid role.';
|
18
|
+
title = 'Invalid Role';
|
19
|
+
} else if (data.description.includes('room is not active')) {
|
20
|
+
title = 'Room is disabled';
|
21
|
+
description =
|
22
|
+
'This room is disabled and cannot be joined. To enable the room, use the 100ms dashboard or the API.';
|
23
|
+
} else {
|
24
|
+
description = data.description;
|
25
|
+
title = 'Init Error';
|
26
|
+
}
|
27
|
+
setInfo({ title, description });
|
28
|
+
setShowModal(true);
|
29
|
+
}, [notification]);
|
30
|
+
|
31
|
+
return (
|
32
|
+
<ErrorDialog open={showModal} onOpenChange={setShowModal} title={info.title}>
|
33
|
+
<Text variant="sm" css={{ wordBreak: 'break-word' }}>
|
34
|
+
{info.description} <br />
|
35
|
+
Current URL - {window.location.href}
|
36
|
+
</Text>
|
37
|
+
</ErrorDialog>
|
38
|
+
);
|
39
|
+
};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { useEffect } from 'react';
|
2
|
+
import { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';
|
3
|
+
import { ToastBatcher } from '../Toast/ToastBatcher';
|
4
|
+
import { useIsHeadless, useSubscribedNotifications } from '../AppData/useUISettings';
|
5
|
+
import { useIsFeatureEnabled } from '../hooks/useFeatures';
|
6
|
+
import { FEATURE_LIST, SUBSCRIBED_NOTIFICATIONS } from '../../common/constants';
|
7
|
+
|
8
|
+
export const MessageNotifications = () => {
|
9
|
+
const notification = useHMSNotifications(HMSNotificationTypes.NEW_MESSAGE);
|
10
|
+
const isChatEnabled = useIsFeatureEnabled(FEATURE_LIST.CHAT);
|
11
|
+
const isNewMessageSubscribed = useSubscribedNotifications(SUBSCRIBED_NOTIFICATIONS.NEW_MESSAGE);
|
12
|
+
const isHeadless = useIsHeadless();
|
13
|
+
useEffect(() => {
|
14
|
+
if (!notification) {
|
15
|
+
return;
|
16
|
+
}
|
17
|
+
console.debug(`[${notification.type}]`, notification);
|
18
|
+
if (!isNewMessageSubscribed || notification.data?.ignored || !isChatEnabled) {
|
19
|
+
return;
|
20
|
+
}
|
21
|
+
ToastBatcher.showToast({ notification });
|
22
|
+
}, [notification, isNewMessageSubscribed, isHeadless, isChatEnabled]);
|
23
|
+
|
24
|
+
return null;
|
25
|
+
};
|