@100mslive/roomkit-react 0.4.3-alpha.2 → 0.4.3-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Prebuilt/App.d.ts +0 -1
- package/dist/Prebuilt/AppContext.d.ts +0 -1
- package/dist/index.cjs.css +194 -219
- package/dist/index.cjs.css.map +3 -3
- package/dist/index.cjs.js +8 -56
- package/dist/index.cjs.js.map +3 -3
- package/dist/index.css +194 -219
- package/dist/index.css.map +3 -3
- package/dist/index.js +8 -56
- package/dist/index.js.map +3 -3
- package/dist/meta.cjs.json +23 -41
- package/dist/meta.esbuild.json +23 -41
- package/package.json +8 -9
- package/src/Accordion/Accordion.tsx +0 -88
- package/src/Accordion/index.ts +0 -8
- package/src/AudioLevel/AudioLevel.tsx +0 -84
- package/src/AudioLevel/audio-level.png +0 -0
- package/src/AudioLevel/index.ts +0 -2
- package/src/AudioLevel/useBorderAudioLevel.tsx +0 -34
- package/src/Avatar/Avatar.tsx +0 -60
- package/src/Avatar/getAvatarBg.ts +0 -50
- package/src/Avatar/index.ts +0 -1
- package/src/Button/Button.tsx +0 -210
- package/src/Button/index.tsx +0 -1
- package/src/Checkbox/Checkbox.tsx +0 -35
- package/src/Checkbox/index.tsx +0 -1
- package/src/Collapsible/Collapsible.tsx +0 -34
- package/src/Collapsible/index.tsx +0 -1
- package/src/Diagnostics/AudioTest.tsx +0 -188
- package/src/Diagnostics/BrowserTest.tsx +0 -141
- package/src/Diagnostics/ConnectivityTest.tsx +0 -383
- package/src/Diagnostics/DeviceSelector.jsx +0 -71
- package/src/Diagnostics/Diagnostics.tsx +0 -190
- package/src/Diagnostics/DiagnosticsContext.ts +0 -46
- package/src/Diagnostics/VideoTest.tsx +0 -72
- package/src/Diagnostics/components.tsx +0 -70
- package/src/Diagnostics/index.ts +0 -1
- package/src/Divider/Divider.tsx +0 -45
- package/src/Divider/index.ts +0 -1
- package/src/Dropdown/Dropdown.tsx +0 -145
- package/src/Dropdown/index.tsx +0 -1
- package/src/Fieldset/Fieldset.tsx +0 -11
- package/src/Fieldset/index.tsx +0 -1
- package/src/Footer/Footer.tsx +0 -47
- package/src/Footer/index.tsx +0 -1
- package/src/IconButton/IconButton.tsx +0 -43
- package/src/IconButton/index.tsx +0 -1
- package/src/Input/Input.tsx +0 -109
- package/src/Input/index.tsx +0 -1
- package/src/Label/Label.tsx +0 -8
- package/src/Label/index.ts +0 -1
- package/src/Layout/Box.tsx +0 -3
- package/src/Layout/Flex.tsx +0 -76
- package/src/Layout/index.tsx +0 -2
- package/src/Link/Link.tsx +0 -54
- package/src/Link/index.tsx +0 -2
- package/src/Loading/Loading.tsx +0 -30
- package/src/Loading/index.ts +0 -1
- package/src/Modal/Dialog.tsx +0 -57
- package/src/Modal/DialogContent.tsx +0 -65
- package/src/Modal/index.ts +0 -1
- package/src/Pagination/StyledPagination.tsx +0 -70
- package/src/Pagination/index.tsx +0 -1
- package/src/Popover/index.tsx +0 -34
- package/src/Prebuilt/App.tsx +0 -323
- package/src/Prebuilt/AppContext.tsx +0 -34
- package/src/Prebuilt/AppStateContext.tsx +0 -95
- package/src/Prebuilt/IconButton.tsx +0 -26
- package/src/Prebuilt/common/PeersSorter.ts +0 -111
- package/src/Prebuilt/common/constants.ts +0 -151
- package/src/Prebuilt/common/hooks.ts +0 -257
- package/src/Prebuilt/common/utils.js +0 -185
- package/src/Prebuilt/components/AppData/AppData.tsx +0 -208
- package/src/Prebuilt/components/AppData/useChatState.js +0 -18
- package/src/Prebuilt/components/AppData/useSheet.ts +0 -33
- package/src/Prebuilt/components/AppData/useSidepane.js +0 -99
- package/src/Prebuilt/components/AppData/useSidepaneResetOnLayoutUpdate.tsx +0 -22
- package/src/Prebuilt/components/AppData/useUISettings.js +0 -212
- package/src/Prebuilt/components/AudioVideoToggle.tsx +0 -411
- package/src/Prebuilt/components/AuthToken.tsx +0 -148
- package/src/Prebuilt/components/CaptionIcon.tsx +0 -27
- package/src/Prebuilt/components/Chat/ArrowNavigation.tsx +0 -44
- package/src/Prebuilt/components/Chat/Chat.tsx +0 -190
- package/src/Prebuilt/components/Chat/ChatActions.tsx +0 -314
- package/src/Prebuilt/components/Chat/ChatBody.tsx +0 -493
- package/src/Prebuilt/components/Chat/ChatFooter.tsx +0 -316
- package/src/Prebuilt/components/Chat/ChatSelector.tsx +0 -228
- package/src/Prebuilt/components/Chat/ChatSelectorContainer.tsx +0 -158
- package/src/Prebuilt/components/Chat/ChatStates.tsx +0 -73
- package/src/Prebuilt/components/Chat/EmptyChat.tsx +0 -58
- package/src/Prebuilt/components/Chat/MwebChatOption.tsx +0 -24
- package/src/Prebuilt/components/Chat/PinnedMessage.tsx +0 -140
- package/src/Prebuilt/components/Chat/StickIndicator.tsx +0 -24
- package/src/Prebuilt/components/Chat/useEmojiPickerStyles.js +0 -32
- package/src/Prebuilt/components/Chat/useUnreadCount.ts +0 -19
- package/src/Prebuilt/components/Chat/utils.ts +0 -11
- package/src/Prebuilt/components/ChatSettings.tsx +0 -68
- package/src/Prebuilt/components/Chip.tsx +0 -40
- package/src/Prebuilt/components/ConferenceScreen.tsx +0 -205
- package/src/Prebuilt/components/Connection/ConnectionIndicator.tsx +0 -89
- package/src/Prebuilt/components/Connection/TileConnection.tsx +0 -93
- package/src/Prebuilt/components/Connection/connectionQualityUtils.js +0 -37
- package/src/Prebuilt/components/EmojiReaction.jsx +0 -100
- package/src/Prebuilt/components/EndCallFeedback/Feedback.tsx +0 -71
- package/src/Prebuilt/components/EndCallFeedback/FeedbackForm.tsx +0 -381
- package/src/Prebuilt/components/EndCallFeedback/ThankyouView.tsx +0 -64
- package/src/Prebuilt/components/ErrorBoundary.jsx +0 -102
- package/src/Prebuilt/components/Footer/ChatToggle.tsx +0 -53
- package/src/Prebuilt/components/Footer/EmojiCard.jsx +0 -34
- package/src/Prebuilt/components/Footer/Footer.tsx +0 -115
- package/src/Prebuilt/components/Footer/PaginatedParticipants.tsx +0 -124
- package/src/Prebuilt/components/Footer/ParticipantList.tsx +0 -478
- package/src/Prebuilt/components/Footer/PollsToggle.tsx +0 -37
- package/src/Prebuilt/components/Footer/RoleAccordion.tsx +0 -183
- package/src/Prebuilt/components/Footer/RoleOptions.tsx +0 -215
- package/src/Prebuilt/components/Footer/WhiteboardToggle.tsx +0 -52
- package/src/Prebuilt/components/FullPageProgress.tsx +0 -22
- package/src/Prebuilt/components/HMSVideo/Controls.jsx +0 -22
- package/src/Prebuilt/components/HMSVideo/FullscreenButton.tsx +0 -13
- package/src/Prebuilt/components/HMSVideo/HLSAutoplayBlockedPrompt.tsx +0 -72
- package/src/Prebuilt/components/HMSVideo/HLSCaptionSelector.tsx +0 -15
- package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.tsx +0 -248
- package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +0 -75
- package/src/Prebuilt/components/HMSVideo/MwebHLSViewTitle.tsx +0 -86
- package/src/Prebuilt/components/HMSVideo/PlayPauseButton.tsx +0 -27
- package/src/Prebuilt/components/HMSVideo/PlayPauseSeekControls.tsx +0 -158
- package/src/Prebuilt/components/HMSVideo/PlayerContext.tsx +0 -15
- package/src/Prebuilt/components/HMSVideo/SeekControl.tsx +0 -22
- package/src/Prebuilt/components/HMSVideo/VideoProgress.tsx +0 -100
- package/src/Prebuilt/components/HMSVideo/VideoTime.tsx +0 -52
- package/src/Prebuilt/components/HMSVideo/VolumeControl.tsx +0 -70
- package/src/Prebuilt/components/HMSVideo/index.ts +0 -24
- package/src/Prebuilt/components/HMSVideo/utils.ts +0 -37
- package/src/Prebuilt/components/Header/Header.tsx +0 -52
- package/src/Prebuilt/components/Header/HeaderComponents.jsx +0 -57
- package/src/Prebuilt/components/Header/ParticipantFilter.jsx +0 -89
- package/src/Prebuilt/components/Header/RoomDetailsHeader.tsx +0 -51
- package/src/Prebuilt/components/Header/StreamActions.tsx +0 -297
- package/src/Prebuilt/components/Header/common.jsx +0 -196
- package/src/Prebuilt/components/Header/index.tsx +0 -1
- package/src/Prebuilt/components/HlsStatsOverlay.jsx +0 -89
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.tsx +0 -167
- package/src/Prebuilt/components/Input/KeyboardInputManager.js +0 -107
- package/src/Prebuilt/components/InsetTile.tsx +0 -136
- package/src/Prebuilt/components/LayoutModeSelector.tsx +0 -112
- package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +0 -166
- package/src/Prebuilt/components/Leave/EndSessionContent.tsx +0 -64
- package/src/Prebuilt/components/Leave/LeaveAtoms.tsx +0 -26
- package/src/Prebuilt/components/Leave/LeaveCard.tsx +0 -36
- package/src/Prebuilt/components/Leave/LeaveRoom.tsx +0 -82
- package/src/Prebuilt/components/Leave/LeaveSessionContent.tsx +0 -61
- package/src/Prebuilt/components/Leave/MwebLeaveRoom.tsx +0 -135
- package/src/Prebuilt/components/LeaveScreen.tsx +0 -71
- package/src/Prebuilt/components/MoreSettings/ActionTile.jsx +0 -60
- package/src/Prebuilt/components/MoreSettings/BulkRoleChangeModal.jsx +0 -139
- package/src/Prebuilt/components/MoreSettings/CaptionContent.tsx +0 -143
- package/src/Prebuilt/components/MoreSettings/CaptionModal.tsx +0 -37
- package/src/Prebuilt/components/MoreSettings/ChangeNameContent.tsx +0 -123
- package/src/Prebuilt/components/MoreSettings/ChangeNameModal.tsx +0 -78
- package/src/Prebuilt/components/MoreSettings/EmbedUrl.jsx +0 -81
- package/src/Prebuilt/components/MoreSettings/FullScreenItem.tsx +0 -26
- package/src/Prebuilt/components/MoreSettings/MoreSettings.tsx +0 -29
- package/src/Prebuilt/components/MoreSettings/MuteAllContent.tsx +0 -81
- package/src/Prebuilt/components/MoreSettings/MuteAllModal.tsx +0 -72
- package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx +0 -282
- package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx +0 -387
- package/src/Prebuilt/components/MoreSettings/constants.ts +0 -14
- package/src/Prebuilt/components/MwebLandscapePrompt.tsx +0 -81
- package/src/Prebuilt/components/Notifications/AutoplayBlockedModal.tsx +0 -39
- package/src/Prebuilt/components/Notifications/ChatNotifications.tsx +0 -34
- package/src/Prebuilt/components/Notifications/DeviceChangeNotifications.tsx +0 -18
- package/src/Prebuilt/components/Notifications/DeviceInUseError.tsx +0 -86
- package/src/Prebuilt/components/Notifications/ErrorNotifications.tsx +0 -56
- package/src/Prebuilt/components/Notifications/HLSFailureModal.tsx +0 -71
- package/src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx +0 -78
- package/src/Prebuilt/components/Notifications/InitErrorModal.tsx +0 -42
- package/src/Prebuilt/components/Notifications/MessageNotifications.tsx +0 -24
- package/src/Prebuilt/components/Notifications/Notifications.tsx +0 -65
- package/src/Prebuilt/components/Notifications/PeerNotifications.tsx +0 -52
- package/src/Prebuilt/components/Notifications/PermissionErrorModal.tsx +0 -144
- package/src/Prebuilt/components/Notifications/PollNotificationModal.tsx +0 -71
- package/src/Prebuilt/components/Notifications/ReconnectNotifications.tsx +0 -33
- package/src/Prebuilt/components/Notifications/RoleChangeNotification.tsx +0 -24
- package/src/Prebuilt/components/Notifications/TrackBulkUnmuteModal.tsx +0 -61
- package/src/Prebuilt/components/Notifications/TrackNotifications.tsx +0 -41
- package/src/Prebuilt/components/Notifications/TrackUnmuteModal.tsx +0 -63
- package/src/Prebuilt/components/Notifications/TranscriptionNotifications.tsx +0 -58
- package/src/Prebuilt/components/Notifications/index.tsx +0 -1
- package/src/Prebuilt/components/PIP/PIPChat.tsx +0 -292
- package/src/Prebuilt/components/PIP/PIPChatOption.tsx +0 -18
- package/src/Prebuilt/components/PIP/PIPComponent.tsx +0 -90
- package/src/Prebuilt/components/PIP/PIPManager.ts +0 -335
- package/src/Prebuilt/components/PIP/PIPProvider.tsx +0 -56
- package/src/Prebuilt/components/PIP/PIPWindow.tsx +0 -13
- package/src/Prebuilt/components/PIP/SetupMediaSession.js +0 -60
- package/src/Prebuilt/components/PIP/context.ts +0 -10
- package/src/Prebuilt/components/PIP/index.jsx +0 -6
- package/src/Prebuilt/components/PIP/pip.test.js +0 -72
- package/src/Prebuilt/components/PIP/pipUtils.js +0 -183
- package/src/Prebuilt/components/PIP/usePIPChat.tsx +0 -105
- package/src/Prebuilt/components/PIP/usePIPWindow.tsx +0 -12
- package/src/Prebuilt/components/Pagination.tsx +0 -60
- package/src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.tsx +0 -248
- package/src/Prebuilt/components/Polls/CreateQuestions/CreateQuestions.jsx +0 -142
- package/src/Prebuilt/components/Polls/CreateQuestions/DeleteQuestionModal.tsx +0 -74
- package/src/Prebuilt/components/Polls/CreateQuestions/QuestionForm.tsx +0 -324
- package/src/Prebuilt/components/Polls/CreateQuestions/SavedQuestion.tsx +0 -64
- package/src/Prebuilt/components/Polls/Polls.tsx +0 -31
- package/src/Prebuilt/components/Polls/Voting/LeaderboardEntry.tsx +0 -76
- package/src/Prebuilt/components/Polls/Voting/LeaderboardSummary.tsx +0 -116
- package/src/Prebuilt/components/Polls/Voting/PeerParticipationSummary.tsx +0 -60
- package/src/Prebuilt/components/Polls/Voting/QuestionCard.jsx +0 -221
- package/src/Prebuilt/components/Polls/Voting/StandardVoting.tsx +0 -47
- package/src/Prebuilt/components/Polls/Voting/StatisticBox.tsx +0 -20
- package/src/Prebuilt/components/Polls/Voting/TimedVoting.tsx +0 -55
- package/src/Prebuilt/components/Polls/Voting/Voting.tsx +0 -143
- package/src/Prebuilt/components/Polls/Voting/useQuizSummary.tsx +0 -50
- package/src/Prebuilt/components/Polls/common/Line.tsx +0 -4
- package/src/Prebuilt/components/Polls/common/MultipleChoiceOptions.jsx +0 -115
- package/src/Prebuilt/components/Polls/common/OptionInputWithDelete.tsx +0 -38
- package/src/Prebuilt/components/Polls/common/SingleChoiceOptions.jsx +0 -140
- package/src/Prebuilt/components/Polls/common/StatusIndicator.tsx +0 -35
- package/src/Prebuilt/components/Polls/common/VoteCount.tsx +0 -15
- package/src/Prebuilt/components/Polls/common/VoteProgress.tsx +0 -18
- package/src/Prebuilt/components/Polls/common/constants.ts +0 -5
- package/src/Prebuilt/components/Polls/common/utils.ts +0 -22
- package/src/Prebuilt/components/Preview/PreviewForm.tsx +0 -94
- package/src/Prebuilt/components/Preview/PreviewJoin.tsx +0 -292
- package/src/Prebuilt/components/Preview/PreviewScreen.tsx +0 -38
- package/src/Prebuilt/components/PreviousRoleInMetadata.tsx +0 -20
- package/src/Prebuilt/components/RaiseHand.tsx +0 -30
- package/src/Prebuilt/components/RemoveParticipant.tsx +0 -35
- package/src/Prebuilt/components/RoleChangeModal.tsx +0 -188
- package/src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx +0 -75
- package/src/Prebuilt/components/RoleChangeRequest/RoleChangeRequestModal.tsx +0 -94
- package/src/Prebuilt/components/RoomDetails/Duration.tsx +0 -26
- package/src/Prebuilt/components/RoomDetails/RoomDetailsPane.tsx +0 -63
- package/src/Prebuilt/components/RoomDetails/RoomDetailsRow.tsx +0 -23
- package/src/Prebuilt/components/RoomDetails/RoomDetailsSheet.tsx +0 -45
- package/src/Prebuilt/components/ScreenShareToggle.jsx +0 -58
- package/src/Prebuilt/components/ScreenshareDisplay.tsx +0 -39
- package/src/Prebuilt/components/ScreenshareTile.tsx +0 -134
- package/src/Prebuilt/components/SecondaryTiles.tsx +0 -81
- package/src/Prebuilt/components/Settings/DeviceSettings.jsx +0 -208
- package/src/Prebuilt/components/Settings/LayoutSettings.tsx +0 -74
- package/src/Prebuilt/components/Settings/NotificationSettings.tsx +0 -66
- package/src/Prebuilt/components/Settings/SettingsModal.jsx +0 -301
- package/src/Prebuilt/components/Settings/StartRecording.jsx +0 -101
- package/src/Prebuilt/components/Settings/SwitchWithLabel.tsx +0 -53
- package/src/Prebuilt/components/Settings/common.ts +0 -16
- package/src/Prebuilt/components/ShareMenuIcon.jsx +0 -27
- package/src/Prebuilt/components/SidePaneTabs.tsx +0 -214
- package/src/Prebuilt/components/StatsForNerds.jsx +0 -373
- package/src/Prebuilt/components/Streaming/Common.jsx +0 -143
- package/src/Prebuilt/components/Streaming/ResolutionInput.jsx +0 -88
- package/src/Prebuilt/components/TileMenu/TileMenu.tsx +0 -148
- package/src/Prebuilt/components/TileMenu/TileMenuContent.tsx +0 -393
- package/src/Prebuilt/components/TileMenu/utils.ts +0 -7
- package/src/Prebuilt/components/Toast/Toast.jsx +0 -17
- package/src/Prebuilt/components/Toast/ToastBatcher.js +0 -64
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +0 -177
- package/src/Prebuilt/components/Toast/ToastContainer.jsx +0 -30
- package/src/Prebuilt/components/Toast/ToastManager.js +0 -44
- package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +0 -62
- package/src/Prebuilt/components/VideoLayouts/Grid.tsx +0 -43
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +0 -155
- package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +0 -91
- package/src/Prebuilt/components/VideoLayouts/RoleProminence.tsx +0 -66
- package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +0 -74
- package/src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx +0 -93
- package/src/Prebuilt/components/VideoLayouts/interface.ts +0 -11
- package/src/Prebuilt/components/VideoTile.tsx +0 -203
- package/src/Prebuilt/components/VirtualBackground/VBCollection.tsx +0 -52
- package/src/Prebuilt/components/VirtualBackground/VBHandler.tsx +0 -130
- package/src/Prebuilt/components/VirtualBackground/VBOption.tsx +0 -57
- package/src/Prebuilt/components/VirtualBackground/VBPicker.tsx +0 -252
- package/src/Prebuilt/components/VirtualBackground/VBToggle.tsx +0 -50
- package/src/Prebuilt/components/hooks/useAudioOutputTest.tsx +0 -20
- package/src/Prebuilt/components/hooks/useAutoStartStreaming.tsx +0 -70
- package/src/Prebuilt/components/hooks/useChatBlacklist.ts +0 -29
- package/src/Prebuilt/components/hooks/useCloseScreenshareWhiteboard.tsx +0 -17
- package/src/Prebuilt/components/hooks/useDropdownList.ts +0 -24
- package/src/Prebuilt/components/hooks/useDropdownSelection.jsx +0 -3
- package/src/Prebuilt/components/hooks/useFullscreen.ts +0 -46
- package/src/Prebuilt/components/hooks/useGroupOnStageActions.tsx +0 -54
- package/src/Prebuilt/components/hooks/useMetadata.tsx +0 -56
- package/src/Prebuilt/components/hooks/usePeerOnStageActions.tsx +0 -49
- package/src/Prebuilt/components/hooks/usePinnedBy.tsx +0 -22
- package/src/Prebuilt/components/hooks/usePinnedMessages.ts +0 -78
- package/src/Prebuilt/components/hooks/usePlaylist.js +0 -25
- package/src/Prebuilt/components/hooks/usePlaylistMusic.js +0 -35
- package/src/Prebuilt/components/hooks/useRedirectToLeave.tsx +0 -23
- package/src/Prebuilt/components/hooks/useRoleProminencePeers.tsx +0 -39
- package/src/Prebuilt/components/hooks/useScreenshareAudio.js +0 -28
- package/src/Prebuilt/components/hooks/useTileLayout.tsx +0 -128
- package/src/Prebuilt/components/hooks/useUnreadPollQuizPresent.tsx +0 -17
- package/src/Prebuilt/components/hooks/useUserPreferences.jsx +0 -26
- package/src/Prebuilt/components/hooks/useVideoTileLayout.ts +0 -26
- package/src/Prebuilt/components/init/Init.jsx +0 -31
- package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +0 -42
- package/src/Prebuilt/components/pdfAnnotator/pdfHeader.jsx +0 -31
- package/src/Prebuilt/components/pdfAnnotator/pdfInfo.jsx +0 -32
- package/src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx +0 -211
- package/src/Prebuilt/components/pdfAnnotator/submitPdf.jsx +0 -48
- package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +0 -71
- package/src/Prebuilt/components/peerTileUtils.tsx +0 -42
- package/src/Prebuilt/images/android-perm-1.png +0 -0
- package/src/Prebuilt/images/empty-chat.svg +0 -12
- package/src/Prebuilt/images/ios-perm-0.png +0 -0
- package/src/Prebuilt/images/pdf-share.png +0 -0
- package/src/Prebuilt/images/rtmp.png +0 -0
- package/src/Prebuilt/images/screen-share.png +0 -0
- package/src/Prebuilt/images/transaction_error.svg +0 -12
- package/src/Prebuilt/index.ts +0 -1
- package/src/Prebuilt/layouts/EmbedView.jsx +0 -94
- package/src/Prebuilt/layouts/HLSView.jsx +0 -794
- package/src/Prebuilt/layouts/PDFView.jsx +0 -67
- package/src/Prebuilt/layouts/Sheet.tsx +0 -14
- package/src/Prebuilt/layouts/SidePane.tsx +0 -241
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +0 -164
- package/src/Prebuilt/layouts/WaitingView.tsx +0 -52
- package/src/Prebuilt/plugins/CaptionsViewer.tsx +0 -261
- package/src/Prebuilt/plugins/FlyingEmoji.jsx +0 -154
- package/src/Prebuilt/plugins/RemoteStopScreenshare.jsx +0 -18
- package/src/Prebuilt/plugins/transcription/Transcriber.js +0 -216
- package/src/Prebuilt/plugins/transcription/TranscriptionButton.jsx +0 -138
- package/src/Prebuilt/plugins/transcription/index.jsx +0 -1
- package/src/Prebuilt/primitives/DialogContent.jsx +0 -285
- package/src/Prebuilt/primitives/DropdownTrigger.jsx +0 -46
- package/src/Prebuilt/provider/roomLayoutProvider/constants/index.ts +0 -60
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts +0 -88
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.ts +0 -10
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts +0 -112
- package/src/Prebuilt/provider/roomLayoutProvider/index.tsx +0 -53
- package/src/Prebuilt/services/FeatureFlags.jsx +0 -46
- package/src/Progress/index.tsx +0 -17
- package/src/QRCode/QRCode.tsx +0 -6
- package/src/QRCode/index.tsx +0 -1
- package/src/RadioGroup/RadioGroup.tsx +0 -33
- package/src/RadioGroup/index.tsx +0 -1
- package/src/ReactSelect/ReactSelect.tsx +0 -97
- package/src/ReactSelect/index.ts +0 -1
- package/src/Select/Select.tsx +0 -63
- package/src/Select/index.ts +0 -1
- package/src/Sheet/Sheet.tsx +0 -122
- package/src/Sheet/index.ts +0 -1
- package/src/Slider/Slider.tsx +0 -70
- package/src/Slider/index.ts +0 -1
- package/src/Stats/Stats.tsx +0 -243
- package/src/Stats/StyledStats.tsx +0 -57
- package/src/Stats/formatBytes.ts +0 -19
- package/src/Stats/index.tsx +0 -2
- package/src/Stats/useQoE.ts +0 -79
- package/src/Switch/Switch.tsx +0 -52
- package/src/Switch/index.ts +0 -1
- package/src/Tabs/Tabs.tsx +0 -41
- package/src/Tabs/index.tsx +0 -1
- package/src/Text/Text.tsx +0 -149
- package/src/Text/index.tsx +0 -1
- package/src/TextArea/TextArea.tsx +0 -30
- package/src/TextArea/index.tsx +0 -1
- package/src/Theme/ThemeProvider.tsx +0 -98
- package/src/Theme/base.config.ts +0 -236
- package/src/Theme/index.tsx +0 -2
- package/src/Theme/stitches.config.ts +0 -88
- package/src/Theme/useSSR.tsx +0 -24
- package/src/TileMenu/StyledMenuTile.tsx +0 -105
- package/src/TileMenu/TileMenu.tsx +0 -98
- package/src/TileMenu/index.tsx +0 -1
- package/src/Toast/Toast.tsx +0 -170
- package/src/Toast/index.tsx +0 -1
- package/src/Tooltip/Tooltip.tsx +0 -79
- package/src/Tooltip/index.ts +0 -1
- package/src/Video/Video.tsx +0 -61
- package/src/Video/index.tsx +0 -1
- package/src/VideoList/StyledVideoList.tsx +0 -39
- package/src/VideoList/index.tsx +0 -2
- package/src/VideoList/videoListUtils.tsx +0 -20
- package/src/VideoTile/StyledVideoTile.tsx +0 -146
- package/src/VideoTile/index.tsx +0 -1
- package/src/context/DialogContext.tsx +0 -13
- package/src/fixtures/chats.ts +0 -25
- package/src/fixtures/peers.ts +0 -27
- package/src/fixtures/tracks.ts +0 -11
- package/src/hooks/useDialogContainerSelector.tsx +0 -7
- package/src/index.ts +0 -41
- package/src/store/SetupFakeStore.ts +0 -33
- package/src/store/StorybookSDK.ts +0 -231
- package/src/utils/animations.ts +0 -114
- package/src/utils/index.ts +0 -2
- package/src/utils/styles.ts +0 -22
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { DefaultConferencingScreen_Elements } from '@100mslive/types-prebuilt';
|
|
3
|
-
import { match } from 'ts-pattern';
|
|
4
|
-
import {
|
|
5
|
-
HMSPeer,
|
|
6
|
-
selectPermissions,
|
|
7
|
-
selectRoleByRoleName,
|
|
8
|
-
selectTracksMap,
|
|
9
|
-
useHMSActions,
|
|
10
|
-
useHMSStore,
|
|
11
|
-
} from '@100mslive/react-sdk';
|
|
12
|
-
import {
|
|
13
|
-
MicOffIcon,
|
|
14
|
-
MicOnIcon,
|
|
15
|
-
PersonRectangleIcon,
|
|
16
|
-
RemoveUserIcon,
|
|
17
|
-
VerticalMenuIcon,
|
|
18
|
-
VideoOffIcon,
|
|
19
|
-
VideoOnIcon,
|
|
20
|
-
} from '@100mslive/react-icons';
|
|
21
|
-
import { Dropdown } from '../../../Dropdown';
|
|
22
|
-
import { Flex } from '../../../Layout';
|
|
23
|
-
import { Text } from '../../../Text';
|
|
24
|
-
import { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
|
25
|
-
// @ts-ignore: No implicit Any
|
|
26
|
-
import { getMetadata } from '../../common/utils';
|
|
27
|
-
|
|
28
|
-
const dropdownItemCSS = { backgroundColor: '$surface_default', gap: '$4', p: '$8' };
|
|
29
|
-
const optionTextCSS = {
|
|
30
|
-
fontWeight: '$semiBold',
|
|
31
|
-
color: '$on_surface_high',
|
|
32
|
-
textTransform: 'none',
|
|
33
|
-
whiteSpace: 'nowrap',
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const DropdownWrapper = ({ children }: { children: React.ReactNode }) => {
|
|
37
|
-
const [openOptions, setOpenOptions] = useState(false);
|
|
38
|
-
if (React.Children.toArray(children).length === 0) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
return (
|
|
42
|
-
<Dropdown.Root open={openOptions} onOpenChange={setOpenOptions}>
|
|
43
|
-
<Dropdown.Trigger
|
|
44
|
-
data-testid="role_group_options"
|
|
45
|
-
onClick={e => e.stopPropagation()}
|
|
46
|
-
className="role_actions"
|
|
47
|
-
asChild
|
|
48
|
-
css={{
|
|
49
|
-
p: '$1',
|
|
50
|
-
r: '$0',
|
|
51
|
-
c: '$on_surface_high',
|
|
52
|
-
visibility: openOptions ? 'visible' : 'hidden',
|
|
53
|
-
'&:hover': {
|
|
54
|
-
c: '$on_surface_medium',
|
|
55
|
-
},
|
|
56
|
-
'@md': {
|
|
57
|
-
visibility: 'visible',
|
|
58
|
-
},
|
|
59
|
-
}}
|
|
60
|
-
>
|
|
61
|
-
<Flex>
|
|
62
|
-
<VerticalMenuIcon />
|
|
63
|
-
</Flex>
|
|
64
|
-
</Dropdown.Trigger>
|
|
65
|
-
<Dropdown.Content
|
|
66
|
-
onClick={e => e.stopPropagation()}
|
|
67
|
-
css={{ w: 'max-content', bg: '$surface_default', py: 0 }}
|
|
68
|
-
align="end"
|
|
69
|
-
>
|
|
70
|
-
{children}
|
|
71
|
-
</Dropdown.Content>
|
|
72
|
-
</Dropdown.Root>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export const RoleOptions = ({ roleName, peerList }: { roleName: string; peerList: HMSPeer[] }) => {
|
|
77
|
-
const permissions = useHMSStore(selectPermissions);
|
|
78
|
-
const hmsActions = useHMSActions();
|
|
79
|
-
const { elements } = useRoomLayoutConferencingScreen();
|
|
80
|
-
const { on_stage_role, off_stage_roles = [] } = (elements as DefaultConferencingScreen_Elements)?.on_stage_exp || {};
|
|
81
|
-
const canRemoveRoleFromStage = permissions?.changeRole && roleName === on_stage_role;
|
|
82
|
-
const role = useHMSStore(selectRoleByRoleName(roleName));
|
|
83
|
-
const tracks = useHMSStore(selectTracksMap);
|
|
84
|
-
if (!role) {
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
const canPublishAudio = role.publishParams.allowed.includes('audio');
|
|
88
|
-
const canPublishVideo = role.publishParams.allowed.includes('video');
|
|
89
|
-
|
|
90
|
-
let isVideoOnForSomePeers = false;
|
|
91
|
-
let isAudioOnForSomePeers = false;
|
|
92
|
-
|
|
93
|
-
peerList.forEach(peer => {
|
|
94
|
-
if (peer.isLocal) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
const isAudioOn = !!peer.audioTrack && tracks[peer.audioTrack]?.enabled;
|
|
98
|
-
const isVideoOn = !!peer.videoTrack && tracks[peer.videoTrack]?.enabled;
|
|
99
|
-
isAudioOnForSomePeers = isAudioOnForSomePeers || isAudioOn;
|
|
100
|
-
isVideoOnForSomePeers = isVideoOnForSomePeers || isVideoOn;
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
const setTrackEnabled = async (type: 'audio' | 'video', enabled = false) => {
|
|
104
|
-
try {
|
|
105
|
-
await hmsActions.setRemoteTracksEnabled({ roles: [roleName], source: 'regular', type, enabled });
|
|
106
|
-
} catch (e) {
|
|
107
|
-
console.error(e);
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
// on stage and off stage roles
|
|
112
|
-
const canRemoveRoleFromRoom =
|
|
113
|
-
permissions?.removeOthers && (on_stage_role === roleName || off_stage_roles?.includes(roleName));
|
|
114
|
-
|
|
115
|
-
if (
|
|
116
|
-
peerList.length === 0 ||
|
|
117
|
-
// if only local peer is present no need to show any options
|
|
118
|
-
(peerList.length === 1 && peerList[0].isLocal) ||
|
|
119
|
-
!role
|
|
120
|
-
) {
|
|
121
|
-
return null;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
const removeAllFromStage = () => {
|
|
125
|
-
peerList.forEach(peer => {
|
|
126
|
-
const prevRole = getMetadata(peer.metadata).prevRole;
|
|
127
|
-
if (prevRole) {
|
|
128
|
-
hmsActions.changeRoleOfPeer(peer.id, prevRole, true);
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
const removePeersFromRoom = async () => {
|
|
134
|
-
try {
|
|
135
|
-
peerList.forEach(async peer => {
|
|
136
|
-
await hmsActions.removePeer(peer.id, '');
|
|
137
|
-
});
|
|
138
|
-
} catch (e) {
|
|
139
|
-
console.error(e);
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
return (
|
|
144
|
-
<DropdownWrapper>
|
|
145
|
-
{canRemoveRoleFromStage ? (
|
|
146
|
-
<Dropdown.Item
|
|
147
|
-
css={{ ...dropdownItemCSS, borderBottom: '1px solid $border_bright' }}
|
|
148
|
-
onClick={removeAllFromStage}
|
|
149
|
-
>
|
|
150
|
-
<PersonRectangleIcon />
|
|
151
|
-
<Text variant="sm" css={optionTextCSS}>
|
|
152
|
-
Remove all from Stage
|
|
153
|
-
</Text>
|
|
154
|
-
</Dropdown.Item>
|
|
155
|
-
) : null}
|
|
156
|
-
|
|
157
|
-
{match({ canPublishAudio, isAudioOnForSomePeers, canMute: permissions?.mute, canUnmute: permissions?.unmute })
|
|
158
|
-
.with({ canPublishAudio: true, isAudioOnForSomePeers: true, canMute: true }, () => {
|
|
159
|
-
return (
|
|
160
|
-
<Dropdown.Item css={dropdownItemCSS} onClick={() => setTrackEnabled('audio', false)}>
|
|
161
|
-
<MicOffIcon />
|
|
162
|
-
<Text variant="sm" css={optionTextCSS}>
|
|
163
|
-
Mute Audio for All
|
|
164
|
-
</Text>
|
|
165
|
-
</Dropdown.Item>
|
|
166
|
-
);
|
|
167
|
-
})
|
|
168
|
-
.with({ canPublishAudio: true, isAudioOnForSomePeers: false, canUnmute: true }, () => {
|
|
169
|
-
return (
|
|
170
|
-
<Dropdown.Item css={dropdownItemCSS} onClick={() => setTrackEnabled('audio', true)}>
|
|
171
|
-
<MicOnIcon />
|
|
172
|
-
<Text variant="sm" css={optionTextCSS}>
|
|
173
|
-
Request to Unmute Audio for All
|
|
174
|
-
</Text>
|
|
175
|
-
</Dropdown.Item>
|
|
176
|
-
);
|
|
177
|
-
})
|
|
178
|
-
.otherwise(() => null)}
|
|
179
|
-
{match({ canPublishVideo, isVideoOnForSomePeers, canMute: permissions?.mute, canUnmute: permissions?.unmute })
|
|
180
|
-
.with({ canPublishVideo: true, isVideoOnForSomePeers: true, canMute: true }, () => {
|
|
181
|
-
return (
|
|
182
|
-
<Dropdown.Item css={dropdownItemCSS} onClick={() => setTrackEnabled('video', false)}>
|
|
183
|
-
<VideoOffIcon />
|
|
184
|
-
<Text variant="sm" css={optionTextCSS}>
|
|
185
|
-
Mute Video for All
|
|
186
|
-
</Text>
|
|
187
|
-
</Dropdown.Item>
|
|
188
|
-
);
|
|
189
|
-
})
|
|
190
|
-
.with({ canPublishVideo: true, isVideoOnForSomePeers: false, canUnmute: true }, () => {
|
|
191
|
-
return (
|
|
192
|
-
<Dropdown.Item css={dropdownItemCSS} onClick={() => setTrackEnabled('video', true)}>
|
|
193
|
-
<VideoOnIcon />
|
|
194
|
-
<Text variant="sm" css={optionTextCSS}>
|
|
195
|
-
Request to Unmute Video for All
|
|
196
|
-
</Text>
|
|
197
|
-
</Dropdown.Item>
|
|
198
|
-
);
|
|
199
|
-
})
|
|
200
|
-
.otherwise(() => null)}
|
|
201
|
-
|
|
202
|
-
{canRemoveRoleFromRoom ? (
|
|
203
|
-
<Dropdown.Item
|
|
204
|
-
css={{ ...dropdownItemCSS, borderTop: '1px solid $border_bright', color: '$alert_error_default' }}
|
|
205
|
-
onClick={removePeersFromRoom}
|
|
206
|
-
>
|
|
207
|
-
<RemoveUserIcon />
|
|
208
|
-
<Text variant="sm" css={{ ...optionTextCSS, color: 'inherit' }}>
|
|
209
|
-
Remove all from Room
|
|
210
|
-
</Text>
|
|
211
|
-
</Dropdown.Item>
|
|
212
|
-
) : null}
|
|
213
|
-
</DropdownWrapper>
|
|
214
|
-
);
|
|
215
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { selectPeerScreenSharing, useHMSStore, useWhiteboard } from '@100mslive/react-sdk';
|
|
3
|
-
import { PencilDrawIcon } from '@100mslive/react-icons';
|
|
4
|
-
import { Tooltip } from '../../..';
|
|
5
|
-
// @ts-ignore: No implicit Any
|
|
6
|
-
import IconButton from '../../IconButton';
|
|
7
|
-
// @ts-ignore: No implicit Any
|
|
8
|
-
import { ToastManager } from '../Toast/ToastManager';
|
|
9
|
-
|
|
10
|
-
export const WhiteboardToggle = () => {
|
|
11
|
-
const { toggle, open, isOwner } = useWhiteboard();
|
|
12
|
-
const peerSharing = useHMSStore(selectPeerScreenSharing);
|
|
13
|
-
const disabled = !!peerSharing || (open && !isOwner);
|
|
14
|
-
const [isLoading, setLoading] = useState(false);
|
|
15
|
-
|
|
16
|
-
if (!toggle) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<Tooltip
|
|
22
|
-
key="whiteboard"
|
|
23
|
-
title={
|
|
24
|
-
peerSharing ? 'Cannot open whiteboard when viewing a shared screen' : `${open ? 'Close' : 'Open'} Whiteboard`
|
|
25
|
-
}
|
|
26
|
-
>
|
|
27
|
-
<IconButton
|
|
28
|
-
onClick={async () => {
|
|
29
|
-
if (disabled || isLoading) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
try {
|
|
33
|
-
if (!open) {
|
|
34
|
-
setLoading(true);
|
|
35
|
-
await toggle();
|
|
36
|
-
setTimeout(() => setLoading(false), 500);
|
|
37
|
-
} else {
|
|
38
|
-
await toggle();
|
|
39
|
-
}
|
|
40
|
-
} catch (error) {
|
|
41
|
-
ToastManager.addToast({ title: (error as Error).message, variant: 'error' });
|
|
42
|
-
}
|
|
43
|
-
}}
|
|
44
|
-
active={!open}
|
|
45
|
-
disabled={disabled || isLoading}
|
|
46
|
-
data-testid="whiteboard_btn"
|
|
47
|
-
>
|
|
48
|
-
<PencilDrawIcon />
|
|
49
|
-
</IconButton>
|
|
50
|
-
</Tooltip>
|
|
51
|
-
);
|
|
52
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Flex } from '../../Layout';
|
|
3
|
-
import { Loading } from '../../Loading';
|
|
4
|
-
import { Text } from '../../Text';
|
|
5
|
-
import { CSS } from '../../Theme';
|
|
6
|
-
|
|
7
|
-
const FullPageProgress = ({
|
|
8
|
-
loaderColor = '$primary_default',
|
|
9
|
-
text = '',
|
|
10
|
-
css = {},
|
|
11
|
-
}: {
|
|
12
|
-
loaderColor?: string;
|
|
13
|
-
text?: string;
|
|
14
|
-
css?: CSS;
|
|
15
|
-
}) => (
|
|
16
|
-
<Flex direction="column" justify="center" align="center" css={{ size: '100%', color: loaderColor, ...css }}>
|
|
17
|
-
<Loading color="currentColor" size={100} />
|
|
18
|
-
{text ? <Text css={{ mt: '$10', color: '$on_surface_high' }}>{text}</Text> : null}
|
|
19
|
-
</Flex>
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
export default FullPageProgress;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Flex, styled } from '../../..';
|
|
2
|
-
|
|
3
|
-
export const VideoControls = styled(Flex, {
|
|
4
|
-
justifyContent: 'center',
|
|
5
|
-
alignItems: 'center',
|
|
6
|
-
alignSelf: 'stretch',
|
|
7
|
-
width: '100%',
|
|
8
|
-
gap: '$2',
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export const LeftControls = styled(Flex, {
|
|
12
|
-
justifyContent: 'flex-start',
|
|
13
|
-
alignItems: 'center',
|
|
14
|
-
width: '100%',
|
|
15
|
-
gap: '$4',
|
|
16
|
-
});
|
|
17
|
-
export const RightControls = styled(Flex, {
|
|
18
|
-
justifyContent: 'flex-end',
|
|
19
|
-
alignItems: 'center',
|
|
20
|
-
width: '100%',
|
|
21
|
-
gap: '$4',
|
|
22
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ExpandIcon, ShrinkIcon } from '@100mslive/react-icons';
|
|
3
|
-
import { Flex, IconButton, Tooltip } from '../../..';
|
|
4
|
-
|
|
5
|
-
export const FullScreenButton = ({ isFullScreen, onToggle }: { isFullScreen: boolean; onToggle: () => void }) => {
|
|
6
|
-
return (
|
|
7
|
-
<Tooltip title={`${isFullScreen ? 'Exit' : 'Go'} fullscreen`} side="top">
|
|
8
|
-
<IconButton css={{ margin: '0px' }} onClick={onToggle} key="fullscreen_btn" data-testid="fullscreen_btn">
|
|
9
|
-
<Flex>{isFullScreen ? <ShrinkIcon /> : <ExpandIcon />}</Flex>
|
|
10
|
-
</IconButton>
|
|
11
|
-
</Tooltip>
|
|
12
|
-
);
|
|
13
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useMedia } from 'react-use';
|
|
3
|
-
import { VolumeTwoIcon } from '@100mslive/react-icons';
|
|
4
|
-
import { Button, config, Dialog, IconButton, Text } from '../../..';
|
|
5
|
-
// @ts-ignore
|
|
6
|
-
import { DialogContent, DialogRow } from '../../primitives/DialogContent';
|
|
7
|
-
import { useIsLandscape } from '../../common/hooks';
|
|
8
|
-
|
|
9
|
-
export function HLSAutoplayBlockedPrompt({
|
|
10
|
-
open,
|
|
11
|
-
unblockAutoPlay,
|
|
12
|
-
}: {
|
|
13
|
-
open: boolean;
|
|
14
|
-
unblockAutoPlay: () => Promise<void>;
|
|
15
|
-
}) {
|
|
16
|
-
const isLandscape = useIsLandscape();
|
|
17
|
-
const isMobile = useMedia(config.media.md);
|
|
18
|
-
if ((isMobile || isLandscape) && open) {
|
|
19
|
-
return (
|
|
20
|
-
<IconButton
|
|
21
|
-
css={{
|
|
22
|
-
border: '1px solid white',
|
|
23
|
-
bg: 'white',
|
|
24
|
-
color: '#000',
|
|
25
|
-
r: '$2',
|
|
26
|
-
}}
|
|
27
|
-
onClick={async () => await unblockAutoPlay()}
|
|
28
|
-
>
|
|
29
|
-
<VolumeTwoIcon width="32" height="32" />
|
|
30
|
-
<Text
|
|
31
|
-
variant="body1"
|
|
32
|
-
css={{
|
|
33
|
-
fontWeight: '$semiBold',
|
|
34
|
-
px: '$2',
|
|
35
|
-
color: '#000',
|
|
36
|
-
}}
|
|
37
|
-
>
|
|
38
|
-
Tap To Unmute
|
|
39
|
-
</Text>
|
|
40
|
-
</IconButton>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
return (
|
|
44
|
-
<Dialog.Root
|
|
45
|
-
open={open}
|
|
46
|
-
onOpenChange={async value => {
|
|
47
|
-
if (!value) {
|
|
48
|
-
await unblockAutoPlay();
|
|
49
|
-
}
|
|
50
|
-
}}
|
|
51
|
-
>
|
|
52
|
-
<DialogContent title="Attention" closeable={false}>
|
|
53
|
-
<DialogRow>
|
|
54
|
-
<Text variant="md">
|
|
55
|
-
The browser wants us to get a confirmation for playing the HLS Stream. Please click "play stream" to
|
|
56
|
-
proceed.
|
|
57
|
-
</Text>
|
|
58
|
-
</DialogRow>
|
|
59
|
-
<DialogRow justify="end">
|
|
60
|
-
<Button
|
|
61
|
-
variant="primary"
|
|
62
|
-
onClick={async () => {
|
|
63
|
-
await unblockAutoPlay();
|
|
64
|
-
}}
|
|
65
|
-
>
|
|
66
|
-
Play stream
|
|
67
|
-
</Button>
|
|
68
|
-
</DialogRow>
|
|
69
|
-
</DialogContent>
|
|
70
|
-
</Dialog.Root>
|
|
71
|
-
);
|
|
72
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ClosedCaptionIcon, OpenCaptionIcon } from '@100mslive/react-icons';
|
|
3
|
-
import { IconButton, Tooltip } from '../../../';
|
|
4
|
-
import { useHMSPlayerContext } from './PlayerContext';
|
|
5
|
-
|
|
6
|
-
export function HLSCaptionSelector({ isEnabled }: { isEnabled: boolean }) {
|
|
7
|
-
const { hlsPlayer } = useHMSPlayerContext();
|
|
8
|
-
return (
|
|
9
|
-
<Tooltip title="Subtitles/closed captions" side="top">
|
|
10
|
-
<IconButton css={{ p: '$2' }} onClick={() => hlsPlayer?.toggleCaption()}>
|
|
11
|
-
{isEnabled ? <ClosedCaptionIcon width="20" height="20px" /> : <OpenCaptionIcon width="20" height="20px" />}
|
|
12
|
-
</IconButton>
|
|
13
|
-
</Tooltip>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useMedia } from 'react-use';
|
|
3
|
-
import { HMSHLSLayer } from '@100mslive/hls-player';
|
|
4
|
-
import { CheckIcon, CrossIcon, SettingsIcon } from '@100mslive/react-icons';
|
|
5
|
-
import { Box, Dropdown, Flex, Text, Tooltip } from '../../..';
|
|
6
|
-
import { Sheet } from '../../../Sheet';
|
|
7
|
-
import { config } from '../../../Theme';
|
|
8
|
-
import { useIsLandscape } from '../../common/hooks';
|
|
9
|
-
|
|
10
|
-
export function HLSQualitySelector({
|
|
11
|
-
open,
|
|
12
|
-
onOpenChange,
|
|
13
|
-
layers,
|
|
14
|
-
onQualityChange,
|
|
15
|
-
selection,
|
|
16
|
-
isAuto,
|
|
17
|
-
containerRef,
|
|
18
|
-
}: {
|
|
19
|
-
open: boolean;
|
|
20
|
-
onOpenChange: (value: boolean) => void;
|
|
21
|
-
layers: HMSHLSLayer[];
|
|
22
|
-
onQualityChange: (quality: { [key: string]: string | number } | HMSHLSLayer) => void;
|
|
23
|
-
selection: HMSHLSLayer;
|
|
24
|
-
isAuto: boolean;
|
|
25
|
-
containerRef?: HTMLDivElement;
|
|
26
|
-
}) {
|
|
27
|
-
const isMobile = useMedia(config.media.md);
|
|
28
|
-
const isLandscape = useIsLandscape();
|
|
29
|
-
|
|
30
|
-
if (layers.length === 0) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
if (isMobile || isLandscape) {
|
|
34
|
-
return (
|
|
35
|
-
<Sheet.Root open={open} onOpenChange={onOpenChange}>
|
|
36
|
-
<Sheet.Trigger asChild data-testid="quality_selector">
|
|
37
|
-
<Flex
|
|
38
|
-
css={{
|
|
39
|
-
color: '$on_primary_high',
|
|
40
|
-
r: '$1',
|
|
41
|
-
cursor: 'pointer',
|
|
42
|
-
p: '$2',
|
|
43
|
-
}}
|
|
44
|
-
>
|
|
45
|
-
<SettingsIcon />
|
|
46
|
-
</Flex>
|
|
47
|
-
</Sheet.Trigger>
|
|
48
|
-
<Sheet.Content
|
|
49
|
-
container={containerRef}
|
|
50
|
-
css={{ bg: '$surface_default', pb: '$1' }}
|
|
51
|
-
onClick={() => onOpenChange(false)}
|
|
52
|
-
>
|
|
53
|
-
<Sheet.Title
|
|
54
|
-
css={{
|
|
55
|
-
display: 'flex',
|
|
56
|
-
color: '$on_surface_high',
|
|
57
|
-
w: '100%',
|
|
58
|
-
justifyContent: 'space-between',
|
|
59
|
-
mt: '$8',
|
|
60
|
-
fontSize: '$md',
|
|
61
|
-
px: '$10',
|
|
62
|
-
pb: '$8',
|
|
63
|
-
borderBottom: '1px solid $border_bright',
|
|
64
|
-
alignItems: 'center',
|
|
65
|
-
}}
|
|
66
|
-
>
|
|
67
|
-
Quality
|
|
68
|
-
<Sheet.Close css={{ color: '$on_surface_high' }} onClick={() => onOpenChange(false)}>
|
|
69
|
-
<CrossIcon />
|
|
70
|
-
</Sheet.Close>
|
|
71
|
-
</Sheet.Title>
|
|
72
|
-
{layers.map(layer => {
|
|
73
|
-
return (
|
|
74
|
-
<Flex
|
|
75
|
-
align="center"
|
|
76
|
-
css={{
|
|
77
|
-
w: '100%',
|
|
78
|
-
bg: '$surface_default',
|
|
79
|
-
'&:hover': {
|
|
80
|
-
bg: '$surface_brighter',
|
|
81
|
-
},
|
|
82
|
-
cursor: 'pointer',
|
|
83
|
-
gap: '$4',
|
|
84
|
-
py: '$8',
|
|
85
|
-
px: '$10',
|
|
86
|
-
}}
|
|
87
|
-
key={layer.width}
|
|
88
|
-
onClick={() => onQualityChange(layer)}
|
|
89
|
-
>
|
|
90
|
-
<Text variant="caption" css={{ fontWeight: '$semiBold' }}>
|
|
91
|
-
{getQualityText(layer)}
|
|
92
|
-
</Text>
|
|
93
|
-
<Text variant="caption" css={{ flex: '1 1 0', c: '$on_surface_low', pl: '$2' }}>
|
|
94
|
-
{getBitrateText(layer)}
|
|
95
|
-
</Text>
|
|
96
|
-
{!isAuto && layer.width === selection?.width && layer.height === selection?.height && (
|
|
97
|
-
<CheckIcon width="16px" height="16px" />
|
|
98
|
-
)}
|
|
99
|
-
</Flex>
|
|
100
|
-
);
|
|
101
|
-
})}
|
|
102
|
-
<Flex
|
|
103
|
-
align="center"
|
|
104
|
-
css={{
|
|
105
|
-
w: '100%',
|
|
106
|
-
bg: '$surface_default',
|
|
107
|
-
'&:hover': {
|
|
108
|
-
bg: '$surface_brighter',
|
|
109
|
-
},
|
|
110
|
-
cursor: 'pointer',
|
|
111
|
-
gap: '$4',
|
|
112
|
-
py: '$8',
|
|
113
|
-
px: '$10',
|
|
114
|
-
}}
|
|
115
|
-
key="auto"
|
|
116
|
-
onClick={() => onQualityChange({ height: 'auto' })}
|
|
117
|
-
>
|
|
118
|
-
<Text variant="caption" css={{ fontWeight: '$semiBold', flex: '1 1 0' }}>
|
|
119
|
-
Auto
|
|
120
|
-
</Text>
|
|
121
|
-
{isAuto && <CheckIcon width="16px" height="16px" />}
|
|
122
|
-
</Flex>
|
|
123
|
-
</Sheet.Content>
|
|
124
|
-
</Sheet.Root>
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
|
-
return (
|
|
128
|
-
<Dropdown.Root open={open} onOpenChange={value => onOpenChange(value)} modal={false}>
|
|
129
|
-
<Dropdown.Trigger asChild data-testid="quality_selector">
|
|
130
|
-
<Flex
|
|
131
|
-
css={{
|
|
132
|
-
color: '$on_primary_high',
|
|
133
|
-
r: '$1',
|
|
134
|
-
cursor: 'pointer',
|
|
135
|
-
p: '$2',
|
|
136
|
-
}}
|
|
137
|
-
>
|
|
138
|
-
<Tooltip title="Select Quality" side="top">
|
|
139
|
-
<Flex align="center">
|
|
140
|
-
<Box
|
|
141
|
-
css={{
|
|
142
|
-
w: '$9',
|
|
143
|
-
h: '$9',
|
|
144
|
-
display: 'inline-flex',
|
|
145
|
-
alignItems: 'center',
|
|
146
|
-
c: '$on_surface_high',
|
|
147
|
-
}}
|
|
148
|
-
>
|
|
149
|
-
<SettingsIcon />
|
|
150
|
-
</Box>
|
|
151
|
-
<Text
|
|
152
|
-
variant={{
|
|
153
|
-
'@md': 'sm',
|
|
154
|
-
'@sm': 'xs',
|
|
155
|
-
'@xs': 'tiny',
|
|
156
|
-
}}
|
|
157
|
-
css={{ display: 'flex', alignItems: 'center', ml: '$2', c: '$on_surface_medium' }}
|
|
158
|
-
>
|
|
159
|
-
{isAuto && (
|
|
160
|
-
<>
|
|
161
|
-
Auto
|
|
162
|
-
<Box
|
|
163
|
-
css={{
|
|
164
|
-
mx: '$2',
|
|
165
|
-
w: '$2',
|
|
166
|
-
h: '$2',
|
|
167
|
-
background: '$on_surface_medium',
|
|
168
|
-
r: '$1',
|
|
169
|
-
}}
|
|
170
|
-
/>
|
|
171
|
-
</>
|
|
172
|
-
)}
|
|
173
|
-
{selection && Math.min(selection.width || 0, selection.height || 0)}p
|
|
174
|
-
</Text>
|
|
175
|
-
</Flex>
|
|
176
|
-
</Tooltip>
|
|
177
|
-
</Flex>
|
|
178
|
-
</Dropdown.Trigger>
|
|
179
|
-
<Dropdown.Portal container={containerRef}>
|
|
180
|
-
<Dropdown.Content
|
|
181
|
-
sideOffset={5}
|
|
182
|
-
align="end"
|
|
183
|
-
css={{
|
|
184
|
-
height: 'auto',
|
|
185
|
-
maxHeight: '$52',
|
|
186
|
-
w: '$40',
|
|
187
|
-
bg: '$surface_bright',
|
|
188
|
-
py: '$4',
|
|
189
|
-
gap: '$4',
|
|
190
|
-
display: 'grid',
|
|
191
|
-
}}
|
|
192
|
-
>
|
|
193
|
-
{layers.map(layer => {
|
|
194
|
-
return (
|
|
195
|
-
<Dropdown.Item
|
|
196
|
-
onClick={() => onQualityChange(layer)}
|
|
197
|
-
key={layer.width}
|
|
198
|
-
css={{
|
|
199
|
-
bg:
|
|
200
|
-
!isAuto && layer.width === selection?.width && layer.height === selection?.height
|
|
201
|
-
? '$surface_default'
|
|
202
|
-
: '$surface_bright',
|
|
203
|
-
'&:hover': {
|
|
204
|
-
bg: '$surface_brighter',
|
|
205
|
-
},
|
|
206
|
-
p: '$2 $4 $2 $8',
|
|
207
|
-
h: '$12',
|
|
208
|
-
gap: '$2',
|
|
209
|
-
}}
|
|
210
|
-
>
|
|
211
|
-
<Text variant="caption" css={{ fontWeight: '$semiBold' }}>
|
|
212
|
-
{getQualityText(layer)}
|
|
213
|
-
</Text>
|
|
214
|
-
<Text variant="caption" css={{ flex: '1 1 0', c: '$on_surface_low', pl: '$2' }}>
|
|
215
|
-
{getBitrateText(layer)}
|
|
216
|
-
</Text>
|
|
217
|
-
{!isAuto && layer.width === selection?.width && layer.height === selection?.height && (
|
|
218
|
-
<CheckIcon width="16px" height="16px" />
|
|
219
|
-
)}
|
|
220
|
-
</Dropdown.Item>
|
|
221
|
-
);
|
|
222
|
-
})}
|
|
223
|
-
<Dropdown.Item
|
|
224
|
-
onClick={() => onQualityChange({ height: 'auto' })}
|
|
225
|
-
key="auto"
|
|
226
|
-
css={{
|
|
227
|
-
bg: !isAuto ? '$surface_bright' : '$surface_default',
|
|
228
|
-
'&:hover': {
|
|
229
|
-
bg: '$surface_brighter',
|
|
230
|
-
},
|
|
231
|
-
p: '$2 $4 $2 $8',
|
|
232
|
-
h: '$12',
|
|
233
|
-
gap: '$2',
|
|
234
|
-
}}
|
|
235
|
-
>
|
|
236
|
-
<Text variant="caption" css={{ fontWeight: '$semiBold', flex: '1 1 0' }}>
|
|
237
|
-
Auto
|
|
238
|
-
</Text>
|
|
239
|
-
{isAuto && <CheckIcon width="16px" height="16px" />}
|
|
240
|
-
</Dropdown.Item>
|
|
241
|
-
</Dropdown.Content>
|
|
242
|
-
</Dropdown.Portal>
|
|
243
|
-
</Dropdown.Root>
|
|
244
|
-
);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
const getQualityText = (layer: HMSHLSLayer) => `${Math.min(layer.height || 0, layer.width || 0)}p `;
|
|
248
|
-
const getBitrateText = (layer: HMSHLSLayer) => `(${(Number(layer.bitrate / 1000) / 1000).toFixed(2)} Mbps)`;
|