@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,75 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef, useEffect, useState } from 'react';
|
|
2
|
-
import { Flex } from '../../../Layout';
|
|
3
|
-
|
|
4
|
-
export const HMSVideo = forwardRef(({ children, isFullScreen, ...props }, videoRef) => {
|
|
5
|
-
const [width, setWidth] = useState('auto');
|
|
6
|
-
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
const updatingVideoWidth = () => {
|
|
9
|
-
const videoEl = videoRef.current;
|
|
10
|
-
if (!videoEl) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
if (videoEl.videoWidth > videoEl.videoHeight && width !== '100%') {
|
|
14
|
-
setWidth('100%');
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
const videoEl = videoRef.current;
|
|
18
|
-
if (!videoEl) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
videoEl.addEventListener('loadedmetadata', updatingVideoWidth);
|
|
22
|
-
return () => {
|
|
23
|
-
videoEl.removeEventListener('loadedmetadata', updatingVideoWidth);
|
|
24
|
-
};
|
|
25
|
-
}, [videoRef, width]);
|
|
26
|
-
return (
|
|
27
|
-
<Flex
|
|
28
|
-
data-testid="hms-video"
|
|
29
|
-
css={{
|
|
30
|
-
size: '100%',
|
|
31
|
-
position: 'relative',
|
|
32
|
-
justifyContent: 'center',
|
|
33
|
-
transition: 'all 0.3s ease-in-out',
|
|
34
|
-
'@md': {
|
|
35
|
-
'& video': {
|
|
36
|
-
height: isFullScreen ? '' : '$60 !important',
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
'& video::cue': {
|
|
40
|
-
// default for on-surface-high
|
|
41
|
-
color: '#EFF0FA',
|
|
42
|
-
whiteSpace: 'pre-line',
|
|
43
|
-
fontSize: '$sm',
|
|
44
|
-
fontStyle: 'normal',
|
|
45
|
-
fontWeight: '$regular',
|
|
46
|
-
lineHeight: '$sm',
|
|
47
|
-
letterSpacing: '0.25px',
|
|
48
|
-
},
|
|
49
|
-
'& video::-webkit-media-text-track-display': {
|
|
50
|
-
padding: '0 $4',
|
|
51
|
-
boxShadow: '0px 1px 3px 0px #000000A3',
|
|
52
|
-
},
|
|
53
|
-
'& video::-webkit-media-text-track-container': {
|
|
54
|
-
fontSize: '$space$10 !important',
|
|
55
|
-
},
|
|
56
|
-
}}
|
|
57
|
-
direction="column"
|
|
58
|
-
{...props}
|
|
59
|
-
>
|
|
60
|
-
<video
|
|
61
|
-
style={{
|
|
62
|
-
margin: '0 auto',
|
|
63
|
-
objectFit: 'contain',
|
|
64
|
-
width: width,
|
|
65
|
-
height: '100%',
|
|
66
|
-
maxWidth: '100%',
|
|
67
|
-
}}
|
|
68
|
-
ref={videoRef}
|
|
69
|
-
playsInline
|
|
70
|
-
disablePictureInPicture
|
|
71
|
-
/>
|
|
72
|
-
{children}
|
|
73
|
-
</Flex>
|
|
74
|
-
);
|
|
75
|
-
});
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ChevronDownIcon } from '@100mslive/react-icons';
|
|
3
|
-
import { Flex } from '../../../Layout';
|
|
4
|
-
import { Text } from '../../../Text';
|
|
5
|
-
// @ts-ignore: No implicit any
|
|
6
|
-
import { Logo } from '../Header/HeaderComponents';
|
|
7
|
-
import { RoomDetailsRow } from '../RoomDetails/RoomDetailsRow';
|
|
8
|
-
import { useRoomLayoutHeader } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
|
9
|
-
// @ts-ignore
|
|
10
|
-
import { useIsSidepaneTypeOpen, useSidepaneToggle } from '../AppData/useSidepane';
|
|
11
|
-
import { SIDE_PANE_OPTIONS } from '../../common/constants';
|
|
12
|
-
|
|
13
|
-
/*
|
|
14
|
-
player handler --> left -> go live with timer or live, right -> expand icon
|
|
15
|
-
inbetween -> play pause icon, double tap to go back/forward
|
|
16
|
-
seekbar
|
|
17
|
-
half page will have chat or participant view
|
|
18
|
-
*/
|
|
19
|
-
export const HLSViewTitle = () => {
|
|
20
|
-
const { title, details, description } = useRoomLayoutHeader();
|
|
21
|
-
const toggleDetailsPane = useSidepaneToggle(SIDE_PANE_OPTIONS.ROOM_DETAILS);
|
|
22
|
-
const isDetailSidepaneOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.ROOM_DETAILS);
|
|
23
|
-
|
|
24
|
-
if (isDetailSidepaneOpen) {
|
|
25
|
-
return (
|
|
26
|
-
<Flex
|
|
27
|
-
gap="4"
|
|
28
|
-
align="center"
|
|
29
|
-
justify="between"
|
|
30
|
-
css={{
|
|
31
|
-
position: 'relative',
|
|
32
|
-
h: 'fit-content',
|
|
33
|
-
w: '100%',
|
|
34
|
-
borderBottom: '1px solid $border_bright',
|
|
35
|
-
p: '$8',
|
|
36
|
-
backgroundColor: '$surface_dim',
|
|
37
|
-
}}
|
|
38
|
-
>
|
|
39
|
-
<Text variant="sub2" css={{ fontWeight: '$semiBold' }}>
|
|
40
|
-
About Session
|
|
41
|
-
</Text>
|
|
42
|
-
<Flex
|
|
43
|
-
onClick={toggleDetailsPane}
|
|
44
|
-
css={{
|
|
45
|
-
color: '$on_surface_high',
|
|
46
|
-
cursor: 'pointer',
|
|
47
|
-
'&:hover': { opacity: '0.8' },
|
|
48
|
-
}}
|
|
49
|
-
>
|
|
50
|
-
<ChevronDownIcon />
|
|
51
|
-
</Flex>
|
|
52
|
-
</Flex>
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
return (
|
|
56
|
-
<Flex
|
|
57
|
-
gap="4"
|
|
58
|
-
align="center"
|
|
59
|
-
css={{
|
|
60
|
-
position: 'relative',
|
|
61
|
-
h: 'fit-content',
|
|
62
|
-
w: '100%',
|
|
63
|
-
borderBottom: '1px solid $border_bright',
|
|
64
|
-
p: '$8',
|
|
65
|
-
backgroundColor: '$surface_dim',
|
|
66
|
-
}}
|
|
67
|
-
>
|
|
68
|
-
<Logo />
|
|
69
|
-
<Flex direction="column">
|
|
70
|
-
{title ? (
|
|
71
|
-
<Text variant="sub2" css={{ fontWeight: '$semiBold' }}>
|
|
72
|
-
{title}
|
|
73
|
-
</Text>
|
|
74
|
-
) : null}
|
|
75
|
-
<Flex>
|
|
76
|
-
<RoomDetailsRow details={details} />
|
|
77
|
-
{description ? (
|
|
78
|
-
<Text variant="caption" css={{ color: '$on_surface_medium' }} onClick={toggleDetailsPane}>
|
|
79
|
-
...more
|
|
80
|
-
</Text>
|
|
81
|
-
) : null}
|
|
82
|
-
</Flex>
|
|
83
|
-
</Flex>
|
|
84
|
-
</Flex>
|
|
85
|
-
);
|
|
86
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React, { MouseEvent } from 'react';
|
|
2
|
-
import { PauseIcon, PlayIcon } from '@100mslive/react-icons';
|
|
3
|
-
import { IconButton, Tooltip } from '../../..';
|
|
4
|
-
import { useHMSPlayerContext } from './PlayerContext';
|
|
5
|
-
|
|
6
|
-
export const PlayPauseButton = ({
|
|
7
|
-
isPaused,
|
|
8
|
-
width = 20,
|
|
9
|
-
height = 20,
|
|
10
|
-
}: {
|
|
11
|
-
isPaused: boolean;
|
|
12
|
-
width?: number;
|
|
13
|
-
height?: number;
|
|
14
|
-
}) => {
|
|
15
|
-
const { hlsPlayer } = useHMSPlayerContext();
|
|
16
|
-
const onClick = async (event: MouseEvent) => {
|
|
17
|
-
event?.stopPropagation();
|
|
18
|
-
isPaused ? await hlsPlayer?.play() : hlsPlayer?.pause();
|
|
19
|
-
};
|
|
20
|
-
return (
|
|
21
|
-
<Tooltip title={isPaused ? 'Play' : 'Pause'} side="top">
|
|
22
|
-
<IconButton onClick={onClick} data-testid="play_pause_btn">
|
|
23
|
-
{isPaused ? <PlayIcon width={width} height={height} /> : <PauseIcon width={width} height={height} />}
|
|
24
|
-
</IconButton>
|
|
25
|
-
</Tooltip>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useMedia } from 'react-use';
|
|
3
|
-
import { BackwardArrowIcon, ForwardArrowIcon } from '@100mslive/react-icons';
|
|
4
|
-
import { Box, Flex } from '../../../Layout';
|
|
5
|
-
import { Text } from '../../../Text';
|
|
6
|
-
import { config } from '../../../Theme';
|
|
7
|
-
import { PlayPauseButton } from './PlayPauseButton';
|
|
8
|
-
import { SeekControl } from './SeekControl';
|
|
9
|
-
import { useIsLandscape } from '../../common/hooks';
|
|
10
|
-
|
|
11
|
-
// desktop buttons
|
|
12
|
-
export const PlayPauseSeekControls = ({
|
|
13
|
-
isPaused,
|
|
14
|
-
onSeekTo,
|
|
15
|
-
}: {
|
|
16
|
-
isPaused: boolean;
|
|
17
|
-
onSeekTo: (value: number) => void;
|
|
18
|
-
}) => {
|
|
19
|
-
return (
|
|
20
|
-
<>
|
|
21
|
-
<SeekControl
|
|
22
|
-
onClick={e => {
|
|
23
|
-
e.stopPropagation();
|
|
24
|
-
onSeekTo(-10);
|
|
25
|
-
}}
|
|
26
|
-
title="backward"
|
|
27
|
-
>
|
|
28
|
-
<BackwardArrowIcon width={20} height={20} />
|
|
29
|
-
</SeekControl>
|
|
30
|
-
<PlayPauseButton isPaused={isPaused} />
|
|
31
|
-
<SeekControl
|
|
32
|
-
onClick={e => {
|
|
33
|
-
e.stopPropagation();
|
|
34
|
-
onSeekTo(10);
|
|
35
|
-
}}
|
|
36
|
-
title="forward"
|
|
37
|
-
>
|
|
38
|
-
<ForwardArrowIcon width={20} height={20} />
|
|
39
|
-
</SeekControl>
|
|
40
|
-
</>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
// overlay handlers
|
|
45
|
-
export const PlayPauseSeekOverlayControls = ({
|
|
46
|
-
isPaused,
|
|
47
|
-
showControls,
|
|
48
|
-
hoverControlsVisible,
|
|
49
|
-
}: {
|
|
50
|
-
isPaused: boolean;
|
|
51
|
-
showControls: boolean;
|
|
52
|
-
hoverControlsVisible: {
|
|
53
|
-
seekBackward: boolean;
|
|
54
|
-
seekForward: boolean;
|
|
55
|
-
pausePlay: boolean;
|
|
56
|
-
};
|
|
57
|
-
}) => {
|
|
58
|
-
const isMobile = useMedia(config.media.md);
|
|
59
|
-
const isLandscape = useIsLandscape();
|
|
60
|
-
|
|
61
|
-
if (!isMobile && !isLandscape) {
|
|
62
|
-
// show desktopOverflow icons
|
|
63
|
-
return (
|
|
64
|
-
<>
|
|
65
|
-
<Flex
|
|
66
|
-
css={{
|
|
67
|
-
bg: 'rgba(0, 0, 0, 0.6)',
|
|
68
|
-
r: '$round',
|
|
69
|
-
size: '$24',
|
|
70
|
-
visibility: hoverControlsVisible.seekBackward ? `` : `hidden`,
|
|
71
|
-
opacity: hoverControlsVisible.seekBackward ? `1` : '0',
|
|
72
|
-
}}
|
|
73
|
-
direction="column"
|
|
74
|
-
align="center"
|
|
75
|
-
>
|
|
76
|
-
<SeekControl title="backward">
|
|
77
|
-
<BackwardArrowIcon width={52} height={52} />
|
|
78
|
-
</SeekControl>
|
|
79
|
-
<Text variant="body2" css={{ fontWeight: '$regular' }}>
|
|
80
|
-
10 secs
|
|
81
|
-
</Text>
|
|
82
|
-
</Flex>
|
|
83
|
-
<Box
|
|
84
|
-
css={{
|
|
85
|
-
bg: 'rgba(0, 0, 0, 0.6)',
|
|
86
|
-
r: '$round',
|
|
87
|
-
visibility: hoverControlsVisible.pausePlay ? `` : `hidden`,
|
|
88
|
-
opacity: hoverControlsVisible.pausePlay ? `1` : '0',
|
|
89
|
-
}}
|
|
90
|
-
>
|
|
91
|
-
<PlayPauseButton isPaused={isPaused} width={48} height={48} />
|
|
92
|
-
</Box>
|
|
93
|
-
<Flex
|
|
94
|
-
css={{
|
|
95
|
-
bg: 'rgba(0, 0, 0, 0.6)',
|
|
96
|
-
r: '$round',
|
|
97
|
-
size: '$24',
|
|
98
|
-
visibility: hoverControlsVisible.seekForward ? `` : `hidden`,
|
|
99
|
-
opacity: hoverControlsVisible.seekForward ? `1` : '0',
|
|
100
|
-
}}
|
|
101
|
-
direction="column"
|
|
102
|
-
align="center"
|
|
103
|
-
>
|
|
104
|
-
<SeekControl title="forward">
|
|
105
|
-
<ForwardArrowIcon width={52} height={52} />
|
|
106
|
-
</SeekControl>
|
|
107
|
-
<Text variant="body2" css={{ fontWeight: '$regular' }}>
|
|
108
|
-
10 secs
|
|
109
|
-
</Text>
|
|
110
|
-
</Flex>
|
|
111
|
-
</>
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return (
|
|
116
|
-
<Flex
|
|
117
|
-
align="center"
|
|
118
|
-
justify="center"
|
|
119
|
-
css={{
|
|
120
|
-
position: 'absolute',
|
|
121
|
-
bg: '#00000066',
|
|
122
|
-
display: 'inline-flex',
|
|
123
|
-
gap: '$2',
|
|
124
|
-
zIndex: 1,
|
|
125
|
-
size: '100%',
|
|
126
|
-
visibility: showControls ? `` : `hidden`,
|
|
127
|
-
opacity: showControls ? `1` : '0',
|
|
128
|
-
}}
|
|
129
|
-
>
|
|
130
|
-
<SeekControl
|
|
131
|
-
title="backward"
|
|
132
|
-
css={{
|
|
133
|
-
visibility: hoverControlsVisible.seekBackward ? `` : `hidden`,
|
|
134
|
-
opacity: hoverControlsVisible.seekBackward ? `1` : '0',
|
|
135
|
-
}}
|
|
136
|
-
>
|
|
137
|
-
<BackwardArrowIcon width={32} height={32} />
|
|
138
|
-
</SeekControl>
|
|
139
|
-
<Box
|
|
140
|
-
css={{
|
|
141
|
-
bg: 'rgba(0, 0, 0, 0.6)',
|
|
142
|
-
r: '$round',
|
|
143
|
-
}}
|
|
144
|
-
>
|
|
145
|
-
<PlayPauseButton isPaused={isPaused} width={48} height={48} />
|
|
146
|
-
</Box>
|
|
147
|
-
<SeekControl
|
|
148
|
-
title="forward"
|
|
149
|
-
css={{
|
|
150
|
-
visibility: hoverControlsVisible.seekForward ? `` : `hidden`,
|
|
151
|
-
opacity: hoverControlsVisible.seekForward ? `1` : '0',
|
|
152
|
-
}}
|
|
153
|
-
>
|
|
154
|
-
<ForwardArrowIcon width={32} height={32} />
|
|
155
|
-
</SeekControl>
|
|
156
|
-
</Flex>
|
|
157
|
-
);
|
|
158
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from 'react';
|
|
2
|
-
import { HMSHLSPlayer } from '@100mslive/hls-player';
|
|
3
|
-
|
|
4
|
-
type IHMSPlayerContext = {
|
|
5
|
-
hlsPlayer?: HMSHLSPlayer;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const HMSPlayerContext = React.createContext<IHMSPlayerContext>({
|
|
9
|
-
hlsPlayer: undefined,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export const useHMSPlayerContext = () => {
|
|
13
|
-
const context = useContext(HMSPlayerContext);
|
|
14
|
-
return context;
|
|
15
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React, { MouseEventHandler } from 'react';
|
|
2
|
-
import { IconButton, Tooltip } from '../../..';
|
|
3
|
-
|
|
4
|
-
export const SeekControl = ({
|
|
5
|
-
title,
|
|
6
|
-
onClick,
|
|
7
|
-
children,
|
|
8
|
-
css,
|
|
9
|
-
}: {
|
|
10
|
-
title: string;
|
|
11
|
-
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
12
|
-
css?: any;
|
|
13
|
-
children: React.ReactNode;
|
|
14
|
-
}) => {
|
|
15
|
-
return (
|
|
16
|
-
<Tooltip title={title} side="top">
|
|
17
|
-
<IconButton onClick={onClick} data-testid="backward_forward_arrow_btn" css={css}>
|
|
18
|
-
{children}
|
|
19
|
-
</IconButton>
|
|
20
|
-
</Tooltip>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useState } from 'react';
|
|
2
|
-
import { Box, Flex, Slider } from '../../..';
|
|
3
|
-
import { useHMSPlayerContext } from './PlayerContext';
|
|
4
|
-
import { getDuration, getPercentage } from './utils';
|
|
5
|
-
|
|
6
|
-
export const VideoProgress = ({
|
|
7
|
-
seekProgress,
|
|
8
|
-
setSeekProgress,
|
|
9
|
-
}: {
|
|
10
|
-
seekProgress: boolean;
|
|
11
|
-
setSeekProgress: (value: boolean) => void;
|
|
12
|
-
}) => {
|
|
13
|
-
const { hlsPlayer } = useHMSPlayerContext();
|
|
14
|
-
const [videoProgress, setVideoProgress] = useState<number>(0);
|
|
15
|
-
const [bufferProgress, setBufferProgress] = useState(0);
|
|
16
|
-
const videoEl = hlsPlayer?.getVideoElement();
|
|
17
|
-
|
|
18
|
-
const setProgress = useCallback(() => {
|
|
19
|
-
if (!videoEl) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const duration = getDuration(videoEl);
|
|
23
|
-
const videoProgress = Math.floor(getPercentage(videoEl.currentTime, duration));
|
|
24
|
-
let bufferProgress = 0;
|
|
25
|
-
if (videoEl.buffered.length > 0) {
|
|
26
|
-
bufferProgress = Math.floor(getPercentage(videoEl.buffered?.end(0), duration));
|
|
27
|
-
}
|
|
28
|
-
if (!isNaN(videoProgress)) {
|
|
29
|
-
setVideoProgress(videoProgress);
|
|
30
|
-
}
|
|
31
|
-
if (!isNaN(bufferProgress)) {
|
|
32
|
-
setBufferProgress(bufferProgress);
|
|
33
|
-
}
|
|
34
|
-
}, [videoEl]);
|
|
35
|
-
const timeupdateHandler = useCallback(() => {
|
|
36
|
-
if (!videoEl || seekProgress) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
setProgress();
|
|
40
|
-
}, [seekProgress, setProgress, videoEl]);
|
|
41
|
-
useEffect(() => {
|
|
42
|
-
if (!videoEl) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
setProgress();
|
|
46
|
-
videoEl.addEventListener('timeupdate', timeupdateHandler);
|
|
47
|
-
return function cleanup() {
|
|
48
|
-
videoEl?.removeEventListener('timeupdate', timeupdateHandler);
|
|
49
|
-
};
|
|
50
|
-
}, [setProgress, timeupdateHandler, videoEl]);
|
|
51
|
-
|
|
52
|
-
const onProgress = (progress: number[]) => {
|
|
53
|
-
const progress1 = Math.floor(getPercentage(progress[0], 100));
|
|
54
|
-
const videoEl = hlsPlayer?.getVideoElement();
|
|
55
|
-
if (!videoEl) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
const duration = isFinite(videoEl.duration) ? videoEl.duration : videoEl.seekable?.end(0) || 0;
|
|
59
|
-
const currentTime = (progress1 * duration) / 100;
|
|
60
|
-
hlsPlayer?.seekTo(currentTime);
|
|
61
|
-
setProgress();
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
if (!videoEl) {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
return (
|
|
68
|
-
<Flex align="center" css={{ cursor: 'pointer', h: '$2', alignSelf: 'stretch' }}>
|
|
69
|
-
<Slider
|
|
70
|
-
id="video-actual-rest"
|
|
71
|
-
css={{
|
|
72
|
-
cursor: 'pointer',
|
|
73
|
-
h: '$2',
|
|
74
|
-
zIndex: 1,
|
|
75
|
-
transition: `all .2s ease .5s`,
|
|
76
|
-
}}
|
|
77
|
-
min={0}
|
|
78
|
-
max={100}
|
|
79
|
-
step={1}
|
|
80
|
-
value={[videoProgress]}
|
|
81
|
-
showTooltip={false}
|
|
82
|
-
onValueChange={onProgress}
|
|
83
|
-
onPointerDown={() => setSeekProgress(true)}
|
|
84
|
-
onPointerUp={() => setSeekProgress(false)}
|
|
85
|
-
thumbStyles={{ w: '$6', h: '$6' }}
|
|
86
|
-
/>
|
|
87
|
-
<Box
|
|
88
|
-
id="video-buffer"
|
|
89
|
-
css={{
|
|
90
|
-
h: '$2',
|
|
91
|
-
width: `${bufferProgress - videoProgress}%`,
|
|
92
|
-
background: '$on_surface_high',
|
|
93
|
-
position: 'absolute',
|
|
94
|
-
left: `${videoProgress}%`,
|
|
95
|
-
opacity: '25%',
|
|
96
|
-
}}
|
|
97
|
-
/>
|
|
98
|
-
</Flex>
|
|
99
|
-
);
|
|
100
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useState } from 'react';
|
|
2
|
-
import { HMSHLSPlayerEvents } from '@100mslive/hls-player';
|
|
3
|
-
import { Text } from '../../../Text';
|
|
4
|
-
import { useHMSPlayerContext } from './PlayerContext';
|
|
5
|
-
import { getDuration, getDurationFromSeconds } from './utils';
|
|
6
|
-
|
|
7
|
-
export const VideoTime = () => {
|
|
8
|
-
const { hlsPlayer } = useHMSPlayerContext();
|
|
9
|
-
|
|
10
|
-
const [videoTime, setVideoTime] = useState(getDurationFromSeconds(0));
|
|
11
|
-
|
|
12
|
-
const updateTime = useCallback(
|
|
13
|
-
(currentTime: number) => {
|
|
14
|
-
const videoEl = hlsPlayer?.getVideoElement();
|
|
15
|
-
if (videoEl) {
|
|
16
|
-
const duration = getDuration(videoEl);
|
|
17
|
-
setVideoTime(getDurationFromSeconds(duration - currentTime));
|
|
18
|
-
} else {
|
|
19
|
-
setVideoTime(getDurationFromSeconds(currentTime));
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
[hlsPlayer],
|
|
23
|
-
);
|
|
24
|
-
useEffect(() => {
|
|
25
|
-
const timeupdateHandler = (currentTime: number) => {
|
|
26
|
-
updateTime(currentTime);
|
|
27
|
-
};
|
|
28
|
-
if (hlsPlayer) {
|
|
29
|
-
hlsPlayer.on(HMSHLSPlayerEvents.CURRENT_TIME, timeupdateHandler);
|
|
30
|
-
const videoEl = hlsPlayer?.getVideoElement();
|
|
31
|
-
updateTime(videoEl.currentTime);
|
|
32
|
-
}
|
|
33
|
-
return function cleanup() {
|
|
34
|
-
hlsPlayer?.off(HMSHLSPlayerEvents.CURRENT_TIME, timeupdateHandler);
|
|
35
|
-
};
|
|
36
|
-
}, [hlsPlayer, updateTime]);
|
|
37
|
-
|
|
38
|
-
return hlsPlayer ? (
|
|
39
|
-
<Text
|
|
40
|
-
variant="body1"
|
|
41
|
-
css={{
|
|
42
|
-
minWidth: '$16',
|
|
43
|
-
c: '$on_surface_medium',
|
|
44
|
-
display: 'flex',
|
|
45
|
-
justifyContent: 'center',
|
|
46
|
-
fontWeight: '$regular',
|
|
47
|
-
}}
|
|
48
|
-
>
|
|
49
|
-
-{videoTime}
|
|
50
|
-
</Text>
|
|
51
|
-
) : null;
|
|
52
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { VolumeOneIcon, VolumeTwoIcon, VolumeZeroIcon } from '@100mslive/react-icons';
|
|
3
|
-
import { Flex, Slider } from '../../..';
|
|
4
|
-
import { useHMSPlayerContext } from './PlayerContext';
|
|
5
|
-
|
|
6
|
-
export const VolumeControl = () => {
|
|
7
|
-
const { hlsPlayer } = useHMSPlayerContext();
|
|
8
|
-
const [volume, setVolume] = useState(hlsPlayer?.volume ?? 100);
|
|
9
|
-
const [showSlider, setShowSlider] = useState(false);
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<Flex
|
|
13
|
-
align="center"
|
|
14
|
-
css={{ color: '$on_surface_high' }}
|
|
15
|
-
onMouseOver={event => {
|
|
16
|
-
event.stopPropagation();
|
|
17
|
-
setShowSlider(true);
|
|
18
|
-
}}
|
|
19
|
-
onMouseLeave={event => {
|
|
20
|
-
event.stopPropagation();
|
|
21
|
-
setShowSlider(false);
|
|
22
|
-
}}
|
|
23
|
-
>
|
|
24
|
-
<VolumeIcon
|
|
25
|
-
volume={volume}
|
|
26
|
-
onClick={() => {
|
|
27
|
-
if (volume > 0) {
|
|
28
|
-
setVolume(0);
|
|
29
|
-
hlsPlayer?.setVolume(0);
|
|
30
|
-
} else {
|
|
31
|
-
setVolume(100);
|
|
32
|
-
hlsPlayer?.setVolume(100);
|
|
33
|
-
}
|
|
34
|
-
}}
|
|
35
|
-
/>
|
|
36
|
-
<Slider
|
|
37
|
-
css={{
|
|
38
|
-
mx: '$4',
|
|
39
|
-
w: '$20',
|
|
40
|
-
cursor: 'pointer',
|
|
41
|
-
'@sm': { w: '$14' },
|
|
42
|
-
'@xs': { w: '$14' },
|
|
43
|
-
opacity: showSlider ? '1' : '0',
|
|
44
|
-
display: showSlider ? '' : 'none',
|
|
45
|
-
transition: `all .2s ease .5s`,
|
|
46
|
-
}}
|
|
47
|
-
min={0}
|
|
48
|
-
max={100}
|
|
49
|
-
step={1}
|
|
50
|
-
value={[volume]}
|
|
51
|
-
onValueChange={volume => {
|
|
52
|
-
hlsPlayer?.setVolume(volume[0]);
|
|
53
|
-
setVolume(volume[0]);
|
|
54
|
-
}}
|
|
55
|
-
thumbStyles={{ w: '$6', h: '$6' }}
|
|
56
|
-
/>
|
|
57
|
-
</Flex>
|
|
58
|
-
);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const VolumeIcon = ({ volume, onClick }: { volume: number; onClick: () => void }) => {
|
|
62
|
-
if (volume === 0) {
|
|
63
|
-
return <VolumeZeroIcon style={{ cursor: 'pointer', transition: 'color 0.3s' }} onClick={onClick} />;
|
|
64
|
-
}
|
|
65
|
-
return volume < 50 ? (
|
|
66
|
-
<VolumeOneIcon style={{ cursor: 'pointer', transition: 'color 0.3s' }} onClick={onClick} />
|
|
67
|
-
) : (
|
|
68
|
-
<VolumeTwoIcon style={{ cursor: 'pointer', transition: 'color 0.3s' }} onClick={onClick} />
|
|
69
|
-
);
|
|
70
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
|
-
import { LeftControls, RightControls, VideoControls } from './Controls';
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
import { HMSVideo } from './HMSVideo';
|
|
5
|
-
import { PlayPauseSeekControls, PlayPauseSeekOverlayControls } from './PlayPauseSeekControls';
|
|
6
|
-
import { VideoProgress } from './VideoProgress';
|
|
7
|
-
import { VideoTime } from './VideoTime';
|
|
8
|
-
import { VolumeControl } from './VolumeControl';
|
|
9
|
-
|
|
10
|
-
export const HMSVideoPlayer = {
|
|
11
|
-
Root: HMSVideo,
|
|
12
|
-
Progress: VideoProgress,
|
|
13
|
-
Duration: VideoTime,
|
|
14
|
-
Volume: VolumeControl,
|
|
15
|
-
Controls: {
|
|
16
|
-
Root: VideoControls,
|
|
17
|
-
Left: LeftControls,
|
|
18
|
-
Right: RightControls,
|
|
19
|
-
},
|
|
20
|
-
PlayPauseSeekControls: {
|
|
21
|
-
Overlay: PlayPauseSeekOverlayControls,
|
|
22
|
-
Button: PlayPauseSeekControls,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export function getPercentage(a: number, b: number) {
|
|
2
|
-
return (a / b) * 100;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Take a time in seconds and return its equivalent time in hh:mm:ss format
|
|
7
|
-
* @param {number} timeInSeconds if given as floating point value, it is floored.
|
|
8
|
-
*
|
|
9
|
-
* @returns a string representing timeInSeconds in HH:MM:SS format.
|
|
10
|
-
*/
|
|
11
|
-
export function getDurationFromSeconds(timeInSeconds: number) {
|
|
12
|
-
let time = Math.floor(timeInSeconds);
|
|
13
|
-
const hours = Math.floor(time / 3600);
|
|
14
|
-
time = time - hours * 3600;
|
|
15
|
-
const minutes = Math.floor(time / 60);
|
|
16
|
-
const seconds = Math.floor(time - minutes * 60);
|
|
17
|
-
|
|
18
|
-
const prefixedMinutes = `${minutes < 10 ? `0${minutes}` : minutes}`;
|
|
19
|
-
const prefixedSeconds = `${seconds < 10 ? `0${seconds}` : seconds}`;
|
|
20
|
-
|
|
21
|
-
let videoTimeStr = `${prefixedMinutes}:${prefixedSeconds}`;
|
|
22
|
-
if (hours) {
|
|
23
|
-
const prefixedHours = `${hours < 10 ? `0${hours}` : hours}`;
|
|
24
|
-
videoTimeStr = `${prefixedHours}:${prefixedMinutes}:${prefixedSeconds}`;
|
|
25
|
-
}
|
|
26
|
-
return videoTimeStr;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function getDuration(videoEl: HTMLVideoElement): number {
|
|
30
|
-
if (isFinite(videoEl.duration)) {
|
|
31
|
-
return videoEl.duration;
|
|
32
|
-
}
|
|
33
|
-
if (videoEl.seekable.length > 0) {
|
|
34
|
-
return videoEl.seekable.end(0);
|
|
35
|
-
}
|
|
36
|
-
return 0;
|
|
37
|
-
}
|