@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,115 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, StyleSheet } from 'react-native';
|
|
3
|
+
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
4
|
+
import { Easing, cancelAnimation, useSharedValue, withDelay, withTiming } from 'react-native-reanimated';
|
|
5
|
+
import { useHLSViewsConstraints } from '../hooks-util';
|
|
6
|
+
import { HLSPlayer } from './HLSPlayer';
|
|
7
|
+
import { HLSPlayerControls } from './HLSPlayerControls';
|
|
8
|
+
export const _HLSPlayerContainer = () => {
|
|
9
|
+
const hlsPlayerRef = React.useRef(null);
|
|
10
|
+
const {
|
|
11
|
+
playerWrapperConstraints
|
|
12
|
+
} = useHLSViewsConstraints();
|
|
13
|
+
const animatedValue = useSharedValue(1);
|
|
14
|
+
const cancelCurrentControlAnimation = React.useCallback(() => {
|
|
15
|
+
'worklet';
|
|
16
|
+
|
|
17
|
+
cancelAnimation(animatedValue);
|
|
18
|
+
}, []);
|
|
19
|
+
const hideControlsAfterDelay = React.useCallback((duration = 500) => {
|
|
20
|
+
'worklet';
|
|
21
|
+
|
|
22
|
+
animatedValue.value = withDelay(5000, withTiming(0, {
|
|
23
|
+
duration,
|
|
24
|
+
easing: Easing.ease
|
|
25
|
+
}));
|
|
26
|
+
}, []);
|
|
27
|
+
const resetHideControlAnimation = React.useCallback(() => {
|
|
28
|
+
cancelCurrentControlAnimation();
|
|
29
|
+
hideControlsAfterDelay();
|
|
30
|
+
}, [cancelCurrentControlAnimation, hideControlsAfterDelay]);
|
|
31
|
+
const hideControls = React.useCallback((duration = 500) => {
|
|
32
|
+
'worklet';
|
|
33
|
+
|
|
34
|
+
animatedValue.value = withTiming(0, {
|
|
35
|
+
duration,
|
|
36
|
+
easing: Easing.ease
|
|
37
|
+
});
|
|
38
|
+
}, []);
|
|
39
|
+
React.useEffect(() => {
|
|
40
|
+
resetHideControlAnimation();
|
|
41
|
+
}, [resetHideControlAnimation]);
|
|
42
|
+
const tapGesture = React.useMemo(() => {
|
|
43
|
+
return Gesture.Tap().onStart(() => {
|
|
44
|
+
cancelCurrentControlAnimation();
|
|
45
|
+
if (animatedValue.value < 1) {
|
|
46
|
+
animatedValue.value = withTiming(1, {
|
|
47
|
+
duration: 200,
|
|
48
|
+
easing: Easing.ease
|
|
49
|
+
}, finished => {
|
|
50
|
+
if (finished) {
|
|
51
|
+
hideControlsAfterDelay();
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
} else {
|
|
55
|
+
hideControls(200);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}, [cancelCurrentControlAnimation, hideControls, hideControlsAfterDelay]);
|
|
59
|
+
return /*#__PURE__*/React.createElement(GestureDetector, {
|
|
60
|
+
gesture: tapGesture
|
|
61
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
62
|
+
collapsable: false,
|
|
63
|
+
style: [styles.hlsPlayerContainer, {
|
|
64
|
+
backgroundColor: 'black',
|
|
65
|
+
width: playerWrapperConstraints.width,
|
|
66
|
+
height: playerWrapperConstraints.height
|
|
67
|
+
}]
|
|
68
|
+
}, /*#__PURE__*/React.createElement(HLSPlayer, {
|
|
69
|
+
ref: hlsPlayerRef
|
|
70
|
+
}), /*#__PURE__*/React.createElement(HLSPlayerControls, {
|
|
71
|
+
playerRef: hlsPlayerRef,
|
|
72
|
+
animatedValue: animatedValue,
|
|
73
|
+
cancelCurrentControlAnimation: cancelCurrentControlAnimation,
|
|
74
|
+
hideControlsAfterDelay: hideControlsAfterDelay,
|
|
75
|
+
resetHideControlAnimation: resetHideControlAnimation
|
|
76
|
+
})));
|
|
77
|
+
};
|
|
78
|
+
export const HLSPlayerContainer = /*#__PURE__*/React.memo(_HLSPlayerContainer);
|
|
79
|
+
const styles = StyleSheet.create({
|
|
80
|
+
hlsView: {
|
|
81
|
+
flex: 1
|
|
82
|
+
},
|
|
83
|
+
hlsPlayerContainer: {
|
|
84
|
+
// flex: 1,
|
|
85
|
+
position: 'relative'
|
|
86
|
+
},
|
|
87
|
+
textContainer: {
|
|
88
|
+
flex: 1,
|
|
89
|
+
paddingHorizontal: 24,
|
|
90
|
+
alignItems: 'center',
|
|
91
|
+
justifyContent: 'center'
|
|
92
|
+
},
|
|
93
|
+
warningSubtitle: {
|
|
94
|
+
fontSize: 16,
|
|
95
|
+
lineHeight: 20,
|
|
96
|
+
letterSpacing: 0.25,
|
|
97
|
+
textAlign: 'center'
|
|
98
|
+
},
|
|
99
|
+
playbackFailedContainer: {
|
|
100
|
+
flex: 1,
|
|
101
|
+
width: '100%',
|
|
102
|
+
height: '100%',
|
|
103
|
+
alignItems: 'center',
|
|
104
|
+
justifyContent: 'center',
|
|
105
|
+
position: 'absolute'
|
|
106
|
+
},
|
|
107
|
+
playbackFailed: {
|
|
108
|
+
fontSize: 24,
|
|
109
|
+
lineHeight: 32,
|
|
110
|
+
letterSpacing: 0.5,
|
|
111
|
+
textAlign: 'center',
|
|
112
|
+
marginTop: 8
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
//# sourceMappingURL=HLSPlayerContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","Gesture","GestureDetector","Easing","cancelAnimation","useSharedValue","withDelay","withTiming","useHLSViewsConstraints","HLSPlayer","HLSPlayerControls","_HLSPlayerContainer","hlsPlayerRef","useRef","playerWrapperConstraints","animatedValue","cancelCurrentControlAnimation","useCallback","hideControlsAfterDelay","duration","value","easing","ease","resetHideControlAnimation","hideControls","useEffect","tapGesture","useMemo","Tap","onStart","finished","createElement","gesture","collapsable","style","styles","hlsPlayerContainer","backgroundColor","width","height","ref","playerRef","HLSPlayerContainer","memo","create","hlsView","flex","position","textContainer","paddingHorizontal","alignItems","justifyContent","warningSubtitle","fontSize","lineHeight","letterSpacing","textAlign","playbackFailedContainer","playbackFailed","marginTop"],"sourceRoot":"../../../src","sources":["components/HLSPlayerContainer.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAE/C,SAASC,OAAO,EAAEC,eAAe,QAAQ,8BAA8B;AACvE,SACEC,MAAM,EACNC,eAAe,EACfC,cAAc,EACdC,SAAS,EACTC,UAAU,QACL,yBAAyB;AAEhC,SAASC,sBAAsB,QAAQ,eAAe;AACtD,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,iBAAiB,QAAQ,qBAAqB;AAEvD,OAAO,MAAMC,mBAA6B,GAAGA,CAAA,KAAM;EACjD,MAAMC,YAAY,GAChBd,KAAK,CAACe,MAAM,CAAwC,IAAI,CAAC;EAC3D,MAAM;IAAEC;EAAyB,CAAC,GAAGN,sBAAsB,CAAC,CAAC;EAE7D,MAAMO,aAAa,GAAGV,cAAc,CAAC,CAAC,CAAC;EAEvC,MAAMW,6BAA6B,GAAGlB,KAAK,CAACmB,WAAW,CAAC,MAAM;IAC5D,SAAS;;IACTb,eAAe,CAACW,aAAa,CAAC;EAChC,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMG,sBAAsB,GAAGpB,KAAK,CAACmB,WAAW,CAAC,CAACE,QAAQ,GAAG,GAAG,KAAK;IACnE,SAAS;;IACTJ,aAAa,CAACK,KAAK,GAAGd,SAAS,CAC7B,IAAI,EACJC,UAAU,CAAC,CAAC,EAAE;MAAEY,QAAQ;MAAEE,MAAM,EAAElB,MAAM,CAACmB;IAAK,CAAC,CACjD,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMC,yBAAyB,GAAG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,EAAE;IACdC,aAAa,EAAE,GAAG;IAClBC,SAAS,EAAE,QAAQ;IACnBG,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, StyleSheet } from 'react-native';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
4
|
+
import Animated, { useAnimatedProps, useAnimatedStyle } from 'react-native-reanimated';
|
|
5
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
|
+
import { HLSGoLiveControl } from './HLSGoLiveControl';
|
|
7
|
+
import { HLSSeekbar } from './HLSSeekbar';
|
|
8
|
+
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
9
|
+
import { HLSCloseMeetingControl } from './HLSCloseMeetingControl';
|
|
10
|
+
import { HLSClosedCaptionControl } from './HLSClosedCaptionControl';
|
|
11
|
+
import { HLSFullScreenControl } from './HLSFullScreenControl';
|
|
12
|
+
import { HLSDistanceFromLive } from './HLSDistanceFromLive';
|
|
13
|
+
import { HLSPlayPauseControl } from './HLSPlayPauseControl';
|
|
14
|
+
import { HLSSeekbackwardControl } from './HLSSeekbackwardControl';
|
|
15
|
+
import { HLSSeekforwardControl } from './HLSSeekforwardControl';
|
|
16
|
+
export const _HLSPlayerControls = ({
|
|
17
|
+
playerRef,
|
|
18
|
+
cancelCurrentControlAnimation,
|
|
19
|
+
hideControlsAfterDelay,
|
|
20
|
+
animatedValue,
|
|
21
|
+
resetHideControlAnimation
|
|
22
|
+
}) => {
|
|
23
|
+
const {
|
|
24
|
+
bottom: bottomSafeInset
|
|
25
|
+
} = useSafeAreaInsets();
|
|
26
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
27
|
+
const hlsFullScreen = useSelector(state => state.app.hlsFullScreen);
|
|
28
|
+
const hideControlsStyles = useAnimatedStyle(() => ({
|
|
29
|
+
opacity: animatedValue.value
|
|
30
|
+
}), []);
|
|
31
|
+
const hideControlsProps = useAnimatedProps(() => ({
|
|
32
|
+
pointerEvents: animatedValue.value < 0.8 ? 'none' : 'auto'
|
|
33
|
+
}), []);
|
|
34
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Animated.View, {
|
|
35
|
+
animatedProps: hideControlsProps,
|
|
36
|
+
style: [{
|
|
37
|
+
height: '100%'
|
|
38
|
+
}, styles.floatingContainer, hideControlsStyles]
|
|
39
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
40
|
+
style: {
|
|
41
|
+
flex: 1,
|
|
42
|
+
flexDirection: 'row',
|
|
43
|
+
alignItems: 'center',
|
|
44
|
+
justifyContent: 'center'
|
|
45
|
+
}
|
|
46
|
+
}, /*#__PURE__*/React.createElement(HLSSeekbackwardControl, {
|
|
47
|
+
playerRef: playerRef,
|
|
48
|
+
onPress: resetHideControlAnimation
|
|
49
|
+
}), /*#__PURE__*/React.createElement(HLSPlayPauseControl, {
|
|
50
|
+
playerRef: playerRef,
|
|
51
|
+
onPress: resetHideControlAnimation
|
|
52
|
+
}), /*#__PURE__*/React.createElement(HLSSeekforwardControl, {
|
|
53
|
+
playerRef: playerRef,
|
|
54
|
+
onPress: resetHideControlAnimation
|
|
55
|
+
}))), /*#__PURE__*/React.createElement(Animated.View, {
|
|
56
|
+
animatedProps: hideControlsProps,
|
|
57
|
+
style: [{
|
|
58
|
+
top: 0
|
|
59
|
+
}, styles.floatingContainer, hideControlsStyles]
|
|
60
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
61
|
+
style: styles.controlsRow
|
|
62
|
+
}, /*#__PURE__*/React.createElement(HLSCloseMeetingControl, {
|
|
63
|
+
onPress: resetHideControlAnimation
|
|
64
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
65
|
+
style: [styles.normalRow, styles.gap]
|
|
66
|
+
}, /*#__PURE__*/React.createElement(HLSClosedCaptionControl, {
|
|
67
|
+
playerRef: playerRef,
|
|
68
|
+
onPress: resetHideControlAnimation
|
|
69
|
+
})))), /*#__PURE__*/React.createElement(Animated.View, {
|
|
70
|
+
animatedProps: hideControlsProps,
|
|
71
|
+
style: [{
|
|
72
|
+
bottom: isLandscapeOrientation ? bottomSafeInset : 0
|
|
73
|
+
}, styles.floatingContainer, hideControlsStyles]
|
|
74
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
75
|
+
style: {
|
|
76
|
+
flexDirection: isLandscapeOrientation || hlsFullScreen ? 'column-reverse' : 'column'
|
|
77
|
+
}
|
|
78
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
79
|
+
style: styles.controlsRow
|
|
80
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
81
|
+
style: styles.normalRow
|
|
82
|
+
}, /*#__PURE__*/React.createElement(HLSGoLiveControl, {
|
|
83
|
+
playerRef: playerRef,
|
|
84
|
+
onPress: resetHideControlAnimation
|
|
85
|
+
}), /*#__PURE__*/React.createElement(HLSDistanceFromLive, null)), /*#__PURE__*/React.createElement(View, {
|
|
86
|
+
style: [styles.normalRow, styles.gap]
|
|
87
|
+
}, /*#__PURE__*/React.createElement(HLSFullScreenControl, {
|
|
88
|
+
onPress: resetHideControlAnimation
|
|
89
|
+
}))), /*#__PURE__*/React.createElement(HLSSeekbar, {
|
|
90
|
+
playerRef: playerRef,
|
|
91
|
+
onStart: cancelCurrentControlAnimation,
|
|
92
|
+
onEnd: hideControlsAfterDelay
|
|
93
|
+
}))));
|
|
94
|
+
};
|
|
95
|
+
export const HLSPlayerControls = /*#__PURE__*/React.memo(_HLSPlayerControls);
|
|
96
|
+
const styles = StyleSheet.create({
|
|
97
|
+
floatingContainer: {
|
|
98
|
+
position: 'absolute',
|
|
99
|
+
width: '100%',
|
|
100
|
+
zIndex: 5
|
|
101
|
+
},
|
|
102
|
+
controlsRow: {
|
|
103
|
+
flexDirection: 'row',
|
|
104
|
+
alignItems: 'center',
|
|
105
|
+
justifyContent: 'space-between',
|
|
106
|
+
marginHorizontal: 8
|
|
107
|
+
},
|
|
108
|
+
normalRow: {
|
|
109
|
+
flexDirection: 'row',
|
|
110
|
+
alignItems: 'center'
|
|
111
|
+
},
|
|
112
|
+
icon: {
|
|
113
|
+
padding: 4,
|
|
114
|
+
alignSelf: 'flex-start'
|
|
115
|
+
},
|
|
116
|
+
gap: {
|
|
117
|
+
marginLeft: 16
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
//# sourceMappingURL=HLSPlayerControls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","useSelector","Animated","useAnimatedProps","useAnimatedStyle","useSafeAreaInsets","HLSGoLiveControl","HLSSeekbar","useIsLandscapeOrientation","HLSCloseMeetingControl","HLSClosedCaptionControl","HLSFullScreenControl","HLSDistanceFromLive","HLSPlayPauseControl","HLSSeekbackwardControl","HLSSeekforwardControl","_HLSPlayerControls","playerRef","cancelCurrentControlAnimation","hideControlsAfterDelay","animatedValue","resetHideControlAnimation","bottom","bottomSafeInset","isLandscapeOrientation","hlsFullScreen","state","app","hideControlsStyles","opacity","value","hideControlsProps","pointerEvents","createElement","Fragment","animatedProps","style","height","styles","floatingContainer","flex","flexDirection","alignItems","justifyContent","onPress","top","controlsRow","normalRow","gap","onStart","onEnd","HLSPlayerControls","memo","create","position","width","zIndex","marginHorizontal","icon","padding","alignSelf","marginLeft"],"sourceRoot":"../../../src","sources":["components/HLSPlayerControls.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAE/C,SAASC,WAAW,QAAQ,aAAa;AACzC,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,gBAAgB,QACX,yBAAyB;AAEhC,SAASC,iBAAiB,QAAQ,gCAAgC;AAIlE,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,yBAAyB,QAAQ,oBAAoB;AAC9D,SAASC,sBAAsB,QAAQ,0BAA0B;AACj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,KAAK;IACpBC,UAAU,EAAE;EACd,CAAC;EACDgB,IAAI,EAAE;IACJC,OAAO,EAAE,CAAC;IACVC,SAAS,EAAE;EACb,CAAC;EACDZ,GAAG,EAAE;IACHa,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text } from 'react-native';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
4
|
+
import { HMSRecordingState } from '@100mslive/react-native-hms';
|
|
5
|
+
import { useIsAnyRecordingOn, useIsAnyRecordingPaused } from '../hooks-sdk';
|
|
6
|
+
export const HLSRecordingStatusText = ({
|
|
7
|
+
prefix,
|
|
8
|
+
suffix,
|
|
9
|
+
...restProps
|
|
10
|
+
}) => {
|
|
11
|
+
const isRecordingOn = useIsAnyRecordingOn();
|
|
12
|
+
const isRecordingPaused = useIsAnyRecordingPaused();
|
|
13
|
+
const startingOrStoppingRecording = useSelector(state => {
|
|
14
|
+
var _state$hmsStates$room, _state$hmsStates$room2, _state$hmsStates$room3;
|
|
15
|
+
return state.app.startingOrStoppingRecording || ((_state$hmsStates$room = state.hmsStates.room) === null || _state$hmsStates$room === void 0 ? void 0 : _state$hmsStates$room.browserRecordingState.state) === HMSRecordingState.STARTING || ((_state$hmsStates$room2 = state.hmsStates.room) === null || _state$hmsStates$room2 === void 0 ? void 0 : _state$hmsStates$room2.serverRecordingState.state) === HMSRecordingState.STARTING || ((_state$hmsStates$room3 = state.hmsStates.room) === null || _state$hmsStates$room3 === void 0 || (_state$hmsStates$room3 = _state$hmsStates$room3.hlsRecordingState) === null || _state$hmsStates$room3 === void 0 ? void 0 : _state$hmsStates$room3.state) === HMSRecordingState.STARTING;
|
|
16
|
+
});
|
|
17
|
+
if (startingOrStoppingRecording || !(isRecordingPaused && isRecordingOn)) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, prefix, /*#__PURE__*/React.createElement(Text, restProps, isRecordingPaused ? 'Recording Paused' : isRecordingOn ? 'Recording' : ''), suffix);
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=HLSRecordingStatusText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Text","useSelector","HMSRecordingState","useIsAnyRecordingOn","useIsAnyRecordingPaused","HLSRecordingStatusText","prefix","suffix","restProps","isRecordingOn","isRecordingPaused","startingOrStoppingRecording","state","_state$hmsStates$room","_state$hmsStates$room2","_state$hmsStates$room3","app","hmsStates","room","browserRecordingState","STARTING","serverRecordingState","hlsRecordingState","createElement","Fragment"],"sourceRoot":"../../../src","sources":["components/HLSRecordingStatusText.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,iBAAiB,QAAQ,6BAA6B;AAG/D,SAASC,mBAAmB,EAAEC,uBAAuB,QAAQ,cAAc;AAO3E,OAAO,MAAMC,sBAA6D,GAAGA,CAAC;EAC5EC,MAAM;EACNC,MAAM;EACN,GAAGC;AACL,CAAC,KAAK;EACJ,MAAMC,aAAa,GAAGN,mBAAmB,CAAC,CAAC;EAC3C,MAAMO,iBAAiB,GAAGN,uBAAuB,CAAC,CAAC;EACnD,MAAMO,2BAA2B,GAAGV,WAAW,CAC5CW,KAAgB;IAAA,IAAAC,qBAAA,EAAAC,sBAAA,EAAAC,sBAAA;IAAA,OACfH,KAAK,CAACI,GAAG,CAACL,2BAA2B,IACrC,EAAAE,qBAAA,GAAAD,KAAK,CAACK,SAAS,CAACC,IAAI,cAAAL,qBAAA,uBAApBA,qBAAA,CAAsBM,qBAAqB,CAACP,KAAK,MAC/CV,iBAAiB,CAACkB,QAAQ,IAC5B,EAAAN,sBAAA,GAAAF,KAAK,CAACK,SAAS,CAACC,IAAI,cAAAJ,sBAAA,uBAApBA,sBAAA,CAAsBO,oBAAoB,CAACT,KAAK,MAC9CV,iBAAiB,CAACkB,QAAQ,IAC5B,EAAAL,sBAAA,GAAAH,KAAK,CAACK,SAAS,CAACC,IAAI,cAAAH,sBAAA,gBAAAA,sBAAA,GAApBA,sBAAA,CAAsBO,iBAAiB,cAAAP,sBAAA,uBAAvCA,sBAAA,CAAyCH,KAAK,MAC5CV,iBAAiB,CAACkB,QAAQ;EAAA,CAChC,CAAC;EAED,IAAIT,2BAA2B,IAAI,EAAED,iBAAiB,IAAID,aAAa,CAAC,EAAE;IACxE,OAAO,IAAI;EACb;EAEA,oBACEV,KAAA,CAAAwB,aAAA,CAAAxB,KAAA,CAAAyB,QAAA,QACGlB,MAAM,eACPP,KAAA,CAAAwB,aAAA,CAACvB,IAAI,EAAKQ,SAAS,EAChBE,iBAAiB,GACd,kBAAkB,GAClBD,aAAa,GACX,WAAW,GACX,EACF,CAAC,EACNF,MACD,CAAC;AAEP,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { useCanShowRoomOptionsButton } from '../hooks-util';
|
|
4
|
+
import { HMSRoomOptions } from './HMSRoomOptions';
|
|
5
|
+
export const HLSRoomOptionsButton = () => {
|
|
6
|
+
const canShowOptions = useCanShowRoomOptionsButton();
|
|
7
|
+
if (!canShowOptions) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
11
|
+
style: {
|
|
12
|
+
marginLeft: 12
|
|
13
|
+
}
|
|
14
|
+
}, /*#__PURE__*/React.createElement(HMSRoomOptions, null));
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=HLSRoomOptionsButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","useCanShowRoomOptionsButton","HMSRoomOptions","HLSRoomOptionsButton","canShowOptions","createElement","style","marginLeft"],"sourceRoot":"../../../src","sources":["components/HLSRoomOptionsButton.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAASC,2BAA2B,QAAQ,eAAe;AAC3D,SAASC,cAAc,QAAQ,kBAAkB;AAEjD,OAAO,MAAMC,oBAAoB,GAAGA,CAAA,KAAM;EACxC,MAAMC,cAAc,GAAGH,2BAA2B,CAAC,CAAC;EAEpD,IAAI,CAACG,cAAc,EAAE;IACnB,OAAO,IAAI;EACb;EAEA,oBACEL,KAAA,CAAAM,aAAA,CAACL,IAAI;IAACM,KAAK,EAAE;MAAEC,UAAU,EAAE;IAAG;EAAE,gBAC9BR,KAAA,CAAAM,aAAA,CAACH,cAAc,MAAE,CACb,CAAC;AAEX,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { HMSHLSPlaylistType } from '@100mslive/react-native-hms';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
4
|
+
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
|
|
5
|
+
import { useIsHLSStreamingOn } from '../hooks-sdk';
|
|
6
|
+
import { SeekArrowIcon } from '../Icons';
|
|
7
|
+
import Animated, { Easing, cancelAnimation, interpolate, runOnJS, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
8
|
+
const _HLSSeekbackwardControl = ({
|
|
9
|
+
playerRef,
|
|
10
|
+
onPress
|
|
11
|
+
}) => {
|
|
12
|
+
const animatedValue = useSharedValue(0);
|
|
13
|
+
const isHLSStreamingOn = useIsHLSStreamingOn();
|
|
14
|
+
const isDVRStream = useSelector(state => {
|
|
15
|
+
var _state$hmsStates$room;
|
|
16
|
+
return ((_state$hmsStates$room = state.hmsStates.room) === null || _state$hmsStates$room === void 0 || (_state$hmsStates$room = _state$hmsStates$room.hlsStreamingState.variants) === null || _state$hmsStates$room === void 0 || (_state$hmsStates$room = _state$hmsStates$room[0]) === null || _state$hmsStates$room === void 0 ? void 0 : _state$hmsStates$room.playlistType) === HMSHLSPlaylistType.DVR;
|
|
17
|
+
});
|
|
18
|
+
const handdleSeekBackward = () => {
|
|
19
|
+
var _playerRef$current;
|
|
20
|
+
onPress === null || onPress === void 0 || onPress();
|
|
21
|
+
(_playerRef$current = playerRef.current) === null || _playerRef$current === void 0 || _playerRef$current.seekBackward(10);
|
|
22
|
+
};
|
|
23
|
+
const tapGestureHandler = React.useMemo(() => {
|
|
24
|
+
return Gesture.Tap().onStart(() => {
|
|
25
|
+
cancelAnimation(animatedValue);
|
|
26
|
+
animatedValue.value = withTiming(1, {
|
|
27
|
+
duration: 200,
|
|
28
|
+
easing: Easing.ease
|
|
29
|
+
}, finished => {
|
|
30
|
+
if (finished) {
|
|
31
|
+
animatedValue.value = withTiming(0, {
|
|
32
|
+
duration: 100,
|
|
33
|
+
easing: Easing.ease
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
runOnJS(handdleSeekBackward)();
|
|
38
|
+
});
|
|
39
|
+
}, []);
|
|
40
|
+
const animatedStyle = useAnimatedStyle(() => ({
|
|
41
|
+
opacity: interpolate(animatedValue.value, [0, 1], [1, 0.8]),
|
|
42
|
+
transform: [{
|
|
43
|
+
rotateZ: `${interpolate(animatedValue.value, [0, 1], [0, -17])} deg`
|
|
44
|
+
}]
|
|
45
|
+
}), []);
|
|
46
|
+
if (!isHLSStreamingOn || !isDVRStream) return null;
|
|
47
|
+
return /*#__PURE__*/React.createElement(GestureDetector, {
|
|
48
|
+
gesture: tapGestureHandler
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
50
|
+
collapsable: false,
|
|
51
|
+
style: [{
|
|
52
|
+
marginRight: 24
|
|
53
|
+
}, animatedStyle]
|
|
54
|
+
}, /*#__PURE__*/React.createElement(SeekArrowIcon, {
|
|
55
|
+
type: "backward"
|
|
56
|
+
})));
|
|
57
|
+
};
|
|
58
|
+
export const HLSSeekbackwardControl = /*#__PURE__*/React.memo(_HLSSeekbackwardControl);
|
|
59
|
+
//# sourceMappingURL=HLSSeekbackwardControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["HMSHLSPlaylistType","React","useSelector","GestureDetector","Gesture","useIsHLSStreamingOn","SeekArrowIcon","Animated","Easing","cancelAnimation","interpolate","runOnJS","useAnimatedStyle","useSharedValue","withTiming","_HLSSeekbackwardControl","playerRef","onPress","animatedValue","isHLSStreamingOn","isDVRStream","state","_state$hmsStates$room","hmsStates","room","hlsStreamingState","variants","playlistType","DVR","handdleSeekBackward","_playerRef$current","current","seekBackward","tapGestureHandler","useMemo","Tap","onStart","value","duration","easing","ease","finished","animatedStyle","opacity","transform","rotateZ","createElement","gesture","View","collapsable","style","marginRight","type","HLSSeekbackwardControl","memo"],"sourceRoot":"../../../src","sources":["components/HLSSeekbackwardControl.tsx"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,6BAA6B;AAEhE,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,eAAe,EAAEC,OAAO,QAAQ,8BAA8B;AAEvE,SAASC,mBAAmB,QAAQ,cAAc;AAElD,SAASC,aAAa,QAAQ,UAAU;AACxC,OAAOC,QAAQ,IACbC,MAAM,EACNC,eAAe,EACfC,WAAW,EACXC,OAAO,EACPC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAOhC,MAAMC,uBAA8D,GAAGA,CAAC;EACtEC,SAAS;EACTC;AACF,CAAC,KAAK;EACJ,MAAMC,aAAa,GAAGL,cAAc,CAAC,CAAC,CAAC;EACvC,MAAMM,gBAAgB,GAAGd,mBAAmB,CAAC,CAAC;EAC9C,MAAMe,WAAW,GAAGlB,WAAW,CAAEmB,KAAgB,IAAK;IAAA,IAAAC,qBAAA;IACpD,OACE,EAAAA,qBAAA,GAAAD,KAAK,CAACE,SAAS,CAACC,IAAI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,GAAG,CAAC,CAAC;IAC3DO,SAAS,EAAE,CACT;MACEC,OAAO,EAAG,GAAEnC,WAAW,CAACQ,aAAa,CAACmB,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAE;IACjE,CAAC;EAEL,CAAC,CAAC,EACF,EACF,CAAC;EAED,IAAI,CAAClB,gBAAgB,IAAI,CAACC,WAAW,EAAE,OAAO,IAAI;EAElD,oBACEnB,KAAA,CAAA6C,aAAA,CAAC3C,eAAe;IAAC4C,OAAO,EAAEd;EAAkB,gBAC1ChC,KAAA,CAAA6C,aAAA,CAACvC,QAAQ,CAACyC,IAAI;IACZC,WAAW,EAAE,KAAM;IACnBC,KAAK,EAAE,CAAC;MAAEC,WAAW,EAAE;IAAG,CAAC,EAAET,aAAa;EAAE,gBAE5CzC,KAAA,CAAA6C,aAAA,CAACxC,aAAa;IAAC8C,IAAI,EAAC;EAAU,CAAE,CACnB,CACA,CAAC;AAEtB,CAAC;AAED,OAAO,MAAMC,sBAAsB,gBAAGpD,KAAK,CAACqD,IAAI,CAACvC,uBAAuB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import { View, StyleSheet } from 'react-native';
|
|
3
|
+
import Animated, { Easing, Extrapolation, interpolate, runOnJS, useAnimatedStyle, useDerivedValue, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
4
|
+
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
|
|
5
|
+
import { HMSHLSPlayerPlaybackState, HMSHLSPlaylistType, useHMSHLSPlayerPlaybackState, useHMSHLSPlayerStat } from '@100mslive/react-native-hms';
|
|
6
|
+
import { useSelector } from 'react-redux';
|
|
7
|
+
import { useHLSStreamResumePause, useHLSViewsConstraints, useHMSRoomStyle } from '../hooks-util';
|
|
8
|
+
import { useIsHLSStreamingOn } from '../hooks-sdk';
|
|
9
|
+
export const _HLSSeekbar = props => {
|
|
10
|
+
const isHLSStreamingOn = useIsHLSStreamingOn();
|
|
11
|
+
const isDVRStream = useSelector(state => {
|
|
12
|
+
var _state$hmsStates$room;
|
|
13
|
+
return ((_state$hmsStates$room = state.hmsStates.room) === null || _state$hmsStates$room === void 0 || (_state$hmsStates$room = _state$hmsStates$room.hlsStreamingState.variants) === null || _state$hmsStates$room === void 0 || (_state$hmsStates$room = _state$hmsStates$room[0]) === null || _state$hmsStates$room === void 0 ? void 0 : _state$hmsStates$room.playlistType) === HMSHLSPlaylistType.DVR;
|
|
14
|
+
});
|
|
15
|
+
if (!isHLSStreamingOn || !isDVRStream) return null;
|
|
16
|
+
return /*#__PURE__*/React.createElement(_Seekbar, props);
|
|
17
|
+
};
|
|
18
|
+
const _Seekbar = /*#__PURE__*/React.memo(({
|
|
19
|
+
playerRef,
|
|
20
|
+
onStart,
|
|
21
|
+
onEnd
|
|
22
|
+
}) => {
|
|
23
|
+
const {
|
|
24
|
+
playerWrapperConstraints
|
|
25
|
+
} = useHLSViewsConstraints();
|
|
26
|
+
const hlsPlayerDurationDetails = useRef(null);
|
|
27
|
+
const prevSeekbarPositionValue = useSharedValue(0);
|
|
28
|
+
const seekbarPositionValue = useSharedValue(0);
|
|
29
|
+
const seekbarHeightValue = useSharedValue(4);
|
|
30
|
+
const streamStartedAt = useSelector(state => {
|
|
31
|
+
var _state$hmsStates$room2;
|
|
32
|
+
return (_state$hmsStates$room2 = state.hmsStates.room) === null || _state$hmsStates$room2 === void 0 || (_state$hmsStates$room2 = _state$hmsStates$room2.hlsStreamingState.variants) === null || _state$hmsStates$room2 === void 0 || (_state$hmsStates$room2 = _state$hmsStates$room2[0]) === null || _state$hmsStates$room2 === void 0 ? void 0 : _state$hmsStates$room2.startedAt;
|
|
33
|
+
});
|
|
34
|
+
const distanceFromLiveEdge = useHMSHLSPlayerStat('distanceFromLive');
|
|
35
|
+
const distanceFromLiveEdgeValue = useDerivedValue(() => distanceFromLiveEdge, [distanceFromLiveEdge]);
|
|
36
|
+
const seekbarRoomStyle = useHMSRoomStyle(theme => ({
|
|
37
|
+
backgroundColor: theme.palette.primary_default
|
|
38
|
+
}));
|
|
39
|
+
const {
|
|
40
|
+
isPaused,
|
|
41
|
+
pauseStream,
|
|
42
|
+
resumeStream
|
|
43
|
+
} = useHLSStreamResumePause(playerRef);
|
|
44
|
+
const seekToBarPosition = () => {
|
|
45
|
+
var _hlsPlayerDurationDet;
|
|
46
|
+
if (!streamStartedAt) return;
|
|
47
|
+
const liveStreamDuration = Date.now() - streamStartedAt.getTime();
|
|
48
|
+
const rollingWindowTime = (_hlsPlayerDurationDet = hlsPlayerDurationDetails.current) === null || _hlsPlayerDurationDet === void 0 ? void 0 : _hlsPlayerDurationDet.rollingWindowTime;
|
|
49
|
+
const durationOfStream = rollingWindowTime && liveStreamDuration >= rollingWindowTime ? rollingWindowTime : liveStreamDuration;
|
|
50
|
+
|
|
51
|
+
// console.log(
|
|
52
|
+
// '$$$ rolling window time > ',
|
|
53
|
+
// hlsPlayerDurationDetails.current?.rollingWindowTime
|
|
54
|
+
// );
|
|
55
|
+
// console.log('$$$ live stream duration > ', liveStreamDuration);
|
|
56
|
+
// console.log('$$$ current stream duration > ', durationOfStream);
|
|
57
|
+
|
|
58
|
+
const prevPosition = prevSeekbarPositionValue.value;
|
|
59
|
+
const currPosition = seekbarPositionValue.value;
|
|
60
|
+
const diff = currPosition - prevPosition;
|
|
61
|
+
const seekByMillis = durationOfStream / 100 * Math.abs(diff);
|
|
62
|
+
const seekBySecs = seekByMillis / 1000;
|
|
63
|
+
if (diff >= 0) {
|
|
64
|
+
var _playerRef$current;
|
|
65
|
+
(_playerRef$current = playerRef.current) === null || _playerRef$current === void 0 || _playerRef$current.seekForward(seekBySecs);
|
|
66
|
+
} else {
|
|
67
|
+
var _playerRef$current2;
|
|
68
|
+
(_playerRef$current2 = playerRef.current) === null || _playerRef$current2 === void 0 || _playerRef$current2.seekBackward(seekBySecs);
|
|
69
|
+
}
|
|
70
|
+
resumeStream();
|
|
71
|
+
};
|
|
72
|
+
const activeSeekbarStyle = useAnimatedStyle(() => ({
|
|
73
|
+
width: interpolate(seekbarPositionValue.value, [0, 100], [0, playerWrapperConstraints.width], {
|
|
74
|
+
extrapolateLeft: Extrapolation.CLAMP,
|
|
75
|
+
extrapolateRight: Extrapolation.CLAMP
|
|
76
|
+
}),
|
|
77
|
+
height: seekbarHeightValue.value
|
|
78
|
+
}), [playerWrapperConstraints.width]);
|
|
79
|
+
const activeSeekbarThumbStyle = useAnimatedStyle(() => ({
|
|
80
|
+
width: seekbarHeightValue.value * 3,
|
|
81
|
+
height: seekbarHeightValue.value * 3,
|
|
82
|
+
borderRadius: seekbarHeightValue.value * 3 / 2,
|
|
83
|
+
bottom: -seekbarHeightValue.value,
|
|
84
|
+
left: -(seekbarHeightValue.value * 3) / 2,
|
|
85
|
+
transform: [{
|
|
86
|
+
translateX: interpolate(seekbarPositionValue.value, [0, 100], [0, playerWrapperConstraints.width], {
|
|
87
|
+
extrapolateLeft: Extrapolation.CLAMP,
|
|
88
|
+
extrapolateRight: Extrapolation.CLAMP
|
|
89
|
+
})
|
|
90
|
+
}]
|
|
91
|
+
}), [playerWrapperConstraints.width]);
|
|
92
|
+
const panGesture = Gesture.Pan().maxPointers(1).minPointers(1).hitSlop({
|
|
93
|
+
top: 12,
|
|
94
|
+
bottom: 12
|
|
95
|
+
}).onStart(e => {
|
|
96
|
+
'worklet';
|
|
97
|
+
|
|
98
|
+
onStart();
|
|
99
|
+
runOnJS(pauseStream)();
|
|
100
|
+
prevSeekbarPositionValue.value = seekbarPositionValue.value;
|
|
101
|
+
seekbarPositionValue.value = interpolate(e.x, [0, playerWrapperConstraints.width], [0, 100], {
|
|
102
|
+
extrapolateLeft: Extrapolation.CLAMP,
|
|
103
|
+
extrapolateRight: Extrapolation.CLAMP
|
|
104
|
+
});
|
|
105
|
+
seekbarHeightValue.value = withTiming(6, {
|
|
106
|
+
duration: 160,
|
|
107
|
+
easing: Easing.linear
|
|
108
|
+
});
|
|
109
|
+
}).onUpdate(e => {
|
|
110
|
+
'worklet';
|
|
111
|
+
|
|
112
|
+
seekbarPositionValue.value = interpolate(e.x, [0, playerWrapperConstraints.width], [0, 100], {
|
|
113
|
+
extrapolateLeft: Extrapolation.CLAMP,
|
|
114
|
+
extrapolateRight: Extrapolation.CLAMP
|
|
115
|
+
});
|
|
116
|
+
}).onEnd(() => {
|
|
117
|
+
'worklet';
|
|
118
|
+
|
|
119
|
+
onEnd();
|
|
120
|
+
seekbarHeightValue.value = withTiming(4, {
|
|
121
|
+
duration: 160,
|
|
122
|
+
easing: Easing.linear
|
|
123
|
+
});
|
|
124
|
+
runOnJS(seekToBarPosition)();
|
|
125
|
+
});
|
|
126
|
+
React.useEffect(() => {
|
|
127
|
+
if (streamStartedAt && !isPaused) {
|
|
128
|
+
const intervalId = setInterval(() => {
|
|
129
|
+
var _hlsPlayerDurationDet2;
|
|
130
|
+
const liveStreamDuration = Date.now() - streamStartedAt.getTime();
|
|
131
|
+
const rollingWindowTime = (_hlsPlayerDurationDet2 = hlsPlayerDurationDetails.current) === null || _hlsPlayerDurationDet2 === void 0 ? void 0 : _hlsPlayerDurationDet2.rollingWindowTime;
|
|
132
|
+
const durationOfStream = rollingWindowTime && liveStreamDuration >= rollingWindowTime ? rollingWindowTime : liveStreamDuration;
|
|
133
|
+
|
|
134
|
+
// console.log(
|
|
135
|
+
// '$$$ rolling window time > ',
|
|
136
|
+
// hlsPlayerDurationDetails.current?.rollingWindowTime
|
|
137
|
+
// );
|
|
138
|
+
// console.log('$$$ live stream duration > ', liveStreamDuration);
|
|
139
|
+
// console.log('$$$ current stream duration > ', durationOfStream);
|
|
140
|
+
|
|
141
|
+
const currentPosition = durationOfStream - distanceFromLiveEdgeValue.value;
|
|
142
|
+
|
|
143
|
+
// console.log('currentPosition > ', currentPosition);
|
|
144
|
+
|
|
145
|
+
seekbarPositionValue.value = interpolate(currentPosition, [0, durationOfStream], [0, 100], {
|
|
146
|
+
extrapolateLeft: Extrapolation.CLAMP,
|
|
147
|
+
extrapolateRight: Extrapolation.CLAMP
|
|
148
|
+
});
|
|
149
|
+
}, 1000);
|
|
150
|
+
return () => {
|
|
151
|
+
clearInterval(intervalId);
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
}, [isPaused, streamStartedAt]);
|
|
155
|
+
let startedPlayingFirstTime = false;
|
|
156
|
+
let prevPlaybackState = HMSHLSPlayerPlaybackState.UNKNOWN;
|
|
157
|
+
const playbackState = useHMSHLSPlayerPlaybackState();
|
|
158
|
+
if (prevPlaybackState === HMSHLSPlayerPlaybackState.UNKNOWN && playbackState === HMSHLSPlayerPlaybackState.PLAYING) {
|
|
159
|
+
prevPlaybackState = playbackState;
|
|
160
|
+
startedPlayingFirstTime = true;
|
|
161
|
+
}
|
|
162
|
+
React.useEffect(() => {
|
|
163
|
+
if (startedPlayingFirstTime && playerRef.current) {
|
|
164
|
+
let mounted = true;
|
|
165
|
+
playerRef.current.getPlayerDurationDetails().then(data => {
|
|
166
|
+
if (mounted) {
|
|
167
|
+
console.log('$$$ getPlayerDurationDetails > ', data);
|
|
168
|
+
hlsPlayerDurationDetails.current = data;
|
|
169
|
+
if (typeof data.rollingWindowTime === 'number' && data.rollingWindowTime < 300000) {
|
|
170
|
+
hlsPlayerDurationDetails.current.rollingWindowTime = 300000;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}).catch(() => {});
|
|
174
|
+
return () => {
|
|
175
|
+
mounted = false;
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
}, [startedPlayingFirstTime]);
|
|
179
|
+
return /*#__PURE__*/React.createElement(GestureDetector, {
|
|
180
|
+
gesture: panGesture
|
|
181
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
182
|
+
collapsable: false,
|
|
183
|
+
hitSlop: {
|
|
184
|
+
top: 12,
|
|
185
|
+
bottom: 12
|
|
186
|
+
},
|
|
187
|
+
style: [styles.container, {
|
|
188
|
+
width: playerWrapperConstraints.width
|
|
189
|
+
}]
|
|
190
|
+
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
191
|
+
style: [styles.inactiveSeekbar, {
|
|
192
|
+
width: playerWrapperConstraints.width
|
|
193
|
+
}]
|
|
194
|
+
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
195
|
+
style: [styles.seekbar, seekbarRoomStyle, activeSeekbarStyle]
|
|
196
|
+
}), /*#__PURE__*/React.createElement(Animated.View, {
|
|
197
|
+
style: [styles.seekbarThumb, seekbarRoomStyle, activeSeekbarThumbStyle]
|
|
198
|
+
}))));
|
|
199
|
+
});
|
|
200
|
+
export const HLSSeekbar = /*#__PURE__*/React.memo(_HLSSeekbar);
|
|
201
|
+
const styles = StyleSheet.create({
|
|
202
|
+
container: {
|
|
203
|
+
height: 6,
|
|
204
|
+
justifyContent: 'flex-end'
|
|
205
|
+
},
|
|
206
|
+
inactiveSeekbar: {
|
|
207
|
+
position: 'relative',
|
|
208
|
+
backgroundColor: 'rgba(255, 255, 255, 0.25)'
|
|
209
|
+
},
|
|
210
|
+
seekbar: {
|
|
211
|
+
height: 4
|
|
212
|
+
},
|
|
213
|
+
seekbarThumb: {
|
|
214
|
+
position: 'absolute',
|
|
215
|
+
bottom: -4,
|
|
216
|
+
right: 0,
|
|
217
|
+
zIndex: 100
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
*
|
|
223
|
+
*
|
|
224
|
+
*
|
|
225
|
+
*
|
|
226
|
+
*
|
|
227
|
+
*
|
|
228
|
+
*
|
|
229
|
+
*
|
|
230
|
+
*
|
|
231
|
+
* 200 -> 200 * 40%
|
|
232
|
+
*
|
|
233
|
+
* 180 - 33.33% = 60;
|
|
234
|
+
*
|
|
235
|
+
* currentStreamDuration * (diff in current and prev) * 100 / prev
|
|
236
|
+
*
|
|
237
|
+
* 0 |----------| 150
|
|
238
|
+
* prev = 135
|
|
239
|
+
*
|
|
240
|
+
* curr = 90
|
|
241
|
+
*
|
|
242
|
+
*
|
|
243
|
+
*
|
|
244
|
+
*
|
|
245
|
+
*
|
|
246
|
+
*
|
|
247
|
+
*
|
|
248
|
+
*
|
|
249
|
+
*
|
|
250
|
+
* //// 2 * 30 = 60
|
|
251
|
+
* 1.5 * 30 = 45
|
|
252
|
+
*
|
|
253
|
+
* 180
|
|
254
|
+
*
|
|
255
|
+
* 120
|
|
256
|
+
*
|
|
257
|
+
* 0 |------____| 100
|
|
258
|
+
*
|
|
259
|
+
*
|
|
260
|
+
* 200 * 40% = 80
|
|
261
|
+
*
|
|
262
|
+
* 200 * 30% = 60
|
|
263
|
+
*
|
|
264
|
+
*
|
|
265
|
+
* 30*90
|
|
266
|
+
*
|
|
267
|
+
* 0 |---------_| 100
|
|
268
|
+
* Prev = 90
|
|
269
|
+
* |------|
|
|
270
|
+
* Curr = 60
|
|
271
|
+
*
|
|
272
|
+
* 90 - 60 = 30
|
|
273
|
+
*
|
|
274
|
+
* seekbackward(80)
|
|
275
|
+
*/
|
|
276
|
+
//# sourceMappingURL=HLSSeekbar.js.map
|