@100mslive/react-native-room-kit 1.1.6 → 1.1.8
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/HMSRoomSetup.js +8 -0
- package/lib/commonjs/HMSRoomSetup.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/Pencil/assets/pencil-board.png +0 -0
- package/lib/commonjs/Icons/Pencil/assets/pencil-board@2x.png +0 -0
- package/lib/commonjs/Icons/Pencil/assets/pencil-board@3x.png +0 -0
- package/lib/commonjs/Icons/Pencil/index.js +2 -1
- package/lib/commonjs/Icons/Pencil/index.js.map +1 -1
- 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 +33 -0
- package/lib/commonjs/Icons/index.js.map +1 -1
- package/lib/commonjs/components/DisplayView.js +2 -1
- package/lib/commonjs/components/DisplayView.js.map +1 -1
- package/lib/commonjs/components/Footer.js +1 -1
- package/lib/commonjs/components/Footer.js.map +1 -1
- package/lib/commonjs/components/FullScreenWhiteboard.js +58 -0
- package/lib/commonjs/components/FullScreenWhiteboard.js.map +1 -0
- package/lib/commonjs/components/GridView.js +6 -4
- package/lib/commonjs/components/GridView.js.map +1 -1
- package/lib/commonjs/components/HLSChatMessages.js +4 -5
- package/lib/commonjs/components/HLSChatMessages.js.map +1 -1
- package/lib/commonjs/components/HLSChatView.js +7 -2
- package/lib/commonjs/components/HLSChatView.js.map +1 -1
- 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/HLSDistanceFromLive.js +56 -0
- package/lib/commonjs/components/HLSDistanceFromLive.js.map +1 -0
- 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/HLSPlayPauseControl.js +62 -0
- package/lib/commonjs/components/HLSPlayPauseControl.js.map +1 -0
- package/lib/commonjs/components/HLSPlayer.js +82 -81
- package/lib/commonjs/components/HLSPlayer.js.map +1 -1
- package/lib/commonjs/components/HLSPlayerContainer.js +65 -3
- package/lib/commonjs/components/HLSPlayerContainer.js.map +1 -1
- package/lib/commonjs/components/HLSPlayerControls.js +89 -46
- package/lib/commonjs/components/HLSPlayerControls.js.map +1 -1
- 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/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/HMSOverlayMessageView.js +150 -0
- package/lib/commonjs/components/HMSOverlayMessageView.js.map +1 -0
- package/lib/commonjs/components/MeetingScreenContent.js +22 -2
- package/lib/commonjs/components/MeetingScreenContent.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/RoomSettingsModalContent.js +63 -6
- package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/TilesContainer.js +4 -4
- package/lib/commonjs/components/TilesContainer.js.map +1 -1
- package/lib/commonjs/components/WebrtcView.js +2 -2
- package/lib/commonjs/components/WebrtcView.js.map +1 -1
- package/lib/commonjs/components/Whiteboard.js +72 -0
- package/lib/commonjs/components/Whiteboard.js.map +1 -0
- package/lib/commonjs/components/WhiteboardContainer.js +35 -0
- package/lib/commonjs/components/WhiteboardContainer.js.map +1 -0
- package/lib/commonjs/components/WhiteboardFullScreenButton.js +42 -0
- package/lib/commonjs/components/WhiteboardFullScreenButton.js.map +1 -0
- package/lib/commonjs/hooks-util.js +66 -8
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +5 -0
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +22 -3
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/appState.js +17 -1
- package/lib/commonjs/redux/reducers/appState.js.map +1 -1
- package/lib/commonjs/redux/reducers/hmsStates.js +7 -1
- package/lib/commonjs/redux/reducers/hmsStates.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +10 -2
- package/lib/module/HMSRoomSetup.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/Pencil/assets/pencil-board.png +0 -0
- package/lib/module/Icons/Pencil/assets/pencil-board@2x.png +0 -0
- package/lib/module/Icons/Pencil/assets/pencil-board@3x.png +0 -0
- package/lib/module/Icons/Pencil/index.js +2 -1
- package/lib/module/Icons/Pencil/index.js.map +1 -1
- 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 +3 -0
- package/lib/module/Icons/index.js.map +1 -1
- package/lib/module/components/DisplayView.js +2 -1
- package/lib/module/components/DisplayView.js.map +1 -1
- package/lib/module/components/Footer.js +1 -1
- package/lib/module/components/Footer.js.map +1 -1
- package/lib/module/components/FullScreenWhiteboard.js +48 -0
- package/lib/module/components/FullScreenWhiteboard.js.map +1 -0
- package/lib/module/components/GridView.js +6 -4
- package/lib/module/components/GridView.js.map +1 -1
- package/lib/module/components/HLSChatMessages.js +5 -6
- package/lib/module/components/HLSChatMessages.js.map +1 -1
- package/lib/module/components/HLSChatView.js +7 -2
- package/lib/module/components/HLSChatView.js.map +1 -1
- 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/HLSDistanceFromLive.js +48 -0
- package/lib/module/components/HLSDistanceFromLive.js.map +1 -0
- 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/HLSPlayPauseControl.js +54 -0
- package/lib/module/components/HLSPlayPauseControl.js.map +1 -0
- package/lib/module/components/HLSPlayer.js +83 -81
- package/lib/module/components/HLSPlayer.js.map +1 -1
- package/lib/module/components/HLSPlayerContainer.js +65 -3
- package/lib/module/components/HLSPlayerContainer.js.map +1 -1
- package/lib/module/components/HLSPlayerControls.js +89 -50
- package/lib/module/components/HLSPlayerControls.js.map +1 -1
- 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/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/HMSOverlayMessageView.js +142 -0
- package/lib/module/components/HMSOverlayMessageView.js.map +1 -0
- package/lib/module/components/MeetingScreenContent.js +23 -3
- package/lib/module/components/MeetingScreenContent.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/RoomSettingsModalContent.js +65 -8
- package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/module/components/TilesContainer.js +4 -4
- package/lib/module/components/TilesContainer.js.map +1 -1
- package/lib/module/components/WebrtcView.js +2 -2
- package/lib/module/components/WebrtcView.js.map +1 -1
- package/lib/module/components/Whiteboard.js +64 -0
- package/lib/module/components/Whiteboard.js.map +1 -0
- package/lib/module/components/WhiteboardContainer.js +27 -0
- package/lib/module/components/WhiteboardContainer.js.map +1 -0
- package/lib/module/components/WhiteboardFullScreenButton.js +33 -0
- package/lib/module/components/WhiteboardFullScreenButton.js.map +1 -0
- package/lib/module/hooks-util.js +66 -9
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +5 -0
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +16 -0
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/appState.js +17 -1
- package/lib/module/redux/reducers/appState.js.map +1 -1
- package/lib/module/redux/reducers/hmsStates.js +7 -1
- package/lib/module/redux/reducers/hmsStates.js.map +1 -1
- package/lib/typescript/HMSRoomSetup.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/Pencil/index.d.ts +1 -0
- package/lib/typescript/Icons/Pencil/index.d.ts.map +1 -1
- 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 +3 -0
- package/lib/typescript/Icons/index.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/FullScreenWhiteboard.d.ts +3 -0
- package/lib/typescript/components/FullScreenWhiteboard.d.ts.map +1 -0
- package/lib/typescript/components/GridView.d.ts.map +1 -1
- package/lib/typescript/components/HLSChatMessages.d.ts.map +1 -1
- package/lib/typescript/components/HLSChatView.d.ts.map +1 -1
- 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/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/HLSPlayPauseControl.d.ts +8 -0
- package/lib/typescript/components/HLSPlayPauseControl.d.ts.map +1 -0
- package/lib/typescript/components/HLSPlayer.d.ts +4 -2
- package/lib/typescript/components/HLSPlayer.d.ts.map +1 -1
- package/lib/typescript/components/HLSPlayerContainer.d.ts.map +1 -1
- package/lib/typescript/components/HLSPlayerControls.d.ts +12 -2
- package/lib/typescript/components/HLSPlayerControls.d.ts.map +1 -1
- 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/HMSHLSMessage.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/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/Preview.d.ts.map +1 -1
- package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/TilesContainer.d.ts.map +1 -1
- package/lib/typescript/components/WebrtcView.d.ts.map +1 -1
- package/lib/typescript/components/Whiteboard.d.ts +6 -0
- package/lib/typescript/components/Whiteboard.d.ts.map +1 -0
- package/lib/typescript/components/WhiteboardContainer.d.ts +6 -0
- package/lib/typescript/components/WhiteboardContainer.d.ts.map +1 -0
- package/lib/typescript/components/WhiteboardFullScreenButton.d.ts +5 -0
- package/lib/typescript/components/WhiteboardFullScreenButton.d.ts.map +1 -0
- package/lib/typescript/hooks-util.d.ts +12 -7
- 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 +17 -1
- 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 +2 -0
- package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/hmsStates.d.ts +7 -2
- package/lib/typescript/redux/reducers/hmsStates.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 +4 -3
- package/src/HMSRoomSetup.tsx +21 -0
- 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/Pencil/assets/pencil-board.png +0 -0
- package/src/Icons/Pencil/assets/pencil-board@2x.png +0 -0
- package/src/Icons/Pencil/assets/pencil-board@3x.png +0 -0
- package/src/Icons/Pencil/index.tsx +9 -2
- 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 +3 -0
- package/src/components/DisplayView.tsx +3 -0
- package/src/components/Footer.tsx +5 -2
- package/src/components/FullScreenWhiteboard.tsx +59 -0
- package/src/components/GridView.tsx +14 -5
- package/src/components/HLSChatMessages.tsx +4 -6
- package/src/components/HLSChatView.tsx +7 -4
- package/src/components/HLSCloseMeetingControl.tsx +39 -0
- package/src/components/HLSClosedCaptionControl.tsx +140 -0
- package/src/components/HLSDistanceFromLive.tsx +69 -0
- package/src/components/HLSFullScreenControl.tsx +46 -0
- package/src/components/HLSGoLiveControl.tsx +104 -0
- package/src/components/HLSPlayPauseControl.tsx +69 -0
- package/src/components/HLSPlayer.tsx +98 -88
- package/src/components/HLSPlayerContainer.tsx +89 -14
- package/src/components/HLSPlayerControls.tsx +137 -58
- package/src/components/HLSSeekbackwardControl.tsx +88 -0
- package/src/components/HLSSeekbar.tsx +381 -0
- package/src/components/HLSSeekforwardControl.tsx +97 -0
- package/src/components/HMSHLSMessage.tsx +32 -49
- package/src/components/HMSHLSMessageList.tsx +2 -2
- package/src/components/HMSOverlayMessageView.tsx +189 -0
- package/src/components/MeetingScreenContent.tsx +28 -2
- package/src/components/Participants/ParticipantsList.tsx +12 -10
- package/src/components/RoomSettingsModalContent.tsx +77 -2
- package/src/components/TilesContainer.tsx +7 -5
- package/src/components/WebrtcView.tsx +11 -4
- package/src/components/Whiteboard.tsx +101 -0
- package/src/components/WhiteboardContainer.tsx +35 -0
- package/src/components/WhiteboardFullScreenButton.tsx +52 -0
- package/src/hooks-util.ts +80 -10
- package/src/redux/actionTypes.ts +7 -0
- package/src/redux/actions/index.ts +16 -0
- package/src/redux/reducers/appState.ts +16 -0
- package/src/redux/reducers/hmsStates.ts +15 -1
- package/lib/commonjs/components/CustomHLSPlayerControls.js +0 -80
- package/lib/commonjs/components/CustomHLSPlayerControls.js.map +0 -1
- package/lib/module/components/CustomHLSPlayerControls.js +0 -72
- package/lib/module/components/CustomHLSPlayerControls.js.map +0 -1
- package/lib/typescript/components/CustomHLSPlayerControls.d.ts +0 -7
- package/lib/typescript/components/CustomHLSPlayerControls.d.ts.map +0 -1
- package/src/components/CustomHLSPlayerControls.tsx +0 -92
|
@@ -16,6 +16,7 @@ import { PaginationDots } from './PaginationDots';
|
|
|
16
16
|
import { setGridViewActivePage } from '../redux/actions';
|
|
17
17
|
import { Tile } from './Tile';
|
|
18
18
|
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
19
|
+
import { WhiteboardContainer } from './WhiteboardContainer';
|
|
19
20
|
|
|
20
21
|
export type GridViewProps = {
|
|
21
22
|
onPeerTileMorePress(peerTrackNode: PeerTrackNode): void;
|
|
@@ -52,6 +53,9 @@ export const GridView = React.forwardRef<GridViewRefAttrs, GridViewProps>(
|
|
|
52
53
|
const screenshareTilesAvailable = useSelector(
|
|
53
54
|
(state: RootState) => state.app.screensharePeerTrackNodes.length > 0
|
|
54
55
|
);
|
|
56
|
+
const whiteboardActive = useSelector(
|
|
57
|
+
(state: RootState) => !!state.hmsStates.whiteboard
|
|
58
|
+
);
|
|
55
59
|
const regularTilesAvailable = pairedPeers.length > 0;
|
|
56
60
|
|
|
57
61
|
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
@@ -147,9 +151,12 @@ export const GridView = React.forwardRef<GridViewRefAttrs, GridViewProps>(
|
|
|
147
151
|
setHmsViewRefs={setHmsViewRefs}
|
|
148
152
|
onPeerTileMorePress={onPeerTileMorePress}
|
|
149
153
|
/>
|
|
154
|
+
) : whiteboardActive ? (
|
|
155
|
+
<WhiteboardContainer />
|
|
150
156
|
) : null}
|
|
151
157
|
|
|
152
|
-
{screenshareTilesAvailable &&
|
|
158
|
+
{(whiteboardActive || screenshareTilesAvailable) &&
|
|
159
|
+
isLandscapeOrientation ? null : (
|
|
153
160
|
<RegularTiles
|
|
154
161
|
ref={regularTilesFlatlistRef}
|
|
155
162
|
pairedPeers={pairedPeers}
|
|
@@ -209,8 +216,10 @@ const RegularTiles = React.forwardRef<
|
|
|
209
216
|
const dispatch = useDispatch();
|
|
210
217
|
const { height: safeHeight } = useSafeAreaFrame();
|
|
211
218
|
|
|
212
|
-
const
|
|
213
|
-
(state: RootState) =>
|
|
219
|
+
const screenshareTilesOrWhiteboardActive = useSelector(
|
|
220
|
+
(state: RootState) =>
|
|
221
|
+
state.app.screensharePeerTrackNodes.length > 0 ||
|
|
222
|
+
!!state.hmsStates.whiteboard
|
|
214
223
|
);
|
|
215
224
|
const activeIndex = useSelector(
|
|
216
225
|
(state: RootState) => state.app.gridViewActivePage
|
|
@@ -248,7 +257,7 @@ const RegularTiles = React.forwardRef<
|
|
|
248
257
|
);
|
|
249
258
|
|
|
250
259
|
return (
|
|
251
|
-
<View style={{ flex:
|
|
260
|
+
<View style={{ flex: screenshareTilesOrWhiteboardActive ? undefined : 1 }}>
|
|
252
261
|
<FlatList
|
|
253
262
|
ref={flatlistRef}
|
|
254
263
|
horizontal={true}
|
|
@@ -275,7 +284,7 @@ const RegularTiles = React.forwardRef<
|
|
|
275
284
|
list={pairedPeers}
|
|
276
285
|
activeIndex={activeIndex}
|
|
277
286
|
style={
|
|
278
|
-
|
|
287
|
+
screenshareTilesOrWhiteboardActive || isLandscapeOrientation
|
|
279
288
|
? { marginVertical: isLandscapeOrientation ? 4 : 8 }
|
|
280
289
|
: null
|
|
281
290
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Platform, StyleSheet, View } from 'react-native';
|
|
2
|
+
import { FlatList, Platform, StyleSheet, View } from 'react-native';
|
|
3
3
|
import { useSelector } from 'react-redux';
|
|
4
|
-
import { FlashList } from '@shopify/flash-list';
|
|
5
4
|
import type { HMSMessage } from '@100mslive/react-native-hms';
|
|
6
5
|
|
|
7
6
|
import type { RootState } from '../redux';
|
|
@@ -32,11 +31,10 @@ export const HLSChatMessages = () => {
|
|
|
32
31
|
<PinnedMessages />
|
|
33
32
|
|
|
34
33
|
{messages.length > 0 ? (
|
|
35
|
-
<
|
|
36
|
-
data={messages}
|
|
34
|
+
<FlatList
|
|
37
35
|
inverted={true}
|
|
38
|
-
|
|
39
|
-
contentContainerStyle={{
|
|
36
|
+
data={messages}
|
|
37
|
+
contentContainerStyle={{ flexGrow: 1, justifyContent: 'flex-end' }}
|
|
40
38
|
showsVerticalScrollIndicator={Platform.OS !== 'android'}
|
|
41
39
|
// contentContainerStyle={styles.listContentContainer} // Bug: Android inverted flashlist will apply padding on left when `paddingRight: 12` is applied
|
|
42
40
|
keyboardShouldPersistTaps="always"
|
|
@@ -10,13 +10,16 @@ import { HLSDescriptionPane } from './HLSDescriptionPane';
|
|
|
10
10
|
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
11
11
|
import type { RootState } from '../redux';
|
|
12
12
|
import { HLSNotifications } from './HLSNotifications';
|
|
13
|
+
import { PipModes } from '../utils/types';
|
|
13
14
|
|
|
14
15
|
export const HLSChatView = () => {
|
|
15
16
|
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
16
17
|
const { chatWrapperConstraints } = useHLSViewsConstraints();
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const fullScreenMode = useSelector((state: RootState) => {
|
|
19
|
+
const hlsFullScreen = state.app.hlsFullScreen;
|
|
20
|
+
const isPipModeActive = state.app.pipModeStatus === PipModes.ACTIVE;
|
|
21
|
+
return hlsFullScreen || isPipModeActive;
|
|
22
|
+
});
|
|
20
23
|
|
|
21
24
|
const hmsRoomStyles = useHMSRoomStyleSheet((theme) => ({
|
|
22
25
|
wrapper: {
|
|
@@ -24,7 +27,7 @@ export const HLSChatView = () => {
|
|
|
24
27
|
},
|
|
25
28
|
}));
|
|
26
29
|
|
|
27
|
-
if (
|
|
30
|
+
if (fullScreenMode) {
|
|
28
31
|
return null;
|
|
29
32
|
}
|
|
30
33
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
+
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
|
|
4
|
+
|
|
5
|
+
import { CloseIcon } from '../Icons';
|
|
6
|
+
import { ModalTypes } from '../utils/types';
|
|
7
|
+
import { useModalType } from '../hooks-util';
|
|
8
|
+
|
|
9
|
+
interface HLSPlayerControlsProps {
|
|
10
|
+
onPress?: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const _HLSCloseMeetingControl: React.FC<HLSPlayerControlsProps> = ({
|
|
14
|
+
onPress,
|
|
15
|
+
}) => {
|
|
16
|
+
const { handleModalVisibleType } = useModalType();
|
|
17
|
+
|
|
18
|
+
const handleCloseBtnPress = () => {
|
|
19
|
+
onPress?.();
|
|
20
|
+
handleModalVisibleType(ModalTypes.LEAVE_ROOM);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<GestureDetector gesture={Gesture.Tap()}>
|
|
25
|
+
<TouchableOpacity onPress={handleCloseBtnPress} style={styles.icon}>
|
|
26
|
+
<CloseIcon size="medium" />
|
|
27
|
+
</TouchableOpacity>
|
|
28
|
+
</GestureDetector>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const HLSCloseMeetingControl = React.memo(_HLSCloseMeetingControl);
|
|
33
|
+
|
|
34
|
+
const styles = StyleSheet.create({
|
|
35
|
+
icon: {
|
|
36
|
+
padding: 4,
|
|
37
|
+
alignSelf: 'flex-start',
|
|
38
|
+
},
|
|
39
|
+
});
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import React, { useRef, useState } from 'react';
|
|
2
|
+
import { StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
4
|
+
import {
|
|
5
|
+
useHMSHLSPlayerPlaybackState,
|
|
6
|
+
HMSHLSPlayerPlaybackState,
|
|
7
|
+
} from '@100mslive/react-native-hms';
|
|
8
|
+
import type { HMSHLSPlayer } from '@100mslive/react-native-hms';
|
|
9
|
+
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
|
|
10
|
+
|
|
11
|
+
import { CCIcon } from '../Icons';
|
|
12
|
+
import type { RootState } from '../redux';
|
|
13
|
+
import { useIsHLSStreamingOn } from '../hooks-sdk';
|
|
14
|
+
|
|
15
|
+
interface HLSClosedCaptionControlProps {
|
|
16
|
+
playerRef: React.RefObject<React.ElementRef<typeof HMSHLSPlayer>>;
|
|
17
|
+
onPress?: () => void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const _HLSClosedCaptionControl: React.FC<
|
|
21
|
+
HLSClosedCaptionControlProps
|
|
22
|
+
> = ({ playerRef, onPress }) => {
|
|
23
|
+
const isHLSStreamingOn = useIsHLSStreamingOn();
|
|
24
|
+
const isStreamUrlPresent = useSelector(
|
|
25
|
+
(state: RootState) =>
|
|
26
|
+
!!state.hmsStates.room?.hlsStreamingState.variants?.[0]?.hlsStreamUrl
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
let startedPlayingFirstTimeRef = useRef(false);
|
|
30
|
+
let prevPlaybackStateRef = useRef(HMSHLSPlayerPlaybackState.UNKNOWN);
|
|
31
|
+
const playbackState = useHMSHLSPlayerPlaybackState();
|
|
32
|
+
|
|
33
|
+
if (
|
|
34
|
+
prevPlaybackStateRef.current === HMSHLSPlayerPlaybackState.UNKNOWN &&
|
|
35
|
+
playbackState === HMSHLSPlayerPlaybackState.PLAYING
|
|
36
|
+
) {
|
|
37
|
+
prevPlaybackStateRef.current = playbackState;
|
|
38
|
+
startedPlayingFirstTimeRef.current = true;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const [isCCSupported, setIsCCSupported] = useState(false);
|
|
42
|
+
const [isCCEnabled, setIsCCEnabled] = useState(true);
|
|
43
|
+
|
|
44
|
+
const handleCCBtnPress = () => {
|
|
45
|
+
if (!isCCSupported || !playerRef.current) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
onPress?.();
|
|
49
|
+
if (isCCEnabled) {
|
|
50
|
+
playerRef.current.disableClosedCaption();
|
|
51
|
+
setIsCCEnabled(false);
|
|
52
|
+
} else {
|
|
53
|
+
playerRef.current.enableClosedCaption();
|
|
54
|
+
setIsCCEnabled(true);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
React.useEffect(() => {
|
|
59
|
+
if (
|
|
60
|
+
isHLSStreamingOn &&
|
|
61
|
+
isStreamUrlPresent &&
|
|
62
|
+
startedPlayingFirstTimeRef.current &&
|
|
63
|
+
playerRef.current
|
|
64
|
+
) {
|
|
65
|
+
let mounted = true;
|
|
66
|
+
|
|
67
|
+
playerRef.current
|
|
68
|
+
.isClosedCaptionSupported()
|
|
69
|
+
.then((supported) => {
|
|
70
|
+
if (mounted) {
|
|
71
|
+
setIsCCSupported(supported);
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
.catch(() => {});
|
|
75
|
+
playerRef.current
|
|
76
|
+
.isClosedCaptionEnabled()
|
|
77
|
+
.then((enabled) => {
|
|
78
|
+
if (mounted) {
|
|
79
|
+
setIsCCEnabled(enabled);
|
|
80
|
+
}
|
|
81
|
+
})
|
|
82
|
+
.catch(() => {});
|
|
83
|
+
|
|
84
|
+
return () => {
|
|
85
|
+
mounted = false;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}, [
|
|
89
|
+
isHLSStreamingOn,
|
|
90
|
+
isStreamUrlPresent,
|
|
91
|
+
startedPlayingFirstTimeRef.current,
|
|
92
|
+
]);
|
|
93
|
+
|
|
94
|
+
if (!isCCSupported) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return (
|
|
99
|
+
<GestureDetector gesture={Gesture.Tap()}>
|
|
100
|
+
<TouchableOpacity
|
|
101
|
+
onPress={handleCCBtnPress}
|
|
102
|
+
style={[styles.icon, styles.gap]}
|
|
103
|
+
>
|
|
104
|
+
<CCIcon size="medium" enabled={isCCEnabled} />
|
|
105
|
+
</TouchableOpacity>
|
|
106
|
+
</GestureDetector>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export const HLSClosedCaptionControl = React.memo(_HLSClosedCaptionControl);
|
|
111
|
+
|
|
112
|
+
const styles = StyleSheet.create({
|
|
113
|
+
detectorContainer: {
|
|
114
|
+
position: 'absolute',
|
|
115
|
+
width: '100%',
|
|
116
|
+
height: '100%',
|
|
117
|
+
zIndex: 5,
|
|
118
|
+
},
|
|
119
|
+
container: {
|
|
120
|
+
flex: 1,
|
|
121
|
+
justifyContent: 'space-between',
|
|
122
|
+
},
|
|
123
|
+
controlsRow: {
|
|
124
|
+
flexDirection: 'row',
|
|
125
|
+
alignItems: 'center',
|
|
126
|
+
justifyContent: 'space-between',
|
|
127
|
+
marginHorizontal: 8,
|
|
128
|
+
},
|
|
129
|
+
normalRow: {
|
|
130
|
+
flexDirection: 'row',
|
|
131
|
+
alignItems: 'center',
|
|
132
|
+
},
|
|
133
|
+
icon: {
|
|
134
|
+
padding: 4,
|
|
135
|
+
alignSelf: 'flex-start',
|
|
136
|
+
},
|
|
137
|
+
gap: {
|
|
138
|
+
marginLeft: 16,
|
|
139
|
+
},
|
|
140
|
+
});
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Platform, StyleSheet, Text } from 'react-native';
|
|
3
|
+
import {
|
|
4
|
+
HMSHLSPlaylistType,
|
|
5
|
+
useHMSHLSPlayerStat,
|
|
6
|
+
useIsHLSStreamLive,
|
|
7
|
+
} from '@100mslive/react-native-hms';
|
|
8
|
+
import { useSelector } from 'react-redux';
|
|
9
|
+
|
|
10
|
+
import { useHMSRoomStyle } from '../hooks-util';
|
|
11
|
+
import { useIsHLSStreamingOn } from '../hooks-sdk';
|
|
12
|
+
import type { RootState } from '../redux';
|
|
13
|
+
|
|
14
|
+
interface HLSDistanceFromLiveProps {}
|
|
15
|
+
|
|
16
|
+
export const _HLSDistanceFromLive: React.FC<HLSDistanceFromLiveProps> = () => {
|
|
17
|
+
const isHLSStreamingOn = useIsHLSStreamingOn();
|
|
18
|
+
const isDVRStream = useSelector(
|
|
19
|
+
(state: RootState) =>
|
|
20
|
+
state.hmsStates.room?.hlsStreamingState.variants?.[0]?.playlistType ===
|
|
21
|
+
HMSHLSPlaylistType.DVR
|
|
22
|
+
);
|
|
23
|
+
const isStreamLive = useIsHLSStreamLive();
|
|
24
|
+
|
|
25
|
+
if (!isHLSStreamingOn || !isDVRStream || isStreamLive) return null;
|
|
26
|
+
|
|
27
|
+
return <HLSDistanceFromLiveText />;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const HLSDistanceFromLiveText = React.memo(() => {
|
|
31
|
+
const distanceFromLiveEdge = useHMSHLSPlayerStat('distanceFromLive');
|
|
32
|
+
|
|
33
|
+
const textStyle = useHMSRoomStyle((_, typography) => ({
|
|
34
|
+
fontFamily: `${typography.font_family}-Regular`,
|
|
35
|
+
color: '#ffffff',
|
|
36
|
+
}));
|
|
37
|
+
|
|
38
|
+
const hhmmss = msToHMS(
|
|
39
|
+
distanceFromLiveEdge - Platform.select({ default: 10000, ios: 1000 })
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
return <Text style={[styles.text, textStyle]}>-{hhmmss}</Text>;
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export const HLSDistanceFromLive = React.memo(_HLSDistanceFromLive);
|
|
46
|
+
|
|
47
|
+
const styles = StyleSheet.create({
|
|
48
|
+
text: {
|
|
49
|
+
fontSize: 16,
|
|
50
|
+
lineHeight: 24,
|
|
51
|
+
letterSpacing: 0.5,
|
|
52
|
+
marginLeft: 8,
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
function msToHMS(ms: number) {
|
|
57
|
+
const seconds = Math.floor((ms / 1000) % 60);
|
|
58
|
+
const minutes = Math.floor((ms / 1000 / 60) % 60);
|
|
59
|
+
const hours = Math.floor((ms / 1000 / 3600) % 24);
|
|
60
|
+
|
|
61
|
+
const humanized = [
|
|
62
|
+
minutes > 0 ? minutes.toString().padStart(2, '0') : '0',
|
|
63
|
+
seconds.toString().padStart(2, '0'),
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
if (hours > 0) humanized.unshift(hours.toString().padStart(2, '0'));
|
|
67
|
+
|
|
68
|
+
return humanized.join(':');
|
|
69
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
+
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
|
|
5
|
+
|
|
6
|
+
import { MaximizeIcon, MinimizeIcon } from '../Icons';
|
|
7
|
+
import type { RootState } from '../redux';
|
|
8
|
+
import { setHlsFullScreen } from '../redux/actions';
|
|
9
|
+
|
|
10
|
+
interface HLSFullScreenControlProps {
|
|
11
|
+
onPress?: () => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const _HLSFullScreenControl: React.FC<HLSFullScreenControlProps> = ({
|
|
15
|
+
onPress,
|
|
16
|
+
}) => {
|
|
17
|
+
const dispatch = useDispatch();
|
|
18
|
+
const hlsFullScreen = useSelector(
|
|
19
|
+
(state: RootState) => state.app.hlsFullScreen
|
|
20
|
+
);
|
|
21
|
+
const toggleFullScreen = () => {
|
|
22
|
+
onPress?.();
|
|
23
|
+
dispatch(setHlsFullScreen(!hlsFullScreen));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<GestureDetector gesture={Gesture.Tap()}>
|
|
28
|
+
<TouchableOpacity onPress={toggleFullScreen} style={styles.icon}>
|
|
29
|
+
{hlsFullScreen ? (
|
|
30
|
+
<MinimizeIcon size="medium" />
|
|
31
|
+
) : (
|
|
32
|
+
<MaximizeIcon size="medium" />
|
|
33
|
+
)}
|
|
34
|
+
</TouchableOpacity>
|
|
35
|
+
</GestureDetector>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const HLSFullScreenControl = React.memo(_HLSFullScreenControl);
|
|
40
|
+
|
|
41
|
+
const styles = StyleSheet.create({
|
|
42
|
+
icon: {
|
|
43
|
+
padding: 4,
|
|
44
|
+
alignSelf: 'flex-start',
|
|
45
|
+
},
|
|
46
|
+
});
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, StyleSheet, TouchableOpacity, Text } from 'react-native';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
4
|
+
import {
|
|
5
|
+
HMSHLSPlaylistType,
|
|
6
|
+
useIsHLSStreamLive,
|
|
7
|
+
} from '@100mslive/react-native-hms';
|
|
8
|
+
import type { HMSHLSPlayer } from '@100mslive/react-native-hms';
|
|
9
|
+
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
|
|
10
|
+
|
|
11
|
+
import { useHMSRoomStyleSheet } from '../hooks-util';
|
|
12
|
+
import { useIsHLSStreamingOn } from '../hooks-sdk';
|
|
13
|
+
import type { RootState } from '../redux';
|
|
14
|
+
|
|
15
|
+
interface HLSGoLiveControlProps {
|
|
16
|
+
playerRef: React.RefObject<React.ElementRef<typeof HMSHLSPlayer>>;
|
|
17
|
+
onPress?: () => void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const _HLSGoLiveControl: React.FC<HLSGoLiveControlProps> = ({
|
|
21
|
+
playerRef,
|
|
22
|
+
onPress,
|
|
23
|
+
}) => {
|
|
24
|
+
const isHLSStreamingOn = useIsHLSStreamingOn();
|
|
25
|
+
const isDVRStream = useSelector(
|
|
26
|
+
(state: RootState) =>
|
|
27
|
+
state.hmsStates.room?.hlsStreamingState.variants?.[0]?.playlistType ===
|
|
28
|
+
HMSHLSPlaylistType.DVR
|
|
29
|
+
);
|
|
30
|
+
const isStreamLive = useIsHLSStreamLive();
|
|
31
|
+
|
|
32
|
+
const handleGoLivePress = () => {
|
|
33
|
+
onPress?.();
|
|
34
|
+
playerRef.current?.seekToLivePosition();
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const hmsRoomStyles = useHMSRoomStyleSheet(
|
|
38
|
+
(theme, typography) => ({
|
|
39
|
+
semiBoldSurfaceHigh: {
|
|
40
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
41
|
+
color: theme.palette.on_surface_high,
|
|
42
|
+
},
|
|
43
|
+
semiBoldSurfaceMedium: {
|
|
44
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
45
|
+
color: theme.palette.on_surface_medium,
|
|
46
|
+
},
|
|
47
|
+
liveIndicatorDot: {
|
|
48
|
+
backgroundColor: theme.palette.alert_error_default,
|
|
49
|
+
},
|
|
50
|
+
notLiveIndicatorDot: {
|
|
51
|
+
backgroundColor: theme.palette.on_surface_low,
|
|
52
|
+
},
|
|
53
|
+
}),
|
|
54
|
+
[]
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
if (!isHLSStreamingOn || !isDVRStream) return null;
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<GestureDetector gesture={Gesture.Tap()}>
|
|
61
|
+
<TouchableOpacity onPress={handleGoLivePress} style={styles.liveButton}>
|
|
62
|
+
<View
|
|
63
|
+
style={[
|
|
64
|
+
styles.liveIndicatorDot,
|
|
65
|
+
isStreamLive
|
|
66
|
+
? hmsRoomStyles.liveIndicatorDot
|
|
67
|
+
: hmsRoomStyles.notLiveIndicatorDot,
|
|
68
|
+
]}
|
|
69
|
+
/>
|
|
70
|
+
<Text
|
|
71
|
+
style={[
|
|
72
|
+
styles.liveText,
|
|
73
|
+
isStreamLive
|
|
74
|
+
? hmsRoomStyles.semiBoldSurfaceHigh
|
|
75
|
+
: hmsRoomStyles.semiBoldSurfaceMedium,
|
|
76
|
+
]}
|
|
77
|
+
>
|
|
78
|
+
{isStreamLive ? 'LIVE' : 'GO LIVE'}
|
|
79
|
+
</Text>
|
|
80
|
+
</TouchableOpacity>
|
|
81
|
+
</GestureDetector>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const HLSGoLiveControl = React.memo(_HLSGoLiveControl);
|
|
86
|
+
|
|
87
|
+
const styles = StyleSheet.create({
|
|
88
|
+
liveButton: {
|
|
89
|
+
padding: 4,
|
|
90
|
+
alignItems: 'center',
|
|
91
|
+
flexDirection: 'row',
|
|
92
|
+
},
|
|
93
|
+
liveIndicatorDot: {
|
|
94
|
+
width: 8,
|
|
95
|
+
height: 8,
|
|
96
|
+
borderRadius: 4,
|
|
97
|
+
marginRight: 8,
|
|
98
|
+
},
|
|
99
|
+
liveText: {
|
|
100
|
+
fontSize: 16,
|
|
101
|
+
lineHeight: 24,
|
|
102
|
+
letterSpacing: 0.5,
|
|
103
|
+
},
|
|
104
|
+
});
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { HMSHLSPlaylistType } from '@100mslive/react-native-hms';
|
|
2
|
+
import type { HMSHLSPlayer } from '@100mslive/react-native-hms';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
5
|
+
import { useSelector } from 'react-redux';
|
|
6
|
+
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
|
|
7
|
+
|
|
8
|
+
import { useIsHLSStreamingOn } from '../hooks-sdk';
|
|
9
|
+
import type { RootState } from '../redux';
|
|
10
|
+
import { PauseIcon, PlayIcon } from '../Icons';
|
|
11
|
+
import { useHLSStreamResumePause } from '../hooks-util';
|
|
12
|
+
|
|
13
|
+
export interface HLSPlayPauseControlProps {
|
|
14
|
+
playerRef: React.RefObject<React.ElementRef<typeof HMSHLSPlayer>>;
|
|
15
|
+
onPress?: () => void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const _HLSPlayPauseControl: React.FC<HLSPlayPauseControlProps> = ({
|
|
19
|
+
playerRef,
|
|
20
|
+
onPress,
|
|
21
|
+
}) => {
|
|
22
|
+
const isHLSStreamingOn = useIsHLSStreamingOn();
|
|
23
|
+
const isDVRStream = useSelector((state: RootState) => {
|
|
24
|
+
return (
|
|
25
|
+
state.hmsStates.room?.hlsStreamingState.variants?.[0]?.playlistType ===
|
|
26
|
+
HMSHLSPlaylistType.DVR
|
|
27
|
+
);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const { isPaused, pauseStream, resumeStream } =
|
|
31
|
+
useHLSStreamResumePause(playerRef);
|
|
32
|
+
|
|
33
|
+
const togglePlayPause = () => {
|
|
34
|
+
onPress?.();
|
|
35
|
+
if (isPaused) {
|
|
36
|
+
resumeStream();
|
|
37
|
+
} else {
|
|
38
|
+
pauseStream();
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
if (!isHLSStreamingOn || !isDVRStream) return null;
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<GestureDetector gesture={Gesture.Tap()}>
|
|
46
|
+
<TouchableOpacity
|
|
47
|
+
onPress={togglePlayPause}
|
|
48
|
+
style={{ alignSelf: 'center' }}
|
|
49
|
+
>
|
|
50
|
+
<View style={styles.container}>
|
|
51
|
+
{isPaused ? <PlayIcon /> : <PauseIcon />}
|
|
52
|
+
</View>
|
|
53
|
+
</TouchableOpacity>
|
|
54
|
+
</GestureDetector>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const HLSPlayPauseControl = React.memo(_HLSPlayPauseControl);
|
|
59
|
+
|
|
60
|
+
const styles = StyleSheet.create({
|
|
61
|
+
container: {
|
|
62
|
+
width: 64,
|
|
63
|
+
height: 64,
|
|
64
|
+
borderRadius: 32,
|
|
65
|
+
alignItems: 'center',
|
|
66
|
+
justifyContent: 'center',
|
|
67
|
+
backgroundColor: 'rgba(0, 0, 0, 0.6)',
|
|
68
|
+
},
|
|
69
|
+
});
|