@100mslive/react-native-room-kit 1.1.5 → 1.1.7
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/lib/commonjs/Icons/CC/assets/cc-off-med.png +0 -0
- package/lib/commonjs/Icons/CC/assets/cc-off-med@2x.png +0 -0
- package/lib/commonjs/Icons/CC/assets/cc-off-med@3x.png +0 -0
- package/lib/commonjs/Icons/CC/assets/cc-on-med.png +0 -0
- package/lib/commonjs/Icons/CC/assets/cc-on-med@2x.png +0 -0
- package/lib/commonjs/Icons/CC/assets/cc-on-med@3x.png +0 -0
- package/lib/commonjs/Icons/CC/index.js +39 -0
- package/lib/commonjs/Icons/CC/index.js.map +1 -0
- package/lib/commonjs/Icons/Close/assets/close-med.png +0 -0
- package/lib/commonjs/Icons/Close/assets/close-med@2x.png +0 -0
- package/lib/commonjs/Icons/Close/assets/close-med@3x.png +0 -0
- package/lib/commonjs/Icons/Close/index.js +7 -2
- package/lib/commonjs/Icons/Close/index.js.map +1 -1
- package/lib/commonjs/Icons/Maximize/assets/maximize-med.png +0 -0
- package/lib/commonjs/Icons/Maximize/assets/maximize-med@2x.png +0 -0
- package/lib/commonjs/Icons/Maximize/assets/maximize-med@3x.png +0 -0
- package/lib/commonjs/Icons/Maximize/index.js +7 -2
- package/lib/commonjs/Icons/Maximize/index.js.map +1 -1
- package/lib/commonjs/Icons/Minimize/assets/minimize-med.png +0 -0
- package/lib/commonjs/Icons/Minimize/assets/minimize-med@2x.png +0 -0
- package/lib/commonjs/Icons/Minimize/assets/minimize-med@3x.png +0 -0
- package/lib/commonjs/Icons/Minimize/index.js +7 -2
- package/lib/commonjs/Icons/Minimize/index.js.map +1 -1
- package/lib/commonjs/Icons/Pause/assets/pause-med.png +0 -0
- package/lib/commonjs/Icons/Pause/assets/pause-med@2x.png +0 -0
- package/lib/commonjs/Icons/Pause/assets/pause-med@3x.png +0 -0
- package/lib/commonjs/Icons/Pause/index.js +35 -0
- package/lib/commonjs/Icons/Pause/index.js.map +1 -0
- package/lib/commonjs/Icons/Play/assets/play-med.png +0 -0
- package/lib/commonjs/Icons/Play/assets/play-med@2x.png +0 -0
- package/lib/commonjs/Icons/Play/assets/play-med@3x.png +0 -0
- package/lib/commonjs/Icons/Play/index.js +35 -0
- package/lib/commonjs/Icons/Play/index.js.map +1 -0
- package/lib/commonjs/Icons/SeekArrow/assets/seek-backward-arrow.png +0 -0
- package/lib/commonjs/Icons/SeekArrow/assets/seek-backward-arrow@2x.png +0 -0
- package/lib/commonjs/Icons/SeekArrow/assets/seek-backward-arrow@3x.png +0 -0
- package/lib/commonjs/Icons/SeekArrow/assets/seek-forward-arrow.png +0 -0
- package/lib/commonjs/Icons/SeekArrow/assets/seek-forward-arrow@2x.png +0 -0
- package/lib/commonjs/Icons/SeekArrow/assets/seek-forward-arrow@3x.png +0 -0
- package/lib/commonjs/Icons/SeekArrow/index.js +34 -0
- package/lib/commonjs/Icons/SeekArrow/index.js.map +1 -0
- package/lib/commonjs/Icons/index.js +44 -0
- package/lib/commonjs/Icons/index.js.map +1 -1
- package/lib/commonjs/components/AnimatedHeader.js +1 -11
- package/lib/commonjs/components/AnimatedHeader.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatBanner.js +1 -0
- package/lib/commonjs/components/Chat/ChatBanner.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js +10 -7
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatList.js +4 -2
- package/lib/commonjs/components/Chat/ChatList.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js +2 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
- package/lib/commonjs/components/DisplayView.js +1 -9
- package/lib/commonjs/components/DisplayView.js.map +1 -1
- package/lib/commonjs/components/Footer.js +7 -44
- package/lib/commonjs/components/Footer.js.map +1 -1
- package/lib/commonjs/components/HLSAnimatedDescriptionPane.js +30 -0
- package/lib/commonjs/components/HLSAnimatedDescriptionPane.js.map +1 -0
- package/lib/commonjs/components/HLSChatFooterView.js +51 -0
- package/lib/commonjs/components/HLSChatFooterView.js.map +1 -0
- package/lib/commonjs/components/HLSChatHeaderView.js +130 -0
- package/lib/commonjs/components/HLSChatHeaderView.js.map +1 -0
- package/lib/commonjs/components/HLSChatMessages.js +54 -0
- package/lib/commonjs/components/HLSChatMessages.js.map +1 -0
- package/lib/commonjs/components/HLSChatView.js +49 -0
- package/lib/commonjs/components/HLSChatView.js.map +1 -0
- package/lib/commonjs/components/HLSCloseMeetingControl.js +41 -0
- package/lib/commonjs/components/HLSCloseMeetingControl.js.map +1 -0
- package/lib/commonjs/components/HLSClosedCaptionControl.js +109 -0
- package/lib/commonjs/components/HLSClosedCaptionControl.js.map +1 -0
- package/lib/commonjs/components/HLSDescriptionPane.js +145 -0
- package/lib/commonjs/components/HLSDescriptionPane.js.map +1 -0
- package/lib/commonjs/components/HLSDescriptionPaneHeader.js +70 -0
- package/lib/commonjs/components/HLSDescriptionPaneHeader.js.map +1 -0
- package/lib/commonjs/components/HLSDistanceFromLive.js +56 -0
- package/lib/commonjs/components/HLSDistanceFromLive.js.map +1 -0
- package/lib/commonjs/components/HLSFooter.js +1 -1
- package/lib/commonjs/components/HLSFooter.js.map +1 -1
- package/lib/commonjs/components/HLSFullScreenControl.js +42 -0
- package/lib/commonjs/components/HLSFullScreenControl.js.map +1 -0
- package/lib/commonjs/components/HLSGoLiveControl.js +78 -0
- package/lib/commonjs/components/HLSGoLiveControl.js.map +1 -0
- package/lib/commonjs/components/HLSHandRaiseButton.js +38 -0
- package/lib/commonjs/components/HLSHandRaiseButton.js.map +1 -0
- package/lib/commonjs/components/HLSManageChatTextInput.js +90 -0
- package/lib/commonjs/components/HLSManageChatTextInput.js.map +1 -0
- package/lib/commonjs/components/HLSNotifications.js +32 -0
- package/lib/commonjs/components/HLSNotifications.js.map +1 -0
- package/lib/commonjs/components/HLSPlayPauseControl.js +62 -0
- package/lib/commonjs/components/HLSPlayPauseControl.js.map +1 -0
- package/lib/commonjs/components/HLSPlayer.js +193 -0
- package/lib/commonjs/components/HLSPlayer.js.map +1 -0
- package/lib/commonjs/components/HLSPlayerContainer.js +123 -0
- package/lib/commonjs/components/HLSPlayerContainer.js.map +1 -0
- package/lib/commonjs/components/HLSPlayerControls.js +130 -0
- package/lib/commonjs/components/HLSPlayerControls.js.map +1 -0
- package/lib/commonjs/components/HLSRecordingStatusText.js +31 -0
- package/lib/commonjs/components/HLSRecordingStatusText.js.map +1 -0
- package/lib/commonjs/components/HLSRoomOptionsButton.js +25 -0
- package/lib/commonjs/components/HLSRoomOptionsButton.js.map +1 -0
- package/lib/commonjs/components/HLSSeekbackwardControl.js +67 -0
- package/lib/commonjs/components/HLSSeekbackwardControl.js.map +1 -0
- package/lib/commonjs/components/HLSSeekbar.js +285 -0
- package/lib/commonjs/components/HLSSeekbar.js.map +1 -0
- package/lib/commonjs/components/HLSSeekforwardControl.js +71 -0
- package/lib/commonjs/components/HLSSeekforwardControl.js.map +1 -0
- package/lib/commonjs/components/HLSStreamStartedTime.js +69 -0
- package/lib/commonjs/components/HLSStreamStartedTime.js.map +1 -0
- package/lib/commonjs/components/HLSViewerScreenContent.js +61 -0
- package/lib/commonjs/components/HLSViewerScreenContent.js.map +1 -0
- package/lib/commonjs/components/HMSHLSMessage.js +19 -41
- package/lib/commonjs/components/HMSHLSMessage.js.map +1 -1
- package/lib/commonjs/components/HMSHLSMessageList.js +2 -2
- package/lib/commonjs/components/HMSHLSMessageList.js.map +1 -1
- package/lib/commonjs/components/HMSHLSNotStarted.js +15 -7
- package/lib/commonjs/components/HMSHLSNotStarted.js.map +1 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js +5 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/commonjs/components/HMSLiveViewerCount.js +2 -4
- package/lib/commonjs/components/HMSLiveViewerCount.js.map +1 -1
- package/lib/commonjs/components/HMSNotification.js +3 -2
- package/lib/commonjs/components/HMSNotification.js.map +1 -1
- package/lib/commonjs/components/HMSNotifications.js +3 -1
- package/lib/commonjs/components/HMSNotifications.js.map +1 -1
- package/lib/commonjs/components/HMSOverlayChatView.js +7 -4
- package/lib/commonjs/components/HMSOverlayChatView.js.map +1 -1
- package/lib/commonjs/components/HMSOverlayMessageView.js +150 -0
- package/lib/commonjs/components/HMSOverlayMessageView.js.map +1 -0
- package/lib/commonjs/components/Meeting.js +3 -1
- package/lib/commonjs/components/Meeting.js.map +1 -1
- package/lib/commonjs/components/MeetingScreenContent.js +2 -9
- package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
- package/lib/commonjs/components/OverlayedViews.js +1 -1
- package/lib/commonjs/components/OverlayedViews.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsList.js +4 -4
- package/lib/commonjs/components/Participants/ParticipantsList.js.map +1 -1
- package/lib/commonjs/components/PressableIcon.js +1 -2
- package/lib/commonjs/components/PressableIcon.js.map +1 -1
- package/lib/commonjs/hooks-util.js +156 -5
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +6 -0
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +24 -3
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/appState.js +25 -1
- package/lib/commonjs/redux/reducers/appState.js.map +1 -1
- package/lib/module/Icons/CC/assets/cc-off-med.png +0 -0
- package/lib/module/Icons/CC/assets/cc-off-med@2x.png +0 -0
- package/lib/module/Icons/CC/assets/cc-off-med@3x.png +0 -0
- package/lib/module/Icons/CC/assets/cc-on-med.png +0 -0
- package/lib/module/Icons/CC/assets/cc-on-med@2x.png +0 -0
- package/lib/module/Icons/CC/assets/cc-on-med@3x.png +0 -0
- package/lib/module/Icons/CC/index.js +31 -0
- package/lib/module/Icons/CC/index.js.map +1 -0
- package/lib/module/Icons/Close/assets/close-med.png +0 -0
- package/lib/module/Icons/Close/assets/close-med@2x.png +0 -0
- package/lib/module/Icons/Close/assets/close-med@3x.png +0 -0
- package/lib/module/Icons/Close/index.js +7 -2
- package/lib/module/Icons/Close/index.js.map +1 -1
- package/lib/module/Icons/Maximize/assets/maximize-med.png +0 -0
- package/lib/module/Icons/Maximize/assets/maximize-med@2x.png +0 -0
- package/lib/module/Icons/Maximize/assets/maximize-med@3x.png +0 -0
- package/lib/module/Icons/Maximize/index.js +7 -2
- package/lib/module/Icons/Maximize/index.js.map +1 -1
- package/lib/module/Icons/Minimize/assets/minimize-med.png +0 -0
- package/lib/module/Icons/Minimize/assets/minimize-med@2x.png +0 -0
- package/lib/module/Icons/Minimize/assets/minimize-med@3x.png +0 -0
- package/lib/module/Icons/Minimize/index.js +7 -2
- package/lib/module/Icons/Minimize/index.js.map +1 -1
- package/lib/module/Icons/Pause/assets/pause-med.png +0 -0
- package/lib/module/Icons/Pause/assets/pause-med@2x.png +0 -0
- package/lib/module/Icons/Pause/assets/pause-med@3x.png +0 -0
- package/lib/module/Icons/Pause/index.js +27 -0
- package/lib/module/Icons/Pause/index.js.map +1 -0
- package/lib/module/Icons/Play/assets/play-med.png +0 -0
- package/lib/module/Icons/Play/assets/play-med@2x.png +0 -0
- package/lib/module/Icons/Play/assets/play-med@3x.png +0 -0
- package/lib/module/Icons/Play/index.js +27 -0
- package/lib/module/Icons/Play/index.js.map +1 -0
- package/lib/module/Icons/SeekArrow/assets/seek-backward-arrow.png +0 -0
- package/lib/module/Icons/SeekArrow/assets/seek-backward-arrow@2x.png +0 -0
- package/lib/module/Icons/SeekArrow/assets/seek-backward-arrow@3x.png +0 -0
- package/lib/module/Icons/SeekArrow/assets/seek-forward-arrow.png +0 -0
- package/lib/module/Icons/SeekArrow/assets/seek-forward-arrow@2x.png +0 -0
- package/lib/module/Icons/SeekArrow/assets/seek-forward-arrow@3x.png +0 -0
- package/lib/module/Icons/SeekArrow/index.js +26 -0
- package/lib/module/Icons/SeekArrow/index.js.map +1 -0
- package/lib/module/Icons/index.js +4 -0
- package/lib/module/Icons/index.js.map +1 -1
- package/lib/module/components/AnimatedHeader.js +1 -11
- package/lib/module/components/AnimatedHeader.js.map +1 -1
- package/lib/module/components/Chat/ChatBanner.js +1 -0
- package/lib/module/components/Chat/ChatBanner.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterBottomSheetOpener.js +10 -7
- package/lib/module/components/Chat/ChatFilterBottomSheetOpener.js.map +1 -1
- package/lib/module/components/Chat/ChatList.js +4 -2
- package/lib/module/components/Chat/ChatList.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js +3 -2
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
- package/lib/module/components/DisplayView.js +3 -11
- package/lib/module/components/DisplayView.js.map +1 -1
- package/lib/module/components/Footer.js +9 -46
- package/lib/module/components/Footer.js.map +1 -1
- package/lib/module/components/HLSAnimatedDescriptionPane.js +21 -0
- package/lib/module/components/HLSAnimatedDescriptionPane.js.map +1 -0
- package/lib/module/components/HLSChatFooterView.js +42 -0
- package/lib/module/components/HLSChatFooterView.js.map +1 -0
- package/lib/module/components/HLSChatHeaderView.js +121 -0
- package/lib/module/components/HLSChatHeaderView.js.map +1 -0
- package/lib/module/components/HLSChatMessages.js +45 -0
- package/lib/module/components/HLSChatMessages.js.map +1 -0
- package/lib/module/components/HLSChatView.js +40 -0
- package/lib/module/components/HLSChatView.js.map +1 -0
- package/lib/module/components/HLSCloseMeetingControl.js +33 -0
- package/lib/module/components/HLSCloseMeetingControl.js.map +1 -0
- package/lib/module/components/HLSClosedCaptionControl.js +100 -0
- package/lib/module/components/HLSClosedCaptionControl.js.map +1 -0
- package/lib/module/components/HLSDescriptionPane.js +136 -0
- package/lib/module/components/HLSDescriptionPane.js.map +1 -0
- package/lib/module/components/HLSDescriptionPaneHeader.js +61 -0
- package/lib/module/components/HLSDescriptionPaneHeader.js.map +1 -0
- package/lib/module/components/HLSDistanceFromLive.js +48 -0
- package/lib/module/components/HLSDistanceFromLive.js.map +1 -0
- package/lib/module/components/HLSFooter.js +2 -2
- package/lib/module/components/HLSFooter.js.map +1 -1
- package/lib/module/components/HLSFullScreenControl.js +34 -0
- package/lib/module/components/HLSFullScreenControl.js.map +1 -0
- package/lib/module/components/HLSGoLiveControl.js +70 -0
- package/lib/module/components/HLSGoLiveControl.js.map +1 -0
- package/lib/module/components/HLSHandRaiseButton.js +29 -0
- package/lib/module/components/HLSHandRaiseButton.js.map +1 -0
- package/lib/module/components/HLSManageChatTextInput.js +81 -0
- package/lib/module/components/HLSManageChatTextInput.js.map +1 -0
- package/lib/module/components/HLSNotifications.js +24 -0
- package/lib/module/components/HLSNotifications.js.map +1 -0
- package/lib/module/components/HLSPlayPauseControl.js +54 -0
- package/lib/module/components/HLSPlayPauseControl.js.map +1 -0
- package/lib/module/components/HLSPlayer.js +185 -0
- package/lib/module/components/HLSPlayer.js.map +1 -0
- package/lib/module/components/HLSPlayerContainer.js +115 -0
- package/lib/module/components/HLSPlayerContainer.js.map +1 -0
- package/lib/module/components/HLSPlayerControls.js +120 -0
- package/lib/module/components/HLSPlayerControls.js.map +1 -0
- package/lib/module/components/HLSRecordingStatusText.js +22 -0
- package/lib/module/components/HLSRecordingStatusText.js.map +1 -0
- package/lib/module/components/HLSRoomOptionsButton.js +16 -0
- package/lib/module/components/HLSRoomOptionsButton.js.map +1 -0
- package/lib/module/components/HLSSeekbackwardControl.js +59 -0
- package/lib/module/components/HLSSeekbackwardControl.js.map +1 -0
- package/lib/module/components/HLSSeekbar.js +276 -0
- package/lib/module/components/HLSSeekbar.js.map +1 -0
- package/lib/module/components/HLSSeekforwardControl.js +63 -0
- package/lib/module/components/HLSSeekforwardControl.js.map +1 -0
- package/lib/module/components/HLSStreamStartedTime.js +60 -0
- package/lib/module/components/HLSStreamStartedTime.js.map +1 -0
- package/lib/module/components/HLSViewerScreenContent.js +53 -0
- package/lib/module/components/HLSViewerScreenContent.js.map +1 -0
- package/lib/module/components/HMSHLSMessage.js +19 -41
- package/lib/module/components/HMSHLSMessage.js.map +1 -1
- package/lib/module/components/HMSHLSMessageList.js +2 -2
- package/lib/module/components/HMSHLSMessageList.js.map +1 -1
- package/lib/module/components/HMSHLSNotStarted.js +15 -7
- package/lib/module/components/HMSHLSNotStarted.js.map +1 -1
- package/lib/module/components/HMSKeyboardAvoidingView.js +5 -1
- package/lib/module/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/module/components/HMSLiveViewerCount.js +3 -5
- package/lib/module/components/HMSLiveViewerCount.js.map +1 -1
- package/lib/module/components/HMSNotification.js +4 -3
- package/lib/module/components/HMSNotification.js.map +1 -1
- package/lib/module/components/HMSNotifications.js +3 -1
- package/lib/module/components/HMSNotifications.js.map +1 -1
- package/lib/module/components/HMSOverlayChatView.js +5 -2
- package/lib/module/components/HMSOverlayChatView.js.map +1 -1
- package/lib/module/components/HMSOverlayMessageView.js +142 -0
- package/lib/module/components/HMSOverlayMessageView.js.map +1 -0
- package/lib/module/components/Meeting.js +4 -2
- package/lib/module/components/Meeting.js.map +1 -1
- package/lib/module/components/MeetingScreenContent.js +3 -10
- package/lib/module/components/MeetingScreenContent.js.map +1 -1
- package/lib/module/components/OverlayedViews.js +2 -2
- package/lib/module/components/OverlayedViews.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsList.js +4 -4
- package/lib/module/components/Participants/ParticipantsList.js.map +1 -1
- package/lib/module/components/PressableIcon.js +1 -2
- package/lib/module/components/PressableIcon.js.map +1 -1
- package/lib/module/hooks-util.js +154 -7
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +6 -0
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +18 -0
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/appState.js +25 -1
- package/lib/module/redux/reducers/appState.js.map +1 -1
- package/lib/typescript/Icons/CC/index.d.ts +9 -0
- package/lib/typescript/Icons/CC/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Close/index.d.ts +1 -0
- package/lib/typescript/Icons/Close/index.d.ts.map +1 -1
- package/lib/typescript/Icons/Maximize/index.d.ts +1 -0
- package/lib/typescript/Icons/Maximize/index.d.ts.map +1 -1
- package/lib/typescript/Icons/Minimize/index.d.ts +1 -0
- package/lib/typescript/Icons/Minimize/index.d.ts.map +1 -1
- package/lib/typescript/Icons/Pause/index.d.ts +8 -0
- package/lib/typescript/Icons/Pause/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Play/index.d.ts +8 -0
- package/lib/typescript/Icons/Play/index.d.ts.map +1 -0
- package/lib/typescript/Icons/SeekArrow/index.d.ts +8 -0
- package/lib/typescript/Icons/SeekArrow/index.d.ts.map +1 -0
- package/lib/typescript/Icons/index.d.ts +4 -0
- package/lib/typescript/Icons/index.d.ts.map +1 -1
- package/lib/typescript/components/AnimatedHeader.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatFilterBottomSheetOpener.d.ts +4 -1
- package/lib/typescript/components/Chat/ChatFilterBottomSheetOpener.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatList.d.ts +4 -1
- package/lib/typescript/components/Chat/ChatList.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsView.d.ts.map +1 -1
- package/lib/typescript/components/CustomButton.d.ts +5 -5
- package/lib/typescript/components/CustomButton.d.ts.map +1 -1
- package/lib/typescript/components/DisplayView.d.ts.map +1 -1
- package/lib/typescript/components/Footer.d.ts.map +1 -1
- package/lib/typescript/components/HLSAnimatedDescriptionPane.d.ts +10 -0
- package/lib/typescript/components/HLSAnimatedDescriptionPane.d.ts.map +1 -0
- package/lib/typescript/components/HLSChatFooterView.d.ts +3 -0
- package/lib/typescript/components/HLSChatFooterView.d.ts.map +1 -0
- package/lib/typescript/components/HLSChatHeaderView.d.ts +7 -0
- package/lib/typescript/components/HLSChatHeaderView.d.ts.map +1 -0
- package/lib/typescript/components/HLSChatMessages.d.ts +3 -0
- package/lib/typescript/components/HLSChatMessages.d.ts.map +1 -0
- package/lib/typescript/components/HLSChatView.d.ts +3 -0
- package/lib/typescript/components/HLSChatView.d.ts.map +1 -0
- package/lib/typescript/components/HLSCloseMeetingControl.d.ts +8 -0
- package/lib/typescript/components/HLSCloseMeetingControl.d.ts.map +1 -0
- package/lib/typescript/components/HLSClosedCaptionControl.d.ts +10 -0
- package/lib/typescript/components/HLSClosedCaptionControl.d.ts.map +1 -0
- package/lib/typescript/components/HLSDescriptionPane.d.ts +6 -0
- package/lib/typescript/components/HLSDescriptionPane.d.ts.map +1 -0
- package/lib/typescript/components/HLSDescriptionPaneHeader.d.ts +9 -0
- package/lib/typescript/components/HLSDescriptionPaneHeader.d.ts.map +1 -0
- package/lib/typescript/components/HLSDistanceFromLive.d.ts +8 -0
- package/lib/typescript/components/HLSDistanceFromLive.d.ts.map +1 -0
- package/lib/typescript/components/HLSFullScreenControl.d.ts +8 -0
- package/lib/typescript/components/HLSFullScreenControl.d.ts.map +1 -0
- package/lib/typescript/components/HLSGoLiveControl.d.ts +10 -0
- package/lib/typescript/components/HLSGoLiveControl.d.ts.map +1 -0
- package/lib/typescript/components/HLSHandRaiseButton.d.ts +3 -0
- package/lib/typescript/components/HLSHandRaiseButton.d.ts.map +1 -0
- package/lib/typescript/components/HLSManageChatTextInput.d.ts +3 -0
- package/lib/typescript/components/HLSManageChatTextInput.d.ts.map +1 -0
- package/lib/typescript/components/HLSNotifications.d.ts +3 -0
- package/lib/typescript/components/HLSNotifications.d.ts.map +1 -0
- package/lib/typescript/components/HLSPlayPauseControl.d.ts +8 -0
- package/lib/typescript/components/HLSPlayPauseControl.d.ts.map +1 -0
- package/lib/typescript/components/HLSPlayer.d.ts +6 -0
- package/lib/typescript/components/HLSPlayer.d.ts.map +1 -0
- package/lib/typescript/components/HLSPlayerContainer.d.ts +4 -0
- package/lib/typescript/components/HLSPlayerContainer.d.ts.map +1 -0
- package/lib/typescript/components/HLSPlayerControls.d.ts +14 -0
- package/lib/typescript/components/HLSPlayerControls.d.ts.map +1 -0
- package/lib/typescript/components/HLSRecordingStatusText.d.ts +9 -0
- package/lib/typescript/components/HLSRecordingStatusText.d.ts.map +1 -0
- package/lib/typescript/components/HLSRoomOptionsButton.d.ts +3 -0
- package/lib/typescript/components/HLSRoomOptionsButton.d.ts.map +1 -0
- package/lib/typescript/components/HLSSeekbackwardControl.d.ts +8 -0
- package/lib/typescript/components/HLSSeekbackwardControl.d.ts.map +1 -0
- package/lib/typescript/components/HLSSeekbar.d.ts +66 -0
- package/lib/typescript/components/HLSSeekbar.d.ts.map +1 -0
- package/lib/typescript/components/HLSSeekforwardControl.d.ts +8 -0
- package/lib/typescript/components/HLSSeekforwardControl.d.ts.map +1 -0
- package/lib/typescript/components/HLSStreamStartedTime.d.ts +6 -0
- package/lib/typescript/components/HLSStreamStartedTime.d.ts.map +1 -0
- package/lib/typescript/components/HLSViewerScreenContent.d.ts +6 -0
- package/lib/typescript/components/HLSViewerScreenContent.d.ts.map +1 -0
- package/lib/typescript/components/HMSHLSMessage.d.ts.map +1 -1
- package/lib/typescript/components/HMSHLSNotStarted.d.ts.map +1 -1
- package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts +2 -0
- package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts.map +1 -1
- package/lib/typescript/components/HMSLiveViewerCount.d.ts.map +1 -1
- package/lib/typescript/components/HMSNotification.d.ts.map +1 -1
- package/lib/typescript/components/HMSNotifications.d.ts.map +1 -1
- package/lib/typescript/components/HMSOverlayChatView.d.ts +2 -2
- package/lib/typescript/components/HMSOverlayChatView.d.ts.map +1 -1
- package/lib/typescript/components/HMSOverlayMessageView.d.ts +8 -0
- package/lib/typescript/components/HMSOverlayMessageView.d.ts.map +1 -0
- package/lib/typescript/components/Meeting.d.ts.map +1 -1
- package/lib/typescript/components/MeetingScreenContent.d.ts.map +1 -1
- package/lib/typescript/components/Modals.d.ts +3 -3
- package/lib/typescript/components/Modals.d.ts.map +1 -1
- package/lib/typescript/components/Participants/ParticipantsList.d.ts.map +1 -1
- package/lib/typescript/components/PressableIcon.d.ts.map +1 -1
- package/lib/typescript/components/Preview.d.ts.map +1 -1
- package/lib/typescript/hooks-util.d.ts +32 -8
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +3 -0
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +18 -0
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +19 -16
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/appState.d.ts +3 -0
- package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +19 -16
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/Icons/CC/assets/cc-off-med.png +0 -0
- package/src/Icons/CC/assets/cc-off-med@2x.png +0 -0
- package/src/Icons/CC/assets/cc-off-med@3x.png +0 -0
- package/src/Icons/CC/assets/cc-on-med.png +0 -0
- package/src/Icons/CC/assets/cc-on-med@2x.png +0 -0
- package/src/Icons/CC/assets/cc-on-med@3x.png +0 -0
- package/src/Icons/CC/index.tsx +51 -0
- package/src/Icons/Close/assets/close-med.png +0 -0
- package/src/Icons/Close/assets/close-med@2x.png +0 -0
- package/src/Icons/Close/assets/close-med@3x.png +0 -0
- package/src/Icons/Close/index.tsx +19 -3
- package/src/Icons/Maximize/assets/maximize-med.png +0 -0
- package/src/Icons/Maximize/assets/maximize-med@2x.png +0 -0
- package/src/Icons/Maximize/assets/maximize-med@3x.png +0 -0
- package/src/Icons/Maximize/index.tsx +19 -3
- package/src/Icons/Minimize/assets/minimize-med.png +0 -0
- package/src/Icons/Minimize/assets/minimize-med@2x.png +0 -0
- package/src/Icons/Minimize/assets/minimize-med@3x.png +0 -0
- package/src/Icons/Minimize/index.tsx +19 -3
- package/src/Icons/Pause/assets/pause-med.png +0 -0
- package/src/Icons/Pause/assets/pause-med@2x.png +0 -0
- package/src/Icons/Pause/assets/pause-med@3x.png +0 -0
- package/src/Icons/Pause/index.tsx +36 -0
- package/src/Icons/Play/assets/play-med.png +0 -0
- package/src/Icons/Play/assets/play-med@2x.png +0 -0
- package/src/Icons/Play/assets/play-med@3x.png +0 -0
- package/src/Icons/Play/index.tsx +36 -0
- package/src/Icons/SeekArrow/assets/seek-backward-arrow.png +0 -0
- package/src/Icons/SeekArrow/assets/seek-backward-arrow@2x.png +0 -0
- package/src/Icons/SeekArrow/assets/seek-backward-arrow@3x.png +0 -0
- package/src/Icons/SeekArrow/assets/seek-forward-arrow.png +0 -0
- package/src/Icons/SeekArrow/assets/seek-forward-arrow@2x.png +0 -0
- package/src/Icons/SeekArrow/assets/seek-forward-arrow@3x.png +0 -0
- package/src/Icons/SeekArrow/index.tsx +40 -0
- package/src/Icons/index.ts +4 -0
- package/src/components/AnimatedHeader.tsx +1 -9
- package/src/components/Chat/ChatBanner.tsx +1 -0
- package/src/components/Chat/ChatFilterBottomSheetOpener.tsx +16 -8
- package/src/components/Chat/ChatList.tsx +4 -1
- package/src/components/ChatAndParticipants/ChatAndParticipantsView.tsx +6 -1
- package/src/components/DisplayView.tsx +9 -23
- package/src/components/Footer.tsx +8 -77
- package/src/components/HLSAnimatedDescriptionPane.tsx +36 -0
- package/src/components/HLSChatFooterView.tsx +53 -0
- package/src/components/HLSChatHeaderView.tsx +165 -0
- package/src/components/HLSChatMessages.tsx +60 -0
- package/src/components/HLSChatView.tsx +55 -0
- package/src/components/HLSCloseMeetingControl.tsx +39 -0
- package/src/components/HLSClosedCaptionControl.tsx +140 -0
- package/src/components/HLSDescriptionPane.tsx +168 -0
- package/src/components/HLSDescriptionPaneHeader.tsx +78 -0
- package/src/components/HLSDistanceFromLive.tsx +69 -0
- package/src/components/HLSFooter.tsx +2 -2
- package/src/components/HLSFullScreenControl.tsx +46 -0
- package/src/components/HLSGoLiveControl.tsx +104 -0
- package/src/components/HLSHandRaiseButton.tsx +41 -0
- package/src/components/HLSManageChatTextInput.tsx +98 -0
- package/src/components/HLSNotifications.tsx +33 -0
- package/src/components/HLSPlayPauseControl.tsx +69 -0
- package/src/components/HLSPlayer.tsx +264 -0
- package/src/components/HLSPlayerContainer.tsx +134 -0
- package/src/components/HLSPlayerControls.tsx +180 -0
- package/src/components/HLSRecordingStatusText.tsx +50 -0
- package/src/components/HLSRoomOptionsButton.tsx +19 -0
- package/src/components/HLSSeekbackwardControl.tsx +88 -0
- package/src/components/HLSSeekbar.tsx +381 -0
- package/src/components/HLSSeekforwardControl.tsx +97 -0
- package/src/components/HLSStreamStartedTime.tsx +79 -0
- package/src/components/HLSViewerScreenContent.tsx +96 -0
- package/src/components/HMSHLSMessage.tsx +32 -49
- package/src/components/HMSHLSMessageList.tsx +2 -2
- package/src/components/HMSHLSNotStarted.tsx +18 -7
- package/src/components/HMSKeyboardAvoidingView.tsx +16 -6
- package/src/components/HMSLiveViewerCount.tsx +2 -8
- package/src/components/HMSNotification.tsx +20 -14
- package/src/components/HMSNotifications.tsx +3 -1
- package/src/components/HMSOverlayChatView.tsx +10 -3
- package/src/components/HMSOverlayMessageView.tsx +189 -0
- package/src/components/Meeting.tsx +9 -1
- package/src/components/MeetingScreenContent.tsx +3 -7
- package/src/components/OverlayedViews.tsx +2 -2
- package/src/components/Participants/ParticipantsList.tsx +12 -10
- package/src/components/PressableIcon.tsx +1 -3
- package/src/hooks-util.ts +223 -6
- package/src/redux/actionTypes.ts +9 -0
- package/src/redux/actions/index.ts +15 -0
- package/src/redux/reducers/appState.ts +24 -0
- package/lib/commonjs/components/CustomHLSPlayerControls.js +0 -80
- package/lib/commonjs/components/CustomHLSPlayerControls.js.map +0 -1
- package/lib/commonjs/components/HLSView.js +0 -195
- package/lib/commonjs/components/HLSView.js.map +0 -1
- package/lib/module/components/CustomHLSPlayerControls.js +0 -72
- package/lib/module/components/CustomHLSPlayerControls.js.map +0 -1
- package/lib/module/components/HLSView.js +0 -186
- package/lib/module/components/HLSView.js.map +0 -1
- package/lib/typescript/components/CustomHLSPlayerControls.d.ts +0 -7
- package/lib/typescript/components/CustomHLSPlayerControls.d.ts.map +0 -1
- package/lib/typescript/components/HLSView.d.ts +0 -4
- package/lib/typescript/components/HLSView.d.ts.map +0 -1
- package/src/components/CustomHLSPlayerControls.tsx +0 -92
- package/src/components/HLSView.tsx +0 -251
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import { View, StyleSheet } from 'react-native';
|
|
3
|
+
import Animated, {
|
|
4
|
+
Easing,
|
|
5
|
+
Extrapolation,
|
|
6
|
+
interpolate,
|
|
7
|
+
runOnJS,
|
|
8
|
+
useAnimatedStyle,
|
|
9
|
+
useDerivedValue,
|
|
10
|
+
useSharedValue,
|
|
11
|
+
withTiming,
|
|
12
|
+
} from 'react-native-reanimated';
|
|
13
|
+
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
|
|
14
|
+
import {
|
|
15
|
+
HMSHLSPlayerPlaybackState,
|
|
16
|
+
HMSHLSPlaylistType,
|
|
17
|
+
useHMSHLSPlayerPlaybackState,
|
|
18
|
+
useHMSHLSPlayerStat,
|
|
19
|
+
} from '@100mslive/react-native-hms';
|
|
20
|
+
import type {
|
|
21
|
+
HLSPlayerDurationDetails,
|
|
22
|
+
HMSHLSPlayer,
|
|
23
|
+
} from '@100mslive/react-native-hms';
|
|
24
|
+
import { useSelector } from 'react-redux';
|
|
25
|
+
|
|
26
|
+
import {
|
|
27
|
+
useHLSStreamResumePause,
|
|
28
|
+
useHLSViewsConstraints,
|
|
29
|
+
useHMSRoomStyle,
|
|
30
|
+
} from '../hooks-util';
|
|
31
|
+
import { useIsHLSStreamingOn } from '../hooks-sdk';
|
|
32
|
+
import type { RootState } from '../redux';
|
|
33
|
+
|
|
34
|
+
interface HLSSeekbarProps {
|
|
35
|
+
playerRef: React.RefObject<React.ElementRef<typeof HMSHLSPlayer>>;
|
|
36
|
+
onStart: () => void;
|
|
37
|
+
onEnd: () => void;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const _HLSSeekbar: React.FC<HLSSeekbarProps> = (props) => {
|
|
41
|
+
const isHLSStreamingOn = useIsHLSStreamingOn();
|
|
42
|
+
const isDVRStream = useSelector((state: RootState) => {
|
|
43
|
+
return (
|
|
44
|
+
state.hmsStates.room?.hlsStreamingState.variants?.[0]?.playlistType ===
|
|
45
|
+
HMSHLSPlaylistType.DVR
|
|
46
|
+
);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
if (!isHLSStreamingOn || !isDVRStream) return null;
|
|
50
|
+
|
|
51
|
+
return <_Seekbar {...props} />;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const _Seekbar: React.FC<HLSSeekbarProps> = React.memo(
|
|
55
|
+
({ playerRef, onStart, onEnd }) => {
|
|
56
|
+
const { playerWrapperConstraints } = useHLSViewsConstraints();
|
|
57
|
+
const hlsPlayerDurationDetails = useRef<null | HLSPlayerDurationDetails>(
|
|
58
|
+
null
|
|
59
|
+
);
|
|
60
|
+
const prevSeekbarPositionValue = useSharedValue(0);
|
|
61
|
+
const seekbarPositionValue = useSharedValue(0);
|
|
62
|
+
const seekbarHeightValue = useSharedValue(4);
|
|
63
|
+
const streamStartedAt = useSelector((state: RootState) => {
|
|
64
|
+
return state.hmsStates.room?.hlsStreamingState.variants?.[0]?.startedAt;
|
|
65
|
+
});
|
|
66
|
+
const distanceFromLiveEdge = useHMSHLSPlayerStat('distanceFromLive');
|
|
67
|
+
const distanceFromLiveEdgeValue = useDerivedValue(
|
|
68
|
+
() => distanceFromLiveEdge,
|
|
69
|
+
[distanceFromLiveEdge]
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
const seekbarRoomStyle = useHMSRoomStyle((theme) => ({
|
|
73
|
+
backgroundColor: theme.palette.primary_default,
|
|
74
|
+
}));
|
|
75
|
+
|
|
76
|
+
const { isPaused, pauseStream, resumeStream } =
|
|
77
|
+
useHLSStreamResumePause(playerRef);
|
|
78
|
+
|
|
79
|
+
const seekToBarPosition = () => {
|
|
80
|
+
if (!streamStartedAt) return;
|
|
81
|
+
const liveStreamDuration = Date.now() - streamStartedAt.getTime();
|
|
82
|
+
const rollingWindowTime =
|
|
83
|
+
hlsPlayerDurationDetails.current?.rollingWindowTime;
|
|
84
|
+
const durationOfStream =
|
|
85
|
+
rollingWindowTime && liveStreamDuration >= rollingWindowTime
|
|
86
|
+
? rollingWindowTime
|
|
87
|
+
: liveStreamDuration;
|
|
88
|
+
|
|
89
|
+
// console.log(
|
|
90
|
+
// '$$$ rolling window time > ',
|
|
91
|
+
// hlsPlayerDurationDetails.current?.rollingWindowTime
|
|
92
|
+
// );
|
|
93
|
+
// console.log('$$$ live stream duration > ', liveStreamDuration);
|
|
94
|
+
// console.log('$$$ current stream duration > ', durationOfStream);
|
|
95
|
+
|
|
96
|
+
const prevPosition = prevSeekbarPositionValue.value;
|
|
97
|
+
const currPosition = seekbarPositionValue.value;
|
|
98
|
+
const diff = currPosition - prevPosition;
|
|
99
|
+
const seekByMillis = (durationOfStream / 100) * Math.abs(diff);
|
|
100
|
+
|
|
101
|
+
const seekBySecs = seekByMillis / 1000;
|
|
102
|
+
if (diff >= 0) {
|
|
103
|
+
playerRef.current?.seekForward(seekBySecs);
|
|
104
|
+
} else {
|
|
105
|
+
playerRef.current?.seekBackward(seekBySecs);
|
|
106
|
+
}
|
|
107
|
+
resumeStream();
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const activeSeekbarStyle = useAnimatedStyle(
|
|
111
|
+
() => ({
|
|
112
|
+
width: interpolate(
|
|
113
|
+
seekbarPositionValue.value,
|
|
114
|
+
[0, 100],
|
|
115
|
+
[0, playerWrapperConstraints.width],
|
|
116
|
+
{
|
|
117
|
+
extrapolateLeft: Extrapolation.CLAMP,
|
|
118
|
+
extrapolateRight: Extrapolation.CLAMP,
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
height: seekbarHeightValue.value,
|
|
122
|
+
}),
|
|
123
|
+
[playerWrapperConstraints.width]
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
const activeSeekbarThumbStyle = useAnimatedStyle(
|
|
127
|
+
() => ({
|
|
128
|
+
width: seekbarHeightValue.value * 3,
|
|
129
|
+
height: seekbarHeightValue.value * 3,
|
|
130
|
+
borderRadius: (seekbarHeightValue.value * 3) / 2,
|
|
131
|
+
bottom: -seekbarHeightValue.value,
|
|
132
|
+
left: -(seekbarHeightValue.value * 3) / 2,
|
|
133
|
+
transform: [
|
|
134
|
+
{
|
|
135
|
+
translateX: interpolate(
|
|
136
|
+
seekbarPositionValue.value,
|
|
137
|
+
[0, 100],
|
|
138
|
+
[0, playerWrapperConstraints.width],
|
|
139
|
+
{
|
|
140
|
+
extrapolateLeft: Extrapolation.CLAMP,
|
|
141
|
+
extrapolateRight: Extrapolation.CLAMP,
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
}),
|
|
147
|
+
[playerWrapperConstraints.width]
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
const panGesture = Gesture.Pan()
|
|
151
|
+
.maxPointers(1)
|
|
152
|
+
.minPointers(1)
|
|
153
|
+
.hitSlop({ top: 12, bottom: 12 })
|
|
154
|
+
.onStart((e) => {
|
|
155
|
+
'worklet';
|
|
156
|
+
onStart();
|
|
157
|
+
runOnJS(pauseStream)();
|
|
158
|
+
prevSeekbarPositionValue.value = seekbarPositionValue.value;
|
|
159
|
+
seekbarPositionValue.value = interpolate(
|
|
160
|
+
e.x,
|
|
161
|
+
[0, playerWrapperConstraints.width],
|
|
162
|
+
[0, 100],
|
|
163
|
+
{
|
|
164
|
+
extrapolateLeft: Extrapolation.CLAMP,
|
|
165
|
+
extrapolateRight: Extrapolation.CLAMP,
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
seekbarHeightValue.value = withTiming(6, {
|
|
169
|
+
duration: 160,
|
|
170
|
+
easing: Easing.linear,
|
|
171
|
+
});
|
|
172
|
+
})
|
|
173
|
+
.onUpdate((e) => {
|
|
174
|
+
'worklet';
|
|
175
|
+
seekbarPositionValue.value = interpolate(
|
|
176
|
+
e.x,
|
|
177
|
+
[0, playerWrapperConstraints.width],
|
|
178
|
+
[0, 100],
|
|
179
|
+
{
|
|
180
|
+
extrapolateLeft: Extrapolation.CLAMP,
|
|
181
|
+
extrapolateRight: Extrapolation.CLAMP,
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
})
|
|
185
|
+
.onEnd(() => {
|
|
186
|
+
'worklet';
|
|
187
|
+
onEnd();
|
|
188
|
+
seekbarHeightValue.value = withTiming(4, {
|
|
189
|
+
duration: 160,
|
|
190
|
+
easing: Easing.linear,
|
|
191
|
+
});
|
|
192
|
+
runOnJS(seekToBarPosition)();
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
React.useEffect(() => {
|
|
196
|
+
if (streamStartedAt && !isPaused) {
|
|
197
|
+
const intervalId = setInterval(() => {
|
|
198
|
+
const liveStreamDuration = Date.now() - streamStartedAt.getTime();
|
|
199
|
+
|
|
200
|
+
const rollingWindowTime =
|
|
201
|
+
hlsPlayerDurationDetails.current?.rollingWindowTime;
|
|
202
|
+
|
|
203
|
+
const durationOfStream =
|
|
204
|
+
rollingWindowTime && liveStreamDuration >= rollingWindowTime
|
|
205
|
+
? rollingWindowTime
|
|
206
|
+
: liveStreamDuration;
|
|
207
|
+
|
|
208
|
+
// console.log(
|
|
209
|
+
// '$$$ rolling window time > ',
|
|
210
|
+
// hlsPlayerDurationDetails.current?.rollingWindowTime
|
|
211
|
+
// );
|
|
212
|
+
// console.log('$$$ live stream duration > ', liveStreamDuration);
|
|
213
|
+
// console.log('$$$ current stream duration > ', durationOfStream);
|
|
214
|
+
|
|
215
|
+
const currentPosition =
|
|
216
|
+
durationOfStream - distanceFromLiveEdgeValue.value;
|
|
217
|
+
|
|
218
|
+
// console.log('currentPosition > ', currentPosition);
|
|
219
|
+
|
|
220
|
+
seekbarPositionValue.value = interpolate(
|
|
221
|
+
currentPosition,
|
|
222
|
+
[0, durationOfStream],
|
|
223
|
+
[0, 100],
|
|
224
|
+
{
|
|
225
|
+
extrapolateLeft: Extrapolation.CLAMP,
|
|
226
|
+
extrapolateRight: Extrapolation.CLAMP,
|
|
227
|
+
}
|
|
228
|
+
);
|
|
229
|
+
}, 1000);
|
|
230
|
+
|
|
231
|
+
return () => {
|
|
232
|
+
clearInterval(intervalId);
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
}, [isPaused, streamStartedAt]);
|
|
236
|
+
|
|
237
|
+
let startedPlayingFirstTime = false;
|
|
238
|
+
let prevPlaybackState = HMSHLSPlayerPlaybackState.UNKNOWN;
|
|
239
|
+
const playbackState = useHMSHLSPlayerPlaybackState();
|
|
240
|
+
|
|
241
|
+
if (
|
|
242
|
+
prevPlaybackState === HMSHLSPlayerPlaybackState.UNKNOWN &&
|
|
243
|
+
playbackState === HMSHLSPlayerPlaybackState.PLAYING
|
|
244
|
+
) {
|
|
245
|
+
prevPlaybackState = playbackState;
|
|
246
|
+
startedPlayingFirstTime = true;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
React.useEffect(() => {
|
|
250
|
+
if (startedPlayingFirstTime && playerRef.current) {
|
|
251
|
+
let mounted = true;
|
|
252
|
+
|
|
253
|
+
playerRef.current
|
|
254
|
+
.getPlayerDurationDetails()
|
|
255
|
+
.then((data) => {
|
|
256
|
+
if (mounted) {
|
|
257
|
+
console.log('$$$ getPlayerDurationDetails > ', data);
|
|
258
|
+
hlsPlayerDurationDetails.current = data;
|
|
259
|
+
if (
|
|
260
|
+
typeof data.rollingWindowTime === 'number' &&
|
|
261
|
+
data.rollingWindowTime < 300000
|
|
262
|
+
) {
|
|
263
|
+
hlsPlayerDurationDetails.current.rollingWindowTime = 300000;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
})
|
|
267
|
+
.catch(() => {});
|
|
268
|
+
|
|
269
|
+
return () => {
|
|
270
|
+
mounted = false;
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
}, [startedPlayingFirstTime]);
|
|
274
|
+
|
|
275
|
+
return (
|
|
276
|
+
<GestureDetector gesture={panGesture}>
|
|
277
|
+
<View
|
|
278
|
+
collapsable={false}
|
|
279
|
+
hitSlop={{ top: 12, bottom: 12 }}
|
|
280
|
+
style={[styles.container, { width: playerWrapperConstraints.width }]}
|
|
281
|
+
>
|
|
282
|
+
<Animated.View
|
|
283
|
+
style={[
|
|
284
|
+
styles.inactiveSeekbar,
|
|
285
|
+
{ width: playerWrapperConstraints.width },
|
|
286
|
+
]}
|
|
287
|
+
>
|
|
288
|
+
<Animated.View
|
|
289
|
+
style={[styles.seekbar, seekbarRoomStyle, activeSeekbarStyle]}
|
|
290
|
+
/>
|
|
291
|
+
<Animated.View
|
|
292
|
+
style={[
|
|
293
|
+
styles.seekbarThumb,
|
|
294
|
+
seekbarRoomStyle,
|
|
295
|
+
activeSeekbarThumbStyle,
|
|
296
|
+
]}
|
|
297
|
+
/>
|
|
298
|
+
</Animated.View>
|
|
299
|
+
</View>
|
|
300
|
+
</GestureDetector>
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
);
|
|
304
|
+
|
|
305
|
+
export const HLSSeekbar = React.memo(_HLSSeekbar);
|
|
306
|
+
|
|
307
|
+
const styles = StyleSheet.create({
|
|
308
|
+
container: {
|
|
309
|
+
height: 6,
|
|
310
|
+
justifyContent: 'flex-end',
|
|
311
|
+
},
|
|
312
|
+
inactiveSeekbar: {
|
|
313
|
+
position: 'relative',
|
|
314
|
+
backgroundColor: 'rgba(255, 255, 255, 0.25)',
|
|
315
|
+
},
|
|
316
|
+
seekbar: {
|
|
317
|
+
height: 4,
|
|
318
|
+
},
|
|
319
|
+
seekbarThumb: {
|
|
320
|
+
position: 'absolute',
|
|
321
|
+
bottom: -4,
|
|
322
|
+
right: 0,
|
|
323
|
+
zIndex: 100,
|
|
324
|
+
},
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
*
|
|
329
|
+
*
|
|
330
|
+
*
|
|
331
|
+
*
|
|
332
|
+
*
|
|
333
|
+
*
|
|
334
|
+
*
|
|
335
|
+
*
|
|
336
|
+
*
|
|
337
|
+
* 200 -> 200 * 40%
|
|
338
|
+
*
|
|
339
|
+
* 180 - 33.33% = 60;
|
|
340
|
+
*
|
|
341
|
+
* currentStreamDuration * (diff in current and prev) * 100 / prev
|
|
342
|
+
*
|
|
343
|
+
* 0 |----------| 150
|
|
344
|
+
* prev = 135
|
|
345
|
+
*
|
|
346
|
+
* curr = 90
|
|
347
|
+
*
|
|
348
|
+
*
|
|
349
|
+
*
|
|
350
|
+
*
|
|
351
|
+
*
|
|
352
|
+
*
|
|
353
|
+
*
|
|
354
|
+
*
|
|
355
|
+
*
|
|
356
|
+
* //// 2 * 30 = 60
|
|
357
|
+
* 1.5 * 30 = 45
|
|
358
|
+
*
|
|
359
|
+
* 180
|
|
360
|
+
*
|
|
361
|
+
* 120
|
|
362
|
+
*
|
|
363
|
+
* 0 |------____| 100
|
|
364
|
+
*
|
|
365
|
+
*
|
|
366
|
+
* 200 * 40% = 80
|
|
367
|
+
*
|
|
368
|
+
* 200 * 30% = 60
|
|
369
|
+
*
|
|
370
|
+
*
|
|
371
|
+
* 30*90
|
|
372
|
+
*
|
|
373
|
+
* 0 |---------_| 100
|
|
374
|
+
* Prev = 90
|
|
375
|
+
* |------|
|
|
376
|
+
* Curr = 60
|
|
377
|
+
*
|
|
378
|
+
* 90 - 60 = 30
|
|
379
|
+
*
|
|
380
|
+
* seekbackward(80)
|
|
381
|
+
*/
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HMSHLSPlaylistType,
|
|
3
|
+
useIsHLSStreamLive,
|
|
4
|
+
} from '@100mslive/react-native-hms';
|
|
5
|
+
import type { HMSHLSPlayer } from '@100mslive/react-native-hms';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { useSelector } from 'react-redux';
|
|
8
|
+
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
|
|
9
|
+
|
|
10
|
+
import { useIsHLSStreamingOn } from '../hooks-sdk';
|
|
11
|
+
import type { RootState } from '../redux';
|
|
12
|
+
import { SeekArrowIcon } from '../Icons';
|
|
13
|
+
import Animated, {
|
|
14
|
+
Easing,
|
|
15
|
+
cancelAnimation,
|
|
16
|
+
interpolate,
|
|
17
|
+
runOnJS,
|
|
18
|
+
useAnimatedStyle,
|
|
19
|
+
useSharedValue,
|
|
20
|
+
withTiming,
|
|
21
|
+
} from 'react-native-reanimated';
|
|
22
|
+
|
|
23
|
+
export interface HLSSeekforwardControlProps {
|
|
24
|
+
playerRef: React.RefObject<React.ElementRef<typeof HMSHLSPlayer>>;
|
|
25
|
+
onPress?: () => void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const _HLSSeekforwardControl: React.FC<HLSSeekforwardControlProps> = ({
|
|
29
|
+
playerRef,
|
|
30
|
+
onPress,
|
|
31
|
+
}) => {
|
|
32
|
+
const animatedValue = useSharedValue(0);
|
|
33
|
+
const isHLSStreamingOn = useIsHLSStreamingOn();
|
|
34
|
+
const isDVRStream = useSelector((state: RootState) => {
|
|
35
|
+
return (
|
|
36
|
+
state.hmsStates.room?.hlsStreamingState.variants?.[0]?.playlistType ===
|
|
37
|
+
HMSHLSPlaylistType.DVR
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
const isStreamLive = useIsHLSStreamLive();
|
|
41
|
+
|
|
42
|
+
const handdleSeekForward = () => {
|
|
43
|
+
onPress?.();
|
|
44
|
+
playerRef.current?.seekForward(10);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const tapGestureHandler = React.useMemo(() => {
|
|
48
|
+
return Gesture.Tap()
|
|
49
|
+
.enabled(!isStreamLive)
|
|
50
|
+
.onStart(() => {
|
|
51
|
+
cancelAnimation(animatedValue);
|
|
52
|
+
animatedValue.value = withTiming(
|
|
53
|
+
1,
|
|
54
|
+
{ duration: 200, easing: Easing.ease },
|
|
55
|
+
(finished) => {
|
|
56
|
+
if (finished) {
|
|
57
|
+
animatedValue.value = withTiming(0, {
|
|
58
|
+
duration: 100,
|
|
59
|
+
easing: Easing.ease,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
runOnJS(handdleSeekForward)();
|
|
65
|
+
});
|
|
66
|
+
}, [isStreamLive]);
|
|
67
|
+
|
|
68
|
+
const animatedStyle = useAnimatedStyle(
|
|
69
|
+
() => ({
|
|
70
|
+
opacity: interpolate(animatedValue.value, [0, 1], [1, 0.8]),
|
|
71
|
+
transform: [
|
|
72
|
+
{
|
|
73
|
+
rotateZ: `${interpolate(animatedValue.value, [0, 1], [0, 17])} deg`,
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
}),
|
|
77
|
+
[]
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
if (!isHLSStreamingOn || !isDVRStream) return null;
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<GestureDetector gesture={tapGestureHandler}>
|
|
84
|
+
<Animated.View
|
|
85
|
+
collapsable={false}
|
|
86
|
+
style={[{ marginLeft: 24 }, animatedStyle]}
|
|
87
|
+
>
|
|
88
|
+
<SeekArrowIcon
|
|
89
|
+
style={{ opacity: isStreamLive ? 0.2 : 1 }}
|
|
90
|
+
type="forward"
|
|
91
|
+
/>
|
|
92
|
+
</Animated.View>
|
|
93
|
+
</GestureDetector>
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export const HLSSeekforwardControl = React.memo(_HLSSeekforwardControl);
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { StyleSheet, Text } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { useHMSRoomStyleSheet } from '../hooks-util';
|
|
5
|
+
import { useSelector } from 'react-redux';
|
|
6
|
+
import type { RootState } from '../redux';
|
|
7
|
+
|
|
8
|
+
export interface HLSStreamStartedTimeProps {
|
|
9
|
+
prefix?: React.ReactElement;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const HLSStreamStartedTime: React.FC<HLSStreamStartedTimeProps> = ({
|
|
13
|
+
prefix,
|
|
14
|
+
}) => {
|
|
15
|
+
const streamStartedTime = useSelector(
|
|
16
|
+
(state: RootState) =>
|
|
17
|
+
state.hmsStates.room?.hlsStreamingState.variants?.[0]?.startedAt
|
|
18
|
+
);
|
|
19
|
+
const [streamStartedBeforeMillis, setStreamStartedBeforeMillis] =
|
|
20
|
+
React.useState(0);
|
|
21
|
+
|
|
22
|
+
React.useEffect(() => {
|
|
23
|
+
if (streamStartedTime) {
|
|
24
|
+
const beforeMilliSecs = Date.now() - streamStartedTime.getTime();
|
|
25
|
+
|
|
26
|
+
setStreamStartedBeforeMillis(beforeMilliSecs);
|
|
27
|
+
|
|
28
|
+
const intervalId = setInterval(() => {
|
|
29
|
+
setStreamStartedBeforeMillis((secs) => {
|
|
30
|
+
secs += 1000;
|
|
31
|
+
return secs;
|
|
32
|
+
});
|
|
33
|
+
}, 1000);
|
|
34
|
+
|
|
35
|
+
return () => {
|
|
36
|
+
clearInterval(intervalId);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}, [streamStartedTime]);
|
|
40
|
+
|
|
41
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
42
|
+
regularSurfaceMedium: {
|
|
43
|
+
fontFamily: `${typography.font_family}-Regular`,
|
|
44
|
+
color: theme.palette.on_surface_medium,
|
|
45
|
+
},
|
|
46
|
+
}));
|
|
47
|
+
|
|
48
|
+
if (!streamStartedTime) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const { h, min, sec } = msToTime(streamStartedBeforeMillis);
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<>
|
|
56
|
+
{prefix}
|
|
57
|
+
|
|
58
|
+
<Text style={[styles.subtitle, hmsRoomStyles.regularSurfaceMedium]}>
|
|
59
|
+
Started {h > 0 ? `${h} h` : min > 0 ? `${min} min` : `${sec} sec`} ago
|
|
60
|
+
</Text>
|
|
61
|
+
</>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const styles = StyleSheet.create({
|
|
66
|
+
subtitle: {
|
|
67
|
+
fontSize: 12,
|
|
68
|
+
lineHeight: 16,
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
function msToTime(duration: number) {
|
|
73
|
+
return {
|
|
74
|
+
ms: duration,
|
|
75
|
+
sec: Math.floor(duration / 1000),
|
|
76
|
+
min: Math.floor(duration / 1000 / 60),
|
|
77
|
+
h: Math.floor(duration / 1000 / 60 / 60),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
4
|
+
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
5
|
+
|
|
6
|
+
import { HMSStatusBar } from './StatusBar';
|
|
7
|
+
import { HLSPlayerContainer } from './HLSPlayerContainer';
|
|
8
|
+
import { LeaveRoomBottomSheet } from './LeaveRoomBottomSheet';
|
|
9
|
+
import { PreviewForRoleChangeModal } from './PreviewForRoleChangeModal';
|
|
10
|
+
import { ChatAndParticipantsBottomSheet } from './ChatAndParticipants';
|
|
11
|
+
import { DefaultModal } from './DefaultModal';
|
|
12
|
+
import { ModalTypes, PipModes } from '../utils/types';
|
|
13
|
+
import {
|
|
14
|
+
useHMSRoleChangeRequest,
|
|
15
|
+
useHMSRoomStyleSheet,
|
|
16
|
+
useHMSSessionStoreListeners,
|
|
17
|
+
useModalType,
|
|
18
|
+
} from '../hooks-util';
|
|
19
|
+
import { ChangeAspectRatio } from './Modals';
|
|
20
|
+
import type { RootState } from '../redux';
|
|
21
|
+
import { HLSChatView } from './HLSChatView';
|
|
22
|
+
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
23
|
+
|
|
24
|
+
interface HLSViewerScreenContentProps {}
|
|
25
|
+
|
|
26
|
+
export const HLSViewerScreenContent: React.FC<
|
|
27
|
+
HLSViewerScreenContentProps
|
|
28
|
+
> = ({}) => {
|
|
29
|
+
const isPipModeActive = useSelector(
|
|
30
|
+
(state: RootState) => state.app.pipModeStatus === PipModes.ACTIVE
|
|
31
|
+
);
|
|
32
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
33
|
+
|
|
34
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme) => ({
|
|
35
|
+
container: {
|
|
36
|
+
backgroundColor: theme.palette.surface_dim,
|
|
37
|
+
},
|
|
38
|
+
}));
|
|
39
|
+
|
|
40
|
+
const {
|
|
41
|
+
modalVisibleType: modalVisible,
|
|
42
|
+
handleModalVisibleType: setModalVisible,
|
|
43
|
+
} = useModalType();
|
|
44
|
+
|
|
45
|
+
useHMSSessionStoreListeners();
|
|
46
|
+
|
|
47
|
+
useHMSRoleChangeRequest();
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<View style={[styles.container, hmsRoomStyles.container]}>
|
|
51
|
+
<HMSStatusBar barStyle={'light-content'} />
|
|
52
|
+
|
|
53
|
+
<SafeAreaView
|
|
54
|
+
style={[
|
|
55
|
+
styles.container,
|
|
56
|
+
hmsRoomStyles.container,
|
|
57
|
+
isLandscapeOrientation ? styles.landscapeContainer : null,
|
|
58
|
+
]}
|
|
59
|
+
>
|
|
60
|
+
<HLSPlayerContainer />
|
|
61
|
+
|
|
62
|
+
<HLSChatView />
|
|
63
|
+
</SafeAreaView>
|
|
64
|
+
|
|
65
|
+
{isPipModeActive ? null : (
|
|
66
|
+
<>
|
|
67
|
+
<LeaveRoomBottomSheet />
|
|
68
|
+
|
|
69
|
+
<PreviewForRoleChangeModal />
|
|
70
|
+
|
|
71
|
+
<ChatAndParticipantsBottomSheet />
|
|
72
|
+
|
|
73
|
+
<DefaultModal
|
|
74
|
+
modalPosiion="center"
|
|
75
|
+
modalVisible={modalVisible === ModalTypes.HLS_PLAYER_ASPECT_RATIO}
|
|
76
|
+
setModalVisible={() => setModalVisible(ModalTypes.DEFAULT)}
|
|
77
|
+
>
|
|
78
|
+
<ChangeAspectRatio
|
|
79
|
+
cancelModal={() => setModalVisible(ModalTypes.DEFAULT)}
|
|
80
|
+
/>
|
|
81
|
+
</DefaultModal>
|
|
82
|
+
</>
|
|
83
|
+
)}
|
|
84
|
+
</View>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const styles = StyleSheet.create({
|
|
89
|
+
container: {
|
|
90
|
+
flexGrow: 1,
|
|
91
|
+
position: 'relative',
|
|
92
|
+
},
|
|
93
|
+
landscapeContainer: {
|
|
94
|
+
flexDirection: 'row',
|
|
95
|
+
},
|
|
96
|
+
});
|