@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,794 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { useFullscreen, useMedia, usePrevious, useToggle } from 'react-use';
|
|
3
|
-
import { HLSPlaybackState, HMSHLSPlayer, HMSHLSPlayerEvents } from '@100mslive/hls-player';
|
|
4
|
-
import screenfull from 'screenfull';
|
|
5
|
-
import { match, P } from 'ts-pattern';
|
|
6
|
-
import {
|
|
7
|
-
HLSPlaylistType,
|
|
8
|
-
HMSNotificationTypes,
|
|
9
|
-
selectAppData,
|
|
10
|
-
selectHLSState,
|
|
11
|
-
selectPeerNameByID,
|
|
12
|
-
selectPollByID,
|
|
13
|
-
useHMSActions,
|
|
14
|
-
useHMSNotifications,
|
|
15
|
-
useHMSStore,
|
|
16
|
-
useHMSVanillaStore,
|
|
17
|
-
} from '@100mslive/react-sdk';
|
|
18
|
-
import { ColoredHandIcon, GoLiveIcon } from '@100mslive/react-icons';
|
|
19
|
-
import { ChatToggle } from '../components/Footer/ChatToggle';
|
|
20
|
-
import { HlsStatsOverlay } from '../components/HlsStatsOverlay';
|
|
21
|
-
import { HMSVideoPlayer } from '../components/HMSVideo';
|
|
22
|
-
import { FullScreenButton } from '../components/HMSVideo/FullscreenButton';
|
|
23
|
-
import { HLSAutoplayBlockedPrompt } from '../components/HMSVideo/HLSAutoplayBlockedPrompt';
|
|
24
|
-
import { HLSCaptionSelector } from '../components/HMSVideo/HLSCaptionSelector';
|
|
25
|
-
import { HLSQualitySelector } from '../components/HMSVideo/HLSQualitySelector';
|
|
26
|
-
import { HLSViewTitle } from '../components/HMSVideo/MwebHLSViewTitle';
|
|
27
|
-
import { HMSPlayerContext } from '../components/HMSVideo/PlayerContext';
|
|
28
|
-
import { LeaveRoom } from '../components/Leave/LeaveRoom';
|
|
29
|
-
import { ToastManager } from '../components/Toast/ToastManager';
|
|
30
|
-
import { Button } from '../../Button';
|
|
31
|
-
import { IconButton } from '../../IconButton';
|
|
32
|
-
import { Box, Flex } from '../../Layout';
|
|
33
|
-
import { Loading } from '../../Loading';
|
|
34
|
-
import { Text } from '../../Text';
|
|
35
|
-
import { config, theme, useTheme } from '../../Theme';
|
|
36
|
-
import { Tooltip } from '../../Tooltip';
|
|
37
|
-
import { useHMSPrebuiltContext } from '../AppContext';
|
|
38
|
-
import { WaitingView } from './WaitingView';
|
|
39
|
-
import { useSidepaneToggle } from '../components/AppData/useSidepane';
|
|
40
|
-
import { useRoomLayoutConferencingScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
|
41
|
-
import { useIsLandscape, useKeyboardHandler } from '../common/hooks';
|
|
42
|
-
import { APP_DATA, EMOJI_REACTION_TYPE, POLL_STATE, POLL_VIEWS, SIDE_PANE_OPTIONS } from '../common/constants';
|
|
43
|
-
|
|
44
|
-
let hlsPlayer;
|
|
45
|
-
const toastMap = {};
|
|
46
|
-
|
|
47
|
-
const ToggleChat = ({ isFullScreen = false }) => {
|
|
48
|
-
const { elements } = useRoomLayoutConferencingScreen();
|
|
49
|
-
const sidepane = useHMSStore(selectAppData(APP_DATA.sidePane));
|
|
50
|
-
const showChat = !!elements?.chat;
|
|
51
|
-
const isMobile = useMedia(config.media.md);
|
|
52
|
-
const hmsActions = useHMSActions();
|
|
53
|
-
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
match({ sidepane, isMobile, showChat, isFullScreen })
|
|
56
|
-
.with({ isFullScreen: true }, () => {
|
|
57
|
-
hmsActions.setAppData(APP_DATA.sidePane, '');
|
|
58
|
-
})
|
|
59
|
-
.with({ isMobile: true, showChat: true, sidepane: P.when(value => !value) }, () => {
|
|
60
|
-
hmsActions.setAppData(APP_DATA.sidePane, SIDE_PANE_OPTIONS.CHAT);
|
|
61
|
-
})
|
|
62
|
-
.with({ showChat: false, isMobile: true, sidepane: SIDE_PANE_OPTIONS.CHAT }, () => {
|
|
63
|
-
hmsActions.setAppData(APP_DATA.sidePane, '');
|
|
64
|
-
})
|
|
65
|
-
.otherwise(() => {
|
|
66
|
-
//do nothing
|
|
67
|
-
});
|
|
68
|
-
}, [sidepane, isMobile, showChat, hmsActions, isFullScreen]);
|
|
69
|
-
return null;
|
|
70
|
-
};
|
|
71
|
-
const HLSView = () => {
|
|
72
|
-
const videoRef = useRef(null);
|
|
73
|
-
const hlsViewRef = useRef();
|
|
74
|
-
const { elements } = useRoomLayoutConferencingScreen();
|
|
75
|
-
const hlsState = useHMSStore(selectHLSState);
|
|
76
|
-
const enablHlsStats = useHMSStore(selectAppData(APP_DATA.hlsStats));
|
|
77
|
-
const notification = useHMSNotifications(HMSNotificationTypes.POLL_STOPPED);
|
|
78
|
-
const hmsActions = useHMSActions();
|
|
79
|
-
const { themeType } = useTheme();
|
|
80
|
-
const [streamEnded, setStreamEnded] = useState(false);
|
|
81
|
-
let [hlsStatsState, setHlsStatsState] = useState(null);
|
|
82
|
-
const hlsUrl = hlsState.variants[0]?.url;
|
|
83
|
-
const { endpoints, managementToken } = useHMSPrebuiltContext();
|
|
84
|
-
const [resolvedHlsUrl, setResolvedHlsUrl] = useState(null);
|
|
85
|
-
const [availableLayers, setAvailableLayers] = useState([]);
|
|
86
|
-
const [isVideoLive, setIsVideoLive] = useState(true);
|
|
87
|
-
const [isCaptionEnabled, setIsCaptionEnabled] = useState(true);
|
|
88
|
-
const [hasCaptions, setHasCaptions] = useState(false);
|
|
89
|
-
const [currentSelectedQuality, setCurrentSelectedQuality] = useState(null);
|
|
90
|
-
const [isHlsAutoplayBlocked, setIsHlsAutoplayBlocked] = useState(false);
|
|
91
|
-
const [hoverControlsVisible, setHoverControlsVisible] = useState({
|
|
92
|
-
seekForward: false,
|
|
93
|
-
pausePlay: false,
|
|
94
|
-
seekBackward: false,
|
|
95
|
-
});
|
|
96
|
-
const [isPaused, setIsPaused] = useState(false);
|
|
97
|
-
const [show, toggle] = useToggle(false);
|
|
98
|
-
const lastHlsUrl = usePrevious(resolvedHlsUrl);
|
|
99
|
-
const vanillaStore = useHMSVanillaStore();
|
|
100
|
-
const [controlsVisible, setControlsVisible] = useState(true);
|
|
101
|
-
const [isUserSelectedAuto, setIsUserSelectedAuto] = useState(true);
|
|
102
|
-
const [qualityDropDownOpen, setQualityDropDownOpen] = useState(false);
|
|
103
|
-
const controlsRef = useRef(null);
|
|
104
|
-
const controlsTimerRef = useRef();
|
|
105
|
-
const [seekProgress, setSeekProgress] = useState(false);
|
|
106
|
-
const isFullScreenSupported = screenfull.isEnabled;
|
|
107
|
-
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
|
108
|
-
const showChat = !!elements?.chat;
|
|
109
|
-
|
|
110
|
-
const isMobile = useMedia(config.media.md);
|
|
111
|
-
const isLandscape = useIsLandscape();
|
|
112
|
-
|
|
113
|
-
const isFullScreen = useFullscreen(hlsViewRef, show, {
|
|
114
|
-
onClose: () => toggle(false),
|
|
115
|
-
});
|
|
116
|
-
const [showLoader, setShowLoader] = useState(false);
|
|
117
|
-
|
|
118
|
-
// FIXME: move this logic to player controller in next release
|
|
119
|
-
useEffect(() => {
|
|
120
|
-
/**
|
|
121
|
-
* @type {HTMLVideoElement} videoEl
|
|
122
|
-
*/
|
|
123
|
-
const videoEl = videoRef.current;
|
|
124
|
-
const showLoader = () => setShowLoader(true);
|
|
125
|
-
const hideLoader = () => setShowLoader(false);
|
|
126
|
-
videoEl?.addEventListener('playing', hideLoader);
|
|
127
|
-
videoEl?.addEventListener('waiting', showLoader);
|
|
128
|
-
return () => {
|
|
129
|
-
videoEl?.removeEventListener('playing', hideLoader);
|
|
130
|
-
videoEl?.removeEventListener('waiting', showLoader);
|
|
131
|
-
};
|
|
132
|
-
}, []);
|
|
133
|
-
useEffect(() => {
|
|
134
|
-
if (streamEnded && lastHlsUrl !== hlsUrl) {
|
|
135
|
-
setStreamEnded(false);
|
|
136
|
-
}
|
|
137
|
-
}, [hlsUrl, streamEnded, lastHlsUrl]);
|
|
138
|
-
|
|
139
|
-
// Fetch signed URL from passport-api for authenticated CDN streams
|
|
140
|
-
useEffect(() => {
|
|
141
|
-
if (!hlsUrl) {
|
|
142
|
-
setResolvedHlsUrl(null);
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
if (!hlsUrl.includes('/s/')) {
|
|
146
|
-
setResolvedHlsUrl(hlsUrl);
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
const passportEndpoint = endpoints?.passport;
|
|
150
|
-
if (!passportEndpoint || !managementToken) {
|
|
151
|
-
setResolvedHlsUrl(hlsUrl);
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
let cancelled = false;
|
|
155
|
-
const fetchSignedUrl = async () => {
|
|
156
|
-
try {
|
|
157
|
-
const resp = await fetch(`${passportEndpoint}/token`, {
|
|
158
|
-
method: 'POST',
|
|
159
|
-
headers: {
|
|
160
|
-
'Content-Type': 'application/json',
|
|
161
|
-
Authorization: `Bearer ${managementToken}`,
|
|
162
|
-
},
|
|
163
|
-
body: JSON.stringify({ url: hlsUrl }),
|
|
164
|
-
});
|
|
165
|
-
if (!resp.ok) throw new Error(`passport-api returned ${resp.status}`);
|
|
166
|
-
const data = await resp.json();
|
|
167
|
-
if (!cancelled) {
|
|
168
|
-
setResolvedHlsUrl(data.tokenized_url || hlsUrl);
|
|
169
|
-
}
|
|
170
|
-
} catch (err) {
|
|
171
|
-
console.error('[HLSView] Failed to fetch signed URL from passport-api:', err);
|
|
172
|
-
if (!cancelled) {
|
|
173
|
-
setResolvedHlsUrl(hlsUrl);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
fetchSignedUrl();
|
|
178
|
-
return () => {
|
|
179
|
-
cancelled = true;
|
|
180
|
-
};
|
|
181
|
-
}, [hlsUrl, endpoints?.passport, managementToken]);
|
|
182
|
-
|
|
183
|
-
useEffect(() => {
|
|
184
|
-
if (!notification) return;
|
|
185
|
-
const toastID = toastMap?.[notification.data.id];
|
|
186
|
-
if (toastID) {
|
|
187
|
-
ToastManager.removeToast(toastMap[notification.data.id]);
|
|
188
|
-
delete toastMap[notification.data.id];
|
|
189
|
-
}
|
|
190
|
-
}, [notification]);
|
|
191
|
-
|
|
192
|
-
useEffect(() => {
|
|
193
|
-
const videoElem = videoRef.current;
|
|
194
|
-
const setStreamEndedCallback = () => {
|
|
195
|
-
setStreamEnded(true);
|
|
196
|
-
// no point keeping the callback attached once the streaming is ended
|
|
197
|
-
videoElem?.removeEventListener('ended', setStreamEndedCallback);
|
|
198
|
-
};
|
|
199
|
-
videoElem?.addEventListener('ended', setStreamEndedCallback);
|
|
200
|
-
return () => {
|
|
201
|
-
videoElem?.removeEventListener('ended', setStreamEndedCallback);
|
|
202
|
-
};
|
|
203
|
-
}, [hlsUrl]);
|
|
204
|
-
|
|
205
|
-
const handleQuality = useCallback(
|
|
206
|
-
quality => {
|
|
207
|
-
if (hlsPlayer) {
|
|
208
|
-
setIsUserSelectedAuto(quality.height?.toString().toLowerCase() === 'auto');
|
|
209
|
-
hlsPlayer?.setLayer(quality);
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
[availableLayers], //eslint-disable-line
|
|
213
|
-
);
|
|
214
|
-
/**
|
|
215
|
-
* initialize HMSHLSPlayer and add event listeners.
|
|
216
|
-
*/
|
|
217
|
-
useEffect(() => {
|
|
218
|
-
let videoEl = videoRef.current;
|
|
219
|
-
const manifestLoadedHandler = ({ layers }) => {
|
|
220
|
-
setAvailableLayers(layers);
|
|
221
|
-
setHasCaptions(hlsPlayer?.hasCaptions());
|
|
222
|
-
};
|
|
223
|
-
const layerUpdatedHandler = ({ layer }) => {
|
|
224
|
-
setCurrentSelectedQuality(layer);
|
|
225
|
-
};
|
|
226
|
-
const metadataLoadedHandler = ({ payload, ...rest }) => {
|
|
227
|
-
const parsePayload = str => {
|
|
228
|
-
try {
|
|
229
|
-
return JSON.parse(str);
|
|
230
|
-
} catch (e) {
|
|
231
|
-
return str;
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
const duration = rest.duration;
|
|
235
|
-
const parsedPayload = parsePayload(payload);
|
|
236
|
-
// check if poll happened
|
|
237
|
-
if (parsedPayload.startsWith('poll:')) {
|
|
238
|
-
const pollId = parsedPayload.substr(parsedPayload.indexOf(':') + 1);
|
|
239
|
-
const poll = vanillaStore.getState(selectPollByID(pollId));
|
|
240
|
-
const pollStartedBy = vanillaStore.getState(selectPeerNameByID(poll.startedBy)) || 'Participant';
|
|
241
|
-
// launch poll
|
|
242
|
-
if (!toastMap[pollId]) {
|
|
243
|
-
const toastID = ToastManager.addToast({
|
|
244
|
-
title: `${pollStartedBy} started a ${poll.type}: ${poll.title}`,
|
|
245
|
-
action: (
|
|
246
|
-
<Button
|
|
247
|
-
onClick={() => {
|
|
248
|
-
hmsActions.setAppData(APP_DATA.pollState, {
|
|
249
|
-
[POLL_STATE.pollInView]: pollId,
|
|
250
|
-
[POLL_STATE.view]: POLL_VIEWS.VOTE,
|
|
251
|
-
});
|
|
252
|
-
hmsActions.setAppData(APP_DATA.sidePane, SIDE_PANE_OPTIONS.POLLS);
|
|
253
|
-
}}
|
|
254
|
-
variant="standard"
|
|
255
|
-
css={{
|
|
256
|
-
backgroundColor: '$surface_bright',
|
|
257
|
-
fontWeight: '$semiBold',
|
|
258
|
-
color: '$on_surface_high',
|
|
259
|
-
p: '$xs $md',
|
|
260
|
-
}}
|
|
261
|
-
>
|
|
262
|
-
{poll.type === 'quiz' ? 'Answer' : 'Vote'}
|
|
263
|
-
</Button>
|
|
264
|
-
),
|
|
265
|
-
duration: Infinity,
|
|
266
|
-
});
|
|
267
|
-
toastMap[pollId] = toastID;
|
|
268
|
-
}
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
switch (parsedPayload.type) {
|
|
272
|
-
case EMOJI_REACTION_TYPE:
|
|
273
|
-
window.showFlyingEmoji?.({ emojiId: parsedPayload?.emojiId, senderId: parsedPayload?.senderId });
|
|
274
|
-
break;
|
|
275
|
-
default: {
|
|
276
|
-
const toast = {
|
|
277
|
-
title: `Payload from timed Metadata ${parsedPayload}`,
|
|
278
|
-
duration: duration || 3000,
|
|
279
|
-
};
|
|
280
|
-
console.debug('Added toast ', JSON.stringify(toast));
|
|
281
|
-
ToastManager.addToast(toast);
|
|
282
|
-
break;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
const handleError = data => {
|
|
287
|
-
console.error('[HLSView] error in hls', `${data}`);
|
|
288
|
-
};
|
|
289
|
-
const handleNoLongerLive = ({ isLive }) => {
|
|
290
|
-
setIsVideoLive(isLive);
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
const playbackEventHandler = data => {
|
|
294
|
-
setIsPaused(data.state === HLSPlaybackState.paused);
|
|
295
|
-
setHoverControlsVisible({
|
|
296
|
-
...hoverControlsVisible,
|
|
297
|
-
pausePlay: true,
|
|
298
|
-
});
|
|
299
|
-
setTimeout(() => {
|
|
300
|
-
setHoverControlsVisible({
|
|
301
|
-
...hoverControlsVisible,
|
|
302
|
-
pausePlay: false,
|
|
303
|
-
});
|
|
304
|
-
}, 2000);
|
|
305
|
-
};
|
|
306
|
-
const captionEnabledEventHandler = isCaptionEnabled => {
|
|
307
|
-
setIsCaptionEnabled(isCaptionEnabled);
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
const handleAutoplayBlock = data => setIsHlsAutoplayBlocked(!!data);
|
|
311
|
-
if (videoEl && resolvedHlsUrl) {
|
|
312
|
-
hlsPlayer = new HMSHLSPlayer(resolvedHlsUrl, videoEl);
|
|
313
|
-
hlsPlayer.on(HMSHLSPlayerEvents.SEEK_POS_BEHIND_LIVE_EDGE, handleNoLongerLive);
|
|
314
|
-
hlsPlayer.on(HMSHLSPlayerEvents.TIMED_METADATA_LOADED, metadataLoadedHandler);
|
|
315
|
-
hlsPlayer.on(HMSHLSPlayerEvents.ERROR, handleError);
|
|
316
|
-
hlsPlayer.on(HMSHLSPlayerEvents.PLAYBACK_STATE, playbackEventHandler);
|
|
317
|
-
hlsPlayer.on(HMSHLSPlayerEvents.CAPTION_ENABLED, captionEnabledEventHandler);
|
|
318
|
-
hlsPlayer.on(HMSHLSPlayerEvents.AUTOPLAY_BLOCKED, handleAutoplayBlock);
|
|
319
|
-
|
|
320
|
-
hlsPlayer.on(HMSHLSPlayerEvents.MANIFEST_LOADED, manifestLoadedHandler);
|
|
321
|
-
hlsPlayer.on(HMSHLSPlayerEvents.LAYER_UPDATED, layerUpdatedHandler);
|
|
322
|
-
return () => {
|
|
323
|
-
hlsPlayer.off(HMSHLSPlayerEvents.SEEK_POS_BEHIND_LIVE_EDGE, handleNoLongerLive);
|
|
324
|
-
hlsPlayer.off(HMSHLSPlayerEvents.ERROR, handleError);
|
|
325
|
-
hlsPlayer.off(HMSHLSPlayerEvents.TIMED_METADATA_LOADED, metadataLoadedHandler);
|
|
326
|
-
hlsPlayer.off(HMSHLSPlayerEvents.PLAYBACK_STATE, playbackEventHandler);
|
|
327
|
-
hlsPlayer.off(HMSHLSPlayerEvents.CAPTION_ENABLED, captionEnabledEventHandler);
|
|
328
|
-
|
|
329
|
-
hlsPlayer.off(HMSHLSPlayerEvents.AUTOPLAY_BLOCKED, handleAutoplayBlock);
|
|
330
|
-
hlsPlayer.off(HMSHLSPlayerEvents.MANIFEST_LOADED, manifestLoadedHandler);
|
|
331
|
-
hlsPlayer.off(HMSHLSPlayerEvents.LAYER_UPDATED, layerUpdatedHandler);
|
|
332
|
-
hlsPlayer.reset();
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
336
|
-
}, [resolvedHlsUrl, vanillaStore, hmsActions]);
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
* initialize and subscribe to hlsState
|
|
340
|
-
*/
|
|
341
|
-
useEffect(() => {
|
|
342
|
-
const onHLSStats = state => setHlsStatsState(state);
|
|
343
|
-
if (enablHlsStats) {
|
|
344
|
-
hlsPlayer?.on(HMSHLSPlayerEvents.STATS, onHLSStats);
|
|
345
|
-
} else {
|
|
346
|
-
hlsPlayer?.off(HMSHLSPlayerEvents.STATS, onHLSStats);
|
|
347
|
-
}
|
|
348
|
-
return () => {
|
|
349
|
-
hlsPlayer?.off(HMSHLSPlayerEvents.STATS, onHLSStats);
|
|
350
|
-
};
|
|
351
|
-
}, [enablHlsStats]);
|
|
352
|
-
|
|
353
|
-
const unblockAutoPlay = async () => {
|
|
354
|
-
try {
|
|
355
|
-
await hlsPlayer.play();
|
|
356
|
-
setIsHlsAutoplayBlocked(false);
|
|
357
|
-
} catch (error) {
|
|
358
|
-
console.error('Tried to unblock Autoplay failed with', error.message);
|
|
359
|
-
}
|
|
360
|
-
};
|
|
361
|
-
|
|
362
|
-
const sfnOverlayClose = () => {
|
|
363
|
-
hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats);
|
|
364
|
-
};
|
|
365
|
-
|
|
366
|
-
useEffect(() => {
|
|
367
|
-
if (controlsVisible && isFullScreen && !qualityDropDownOpen) {
|
|
368
|
-
if (controlsTimerRef.current) {
|
|
369
|
-
clearTimeout(controlsTimerRef.current);
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
if (!isFullScreen && controlsTimerRef.current) {
|
|
373
|
-
clearTimeout(controlsTimerRef.current);
|
|
374
|
-
}
|
|
375
|
-
controlsTimerRef.current = setTimeout(() => {
|
|
376
|
-
if (!seekProgress) {
|
|
377
|
-
setControlsVisible(false);
|
|
378
|
-
}
|
|
379
|
-
}, 5000);
|
|
380
|
-
return () => {
|
|
381
|
-
if (controlsTimerRef.current) {
|
|
382
|
-
clearTimeout(controlsTimerRef.current);
|
|
383
|
-
}
|
|
384
|
-
};
|
|
385
|
-
}, [controlsVisible, isFullScreen, seekProgress, qualityDropDownOpen]);
|
|
386
|
-
|
|
387
|
-
const onSeekTo = useCallback(
|
|
388
|
-
seek => {
|
|
389
|
-
match({ isLandscape, isMobile, seek })
|
|
390
|
-
.with({ seek: -10, isMobile: false, isLandscape: false }, () => {
|
|
391
|
-
setHoverControlsVisible({ ...hoverControlsVisible, seekBackward: true });
|
|
392
|
-
setTimeout(() => {
|
|
393
|
-
setHoverControlsVisible({
|
|
394
|
-
...hoverControlsVisible,
|
|
395
|
-
seekBackward: false,
|
|
396
|
-
});
|
|
397
|
-
}, 1000);
|
|
398
|
-
})
|
|
399
|
-
.with({ seek: 10, isMobile: false, isLandscape: false }, () => {
|
|
400
|
-
setHoverControlsVisible({ ...hoverControlsVisible, seekForward: true });
|
|
401
|
-
setTimeout(() => {
|
|
402
|
-
setHoverControlsVisible({
|
|
403
|
-
...hoverControlsVisible,
|
|
404
|
-
seekForward: false,
|
|
405
|
-
});
|
|
406
|
-
}, 1000);
|
|
407
|
-
})
|
|
408
|
-
.otherwise(() => null);
|
|
409
|
-
hlsPlayer?.seekTo(videoRef.current?.currentTime + seek);
|
|
410
|
-
},
|
|
411
|
-
[hoverControlsVisible, isLandscape, isMobile],
|
|
412
|
-
);
|
|
413
|
-
const onDoubleClickHandler = useCallback(
|
|
414
|
-
event => {
|
|
415
|
-
if (!(isMobile || isLandscape) || hlsState?.variants[0]?.playlist_type !== HLSPlaylistType.DVR) {
|
|
416
|
-
return;
|
|
417
|
-
}
|
|
418
|
-
const sidePercentage = (event.screenX * 100) / event.target.clientWidth;
|
|
419
|
-
// there is space for pause/unpause button
|
|
420
|
-
if (sidePercentage < 45) {
|
|
421
|
-
setHoverControlsVisible({
|
|
422
|
-
...hoverControlsVisible,
|
|
423
|
-
seekBackward: true,
|
|
424
|
-
});
|
|
425
|
-
onSeekTo(-10);
|
|
426
|
-
} else {
|
|
427
|
-
setHoverControlsVisible({
|
|
428
|
-
...hoverControlsVisible,
|
|
429
|
-
seekForward: true,
|
|
430
|
-
});
|
|
431
|
-
onSeekTo(10);
|
|
432
|
-
}
|
|
433
|
-
setTimeout(() => {
|
|
434
|
-
setHoverControlsVisible({
|
|
435
|
-
...hoverControlsVisible,
|
|
436
|
-
seekForward: false,
|
|
437
|
-
seekBackward: false,
|
|
438
|
-
});
|
|
439
|
-
}, 1000);
|
|
440
|
-
},
|
|
441
|
-
[hlsState?.variants, hoverControlsVisible, isLandscape, isMobile, onSeekTo],
|
|
442
|
-
);
|
|
443
|
-
|
|
444
|
-
const onClickHandler = useCallback(async () => {
|
|
445
|
-
match({ isMobile, isLandscape, playlist_type: hlsState?.variants[0]?.playlist_type })
|
|
446
|
-
.with({ playlist_type: HLSPlaylistType.DVR, isMobile: false, isLandscape: false }, async () => {
|
|
447
|
-
if (isPaused) {
|
|
448
|
-
await hlsPlayer?.play();
|
|
449
|
-
} else {
|
|
450
|
-
hlsPlayer?.pause();
|
|
451
|
-
}
|
|
452
|
-
})
|
|
453
|
-
.when(
|
|
454
|
-
({ isMobile, isLandscape }) => isMobile || isLandscape,
|
|
455
|
-
() => {
|
|
456
|
-
setControlsVisible(value => !value);
|
|
457
|
-
if (controlsTimerRef.current) {
|
|
458
|
-
clearTimeout(controlsTimerRef.current);
|
|
459
|
-
}
|
|
460
|
-
},
|
|
461
|
-
)
|
|
462
|
-
.otherwise(() => null);
|
|
463
|
-
}, [hlsState?.variants, isLandscape, isMobile, isPaused]);
|
|
464
|
-
|
|
465
|
-
const onHoverHandler = useCallback(
|
|
466
|
-
event => {
|
|
467
|
-
event.preventDefault();
|
|
468
|
-
if (isMobile || isLandscape) {
|
|
469
|
-
return;
|
|
470
|
-
}
|
|
471
|
-
if (event.type === 'mouseenter' || qualityDropDownOpen) {
|
|
472
|
-
setControlsVisible(true);
|
|
473
|
-
return;
|
|
474
|
-
}
|
|
475
|
-
if (event.type === 'mouseleave' && !seekProgress) {
|
|
476
|
-
setControlsVisible(false);
|
|
477
|
-
} else if (!controlsVisible && event.type === 'mousemove') {
|
|
478
|
-
setControlsVisible(true);
|
|
479
|
-
if (controlsTimerRef.current) {
|
|
480
|
-
clearTimeout(controlsTimerRef.current);
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
},
|
|
484
|
-
[controlsVisible, isLandscape, isMobile, qualityDropDownOpen, seekProgress],
|
|
485
|
-
);
|
|
486
|
-
|
|
487
|
-
const keyHandler = useKeyboardHandler(isPaused, hlsPlayer);
|
|
488
|
-
|
|
489
|
-
if (!hlsUrl || streamEnded) {
|
|
490
|
-
return (
|
|
491
|
-
<>
|
|
492
|
-
<ToggleChat />
|
|
493
|
-
{hlsViewRef.current && (isMobile || isLandscape) && (
|
|
494
|
-
<Box css={{ position: 'fixed', left: '$4', top: '$4', zIndex: 11 }}>
|
|
495
|
-
<LeaveRoom screenType="hls_live_streaming" container={hlsViewRef.current} />
|
|
496
|
-
</Box>
|
|
497
|
-
)}
|
|
498
|
-
<Flex
|
|
499
|
-
key="hls-viewer"
|
|
500
|
-
id={`hls-viewer-${themeType}`}
|
|
501
|
-
ref={hlsViewRef}
|
|
502
|
-
direction={isMobile || isLandscape ? 'column' : 'row'}
|
|
503
|
-
justify="center"
|
|
504
|
-
css={{
|
|
505
|
-
flex: isLandscape ? '2 1 0' : '1 1 0',
|
|
506
|
-
}}
|
|
507
|
-
>
|
|
508
|
-
{streamEnded ? (
|
|
509
|
-
<WaitingView
|
|
510
|
-
icon={<ColoredHandIcon height={56} width={56} />}
|
|
511
|
-
title="Stream has ended"
|
|
512
|
-
subtitle="Have a nice day!"
|
|
513
|
-
/>
|
|
514
|
-
) : (
|
|
515
|
-
<WaitingView
|
|
516
|
-
icon={<GoLiveIcon height={56} width={56} style={{ color: 'white' }} />}
|
|
517
|
-
title="Stream yet to start"
|
|
518
|
-
subtitle="Sit back and relax"
|
|
519
|
-
/>
|
|
520
|
-
)}
|
|
521
|
-
</Flex>
|
|
522
|
-
</>
|
|
523
|
-
);
|
|
524
|
-
}
|
|
525
|
-
return (
|
|
526
|
-
<Flex
|
|
527
|
-
key="hls-viewer"
|
|
528
|
-
id={`hls-viewer-${themeType}`}
|
|
529
|
-
ref={hlsViewRef}
|
|
530
|
-
direction={isMobile || isLandscape ? 'column' : 'row'}
|
|
531
|
-
justify="center"
|
|
532
|
-
css={{
|
|
533
|
-
flex: isLandscape ? '2 1 0' : '1 1 0',
|
|
534
|
-
transition: 'all 0.3s ease-in-out',
|
|
535
|
-
}}
|
|
536
|
-
>
|
|
537
|
-
{hlsViewRef.current && (isMobile || isLandscape) && (
|
|
538
|
-
<Box css={{ position: 'fixed', left: '$4', top: '$4', zIndex: 11 }}>
|
|
539
|
-
<LeaveRoom screenType="hls_live_streaming" container={hlsViewRef.current} />
|
|
540
|
-
</Box>
|
|
541
|
-
)}
|
|
542
|
-
|
|
543
|
-
<HMSPlayerContext.Provider value={{ hlsPlayer }}>
|
|
544
|
-
{hlsStatsState?.url && enablHlsStats && !(isMobile || isLandscape) ? (
|
|
545
|
-
<HlsStatsOverlay hlsStatsState={hlsStatsState} onClose={sfnOverlayClose} />
|
|
546
|
-
) : null}
|
|
547
|
-
<Flex
|
|
548
|
-
id="hls-player-container"
|
|
549
|
-
align="center"
|
|
550
|
-
justify="center"
|
|
551
|
-
css={{
|
|
552
|
-
size: '100%',
|
|
553
|
-
margin: '0 auto',
|
|
554
|
-
'@md': {
|
|
555
|
-
height: 'auto',
|
|
556
|
-
},
|
|
557
|
-
outline: 'none',
|
|
558
|
-
}}
|
|
559
|
-
onKeyDown={async event => {
|
|
560
|
-
if (hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR) {
|
|
561
|
-
await keyHandler(event);
|
|
562
|
-
}
|
|
563
|
-
}}
|
|
564
|
-
tabIndex="0"
|
|
565
|
-
>
|
|
566
|
-
{!(isMobile || isLandscape) && (
|
|
567
|
-
<HLSAutoplayBlockedPrompt open={isHlsAutoplayBlocked} unblockAutoPlay={unblockAutoPlay} />
|
|
568
|
-
)}
|
|
569
|
-
{showLoader && (
|
|
570
|
-
<Flex
|
|
571
|
-
align="center"
|
|
572
|
-
justify="center"
|
|
573
|
-
css={{
|
|
574
|
-
position: 'absolute',
|
|
575
|
-
}}
|
|
576
|
-
>
|
|
577
|
-
<Loading width={72} height={72} />
|
|
578
|
-
</Flex>
|
|
579
|
-
)}
|
|
580
|
-
<HMSVideoPlayer.Root
|
|
581
|
-
ref={videoRef}
|
|
582
|
-
onMouseEnter={onHoverHandler}
|
|
583
|
-
onMouseMove={onHoverHandler}
|
|
584
|
-
onMouseLeave={onHoverHandler}
|
|
585
|
-
onClick={onClickHandler}
|
|
586
|
-
isFullScreen={isFullScreen}
|
|
587
|
-
onDoubleClick={e => {
|
|
588
|
-
onDoubleClickHandler(e);
|
|
589
|
-
}}
|
|
590
|
-
>
|
|
591
|
-
<>
|
|
592
|
-
{!(isMobile || isLandscape) && (
|
|
593
|
-
<Flex
|
|
594
|
-
align="center"
|
|
595
|
-
justify="between"
|
|
596
|
-
css={{
|
|
597
|
-
position: 'absolute',
|
|
598
|
-
bg: `${
|
|
599
|
-
hoverControlsVisible.pausePlay ||
|
|
600
|
-
hoverControlsVisible.seekBackward ||
|
|
601
|
-
hoverControlsVisible.seekForward
|
|
602
|
-
? '#00000066'
|
|
603
|
-
: ''
|
|
604
|
-
}`,
|
|
605
|
-
display: 'inline-flex',
|
|
606
|
-
gap: '$2',
|
|
607
|
-
zIndex: 1,
|
|
608
|
-
size: '100%',
|
|
609
|
-
}}
|
|
610
|
-
>
|
|
611
|
-
{!showLoader && hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR && (
|
|
612
|
-
<HMSVideoPlayer.PlayPauseSeekControls.Overlay
|
|
613
|
-
isPaused={isPaused}
|
|
614
|
-
showControls={controlsVisible}
|
|
615
|
-
hoverControlsVisible={hoverControlsVisible}
|
|
616
|
-
/>
|
|
617
|
-
)}
|
|
618
|
-
</Flex>
|
|
619
|
-
)}
|
|
620
|
-
{isMobile || isLandscape ? (
|
|
621
|
-
<>
|
|
622
|
-
{!showLoader && hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR && (
|
|
623
|
-
<HMSVideoPlayer.PlayPauseSeekControls.Overlay
|
|
624
|
-
isPaused={isPaused}
|
|
625
|
-
showControls={controlsVisible}
|
|
626
|
-
hoverControlsVisible={hoverControlsVisible}
|
|
627
|
-
/>
|
|
628
|
-
)}
|
|
629
|
-
<Flex
|
|
630
|
-
ref={controlsRef}
|
|
631
|
-
direction="column"
|
|
632
|
-
justify="start"
|
|
633
|
-
align="start"
|
|
634
|
-
css={{
|
|
635
|
-
position: 'absolute',
|
|
636
|
-
top: '0',
|
|
637
|
-
left: '0',
|
|
638
|
-
width: '100%',
|
|
639
|
-
flexShrink: 0,
|
|
640
|
-
zIndex: 1,
|
|
641
|
-
visibility: controlsVisible ? `` : `hidden`,
|
|
642
|
-
opacity: controlsVisible ? `1` : '0',
|
|
643
|
-
}}
|
|
644
|
-
>
|
|
645
|
-
<HMSVideoPlayer.Controls.Root
|
|
646
|
-
css={{
|
|
647
|
-
p: '$4 $8',
|
|
648
|
-
}}
|
|
649
|
-
onClick={e => e.stopPropagation()}
|
|
650
|
-
>
|
|
651
|
-
<HMSVideoPlayer.Controls.Right>
|
|
652
|
-
{(isLandscape || (isMobile && isFullScreen)) && showChat && (
|
|
653
|
-
<ChatToggle
|
|
654
|
-
onClick={() => {
|
|
655
|
-
if (isFullScreen) {
|
|
656
|
-
toggle();
|
|
657
|
-
}
|
|
658
|
-
// toggle and closing fullscreen takes few ms, to make it synced we are calling settimeout
|
|
659
|
-
setTimeout(() => {
|
|
660
|
-
toggleChat();
|
|
661
|
-
}, 0);
|
|
662
|
-
}}
|
|
663
|
-
/>
|
|
664
|
-
)}
|
|
665
|
-
{hasCaptions && !isHlsAutoplayBlocked && <HLSCaptionSelector isEnabled={isCaptionEnabled} />}
|
|
666
|
-
{hlsViewRef.current && availableLayers.length > 0 && !isHlsAutoplayBlocked ? (
|
|
667
|
-
<HLSQualitySelector
|
|
668
|
-
layers={availableLayers}
|
|
669
|
-
onOpenChange={setQualityDropDownOpen}
|
|
670
|
-
open={qualityDropDownOpen}
|
|
671
|
-
selection={currentSelectedQuality}
|
|
672
|
-
onQualityChange={handleQuality}
|
|
673
|
-
isAuto={isUserSelectedAuto}
|
|
674
|
-
containerRef={hlsViewRef.current}
|
|
675
|
-
/>
|
|
676
|
-
) : null}
|
|
677
|
-
<HLSAutoplayBlockedPrompt open={isHlsAutoplayBlocked} unblockAutoPlay={unblockAutoPlay} />
|
|
678
|
-
</HMSVideoPlayer.Controls.Right>
|
|
679
|
-
</HMSVideoPlayer.Controls.Root>
|
|
680
|
-
</Flex>
|
|
681
|
-
</>
|
|
682
|
-
) : null}
|
|
683
|
-
{controlsVisible && (
|
|
684
|
-
<Flex
|
|
685
|
-
ref={controlsRef}
|
|
686
|
-
direction={isMobile ? 'columnReverse' : 'column'}
|
|
687
|
-
justify="end"
|
|
688
|
-
align="start"
|
|
689
|
-
css={{
|
|
690
|
-
position: 'absolute',
|
|
691
|
-
bottom: isFullScreen && hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR ? '$8' : '0',
|
|
692
|
-
left: '0',
|
|
693
|
-
zIndex: 1,
|
|
694
|
-
background:
|
|
695
|
-
isMobile || isLandscape
|
|
696
|
-
? ''
|
|
697
|
-
: `linear-gradient(180deg, ${theme.colors.background_dim.value}00 29.46%, ${theme.colors.background_dim.value}A3 100%);`,
|
|
698
|
-
width: '100%',
|
|
699
|
-
pt: '$8',
|
|
700
|
-
flexShrink: 0,
|
|
701
|
-
transition: 'visibility 0s 0.5s, opacity 0.5s linear',
|
|
702
|
-
}}
|
|
703
|
-
>
|
|
704
|
-
{hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR ? (
|
|
705
|
-
<HMSVideoPlayer.Progress seekProgress={seekProgress} setSeekProgress={setSeekProgress} />
|
|
706
|
-
) : null}
|
|
707
|
-
<HMSVideoPlayer.Controls.Root
|
|
708
|
-
css={{
|
|
709
|
-
p: '$4 $8',
|
|
710
|
-
}}
|
|
711
|
-
onClick={e => e.stopPropagation()}
|
|
712
|
-
>
|
|
713
|
-
<HMSVideoPlayer.Controls.Left>
|
|
714
|
-
{!(isMobile || isLandscape) && (
|
|
715
|
-
<>
|
|
716
|
-
{hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR ? (
|
|
717
|
-
<>
|
|
718
|
-
<HMSVideoPlayer.PlayPauseSeekControls.Button isPaused={isPaused} onSeekTo={onSeekTo} />
|
|
719
|
-
{!isVideoLive ? <HMSVideoPlayer.Duration /> : null}
|
|
720
|
-
</>
|
|
721
|
-
) : null}
|
|
722
|
-
<HMSVideoPlayer.Volume />
|
|
723
|
-
</>
|
|
724
|
-
)}
|
|
725
|
-
<IconButton
|
|
726
|
-
css={{ px: '$2' }}
|
|
727
|
-
onClick={async e => {
|
|
728
|
-
e.stopPropagation();
|
|
729
|
-
await hlsPlayer?.seekToLivePosition();
|
|
730
|
-
setIsVideoLive(true);
|
|
731
|
-
}}
|
|
732
|
-
key="jump-to-live_btn"
|
|
733
|
-
data-testid="jump-to-live_btn"
|
|
734
|
-
>
|
|
735
|
-
<Tooltip title={isVideoLive ? 'Live' : 'Go to Live'} side="top">
|
|
736
|
-
<Flex justify="center" gap={2} align="center">
|
|
737
|
-
<Box
|
|
738
|
-
css={{
|
|
739
|
-
height: '$4',
|
|
740
|
-
width: '$4',
|
|
741
|
-
background: isVideoLive ? '$alert_error_default' : '$on_primary_medium',
|
|
742
|
-
r: '$1',
|
|
743
|
-
}}
|
|
744
|
-
/>
|
|
745
|
-
<Text
|
|
746
|
-
variant="$body1"
|
|
747
|
-
css={{
|
|
748
|
-
c: isVideoLive ? '$on_surface_high' : '$on_surface_medium',
|
|
749
|
-
fontWeight: '$semiBold',
|
|
750
|
-
}}
|
|
751
|
-
>
|
|
752
|
-
{isVideoLive ? 'LIVE' : 'GO LIVE'}
|
|
753
|
-
</Text>
|
|
754
|
-
</Flex>
|
|
755
|
-
</Tooltip>
|
|
756
|
-
</IconButton>
|
|
757
|
-
{(isMobile || isLandscape) &&
|
|
758
|
-
!isVideoLive &&
|
|
759
|
-
hlsState?.variants[0]?.playlist_type === HLSPlaylistType.DVR ? (
|
|
760
|
-
<HMSVideoPlayer.Duration />
|
|
761
|
-
) : null}
|
|
762
|
-
</HMSVideoPlayer.Controls.Left>
|
|
763
|
-
|
|
764
|
-
<HMSVideoPlayer.Controls.Right>
|
|
765
|
-
{hasCaptions && !(isMobile || isLandscape) && <HLSCaptionSelector isEnabled={isCaptionEnabled} />}
|
|
766
|
-
{availableLayers.length > 0 && !(isMobile || isLandscape) ? (
|
|
767
|
-
<HLSQualitySelector
|
|
768
|
-
layers={availableLayers}
|
|
769
|
-
onOpenChange={setQualityDropDownOpen}
|
|
770
|
-
open={qualityDropDownOpen}
|
|
771
|
-
selection={currentSelectedQuality}
|
|
772
|
-
onQualityChange={handleQuality}
|
|
773
|
-
isAuto={isUserSelectedAuto}
|
|
774
|
-
containerRef={hlsViewRef.current}
|
|
775
|
-
/>
|
|
776
|
-
) : null}
|
|
777
|
-
{isFullScreenSupported ? (
|
|
778
|
-
<FullScreenButton isFullScreen={isFullScreen} onToggle={toggle} />
|
|
779
|
-
) : null}
|
|
780
|
-
</HMSVideoPlayer.Controls.Right>
|
|
781
|
-
</HMSVideoPlayer.Controls.Root>
|
|
782
|
-
</Flex>
|
|
783
|
-
)}
|
|
784
|
-
</>
|
|
785
|
-
</HMSVideoPlayer.Root>
|
|
786
|
-
</Flex>
|
|
787
|
-
</HMSPlayerContext.Provider>
|
|
788
|
-
<ToggleChat isFullScreen={isFullScreen} />
|
|
789
|
-
{isMobile && !isFullScreen && <HLSViewTitle />}
|
|
790
|
-
</Flex>
|
|
791
|
-
);
|
|
792
|
-
};
|
|
793
|
-
|
|
794
|
-
export default HLSView;
|