@100mslive/react-native-room-kit 1.1.5 → 1.1.6
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/index.js +11 -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 +55 -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/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/HLSFooter.js +1 -1
- package/lib/commonjs/components/HLSFooter.js.map +1 -1
- 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/{HLSView.js → HLSPlayer.js} +34 -37
- package/lib/commonjs/components/HLSPlayer.js.map +1 -0
- package/lib/commonjs/components/HLSPlayerContainer.js +64 -0
- package/lib/commonjs/components/HLSPlayerContainer.js.map +1 -0
- package/lib/commonjs/components/HLSPlayerControls.js +87 -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/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/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/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/PressableIcon.js +1 -2
- package/lib/commonjs/components/PressableIcon.js.map +1 -1
- package/lib/commonjs/hooks-util.js +128 -5
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +4 -0
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +17 -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/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/index.js +1 -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 +46 -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/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/HLSFooter.js +2 -2
- package/lib/module/components/HLSFooter.js.map +1 -1
- 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/{HLSView.js → HLSPlayer.js} +35 -38
- package/lib/module/components/HLSPlayer.js.map +1 -0
- package/lib/module/components/HLSPlayerContainer.js +56 -0
- package/lib/module/components/HLSPlayerContainer.js.map +1 -0
- package/lib/module/components/HLSPlayerControls.js +81 -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/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/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/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/PressableIcon.js +1 -2
- package/lib/module/components/PressableIcon.js.map +1 -1
- package/lib/module/hooks-util.js +125 -5
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +4 -0
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +12 -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/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/index.d.ts +1 -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/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/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/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/HLSPlayer.d.ts +4 -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 +4 -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/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/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/Meeting.d.ts.map +1 -1
- package/lib/typescript/components/MeetingScreenContent.d.ts.map +1 -1
- package/lib/typescript/components/PressableIcon.d.ts.map +1 -1
- package/lib/typescript/hooks-util.d.ts +20 -1
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +2 -0
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +12 -0
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +2 -0
- 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/index.d.ts +2 -0
- 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/index.ts +1 -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 +62 -0
- package/src/components/HLSChatView.tsx +55 -0
- package/src/components/HLSDescriptionPane.tsx +168 -0
- package/src/components/HLSDescriptionPaneHeader.tsx +78 -0
- package/src/components/HLSFooter.tsx +2 -2
- package/src/components/HLSHandRaiseButton.tsx +41 -0
- package/src/components/HLSManageChatTextInput.tsx +98 -0
- package/src/components/HLSNotifications.tsx +33 -0
- package/src/components/{HLSView.tsx → HLSPlayer.tsx} +80 -77
- package/src/components/HLSPlayerContainer.tsx +67 -0
- package/src/components/HLSPlayerControls.tsx +101 -0
- package/src/components/HLSRecordingStatusText.tsx +50 -0
- package/src/components/HLSRoomOptionsButton.tsx +19 -0
- package/src/components/HLSStreamStartedTime.tsx +79 -0
- package/src/components/HLSViewerScreenContent.tsx +96 -0
- 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/Meeting.tsx +9 -1
- package/src/components/MeetingScreenContent.tsx +3 -7
- package/src/components/OverlayedViews.tsx +2 -2
- package/src/components/PressableIcon.tsx +1 -3
- package/src/hooks-util.ts +185 -6
- package/src/redux/actionTypes.ts +6 -0
- package/src/redux/actions/index.ts +10 -0
- package/src/redux/reducers/appState.ts +16 -0
- package/lib/commonjs/components/HLSView.js.map +0 -1
- package/lib/module/components/HLSView.js.map +0 -1
- package/lib/typescript/components/HLSView.d.ts +0 -4
- package/lib/typescript/components/HLSView.d.ts.map +0 -1
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
3
|
+
import { Linking, ScrollView, StyleSheet, Text, View } from 'react-native';
|
|
4
|
+
import { runOnJS, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
useHLSViewsConstraints,
|
|
8
|
+
useHMSConferencingScreenConfig,
|
|
9
|
+
useHMSRoomStyleSheet,
|
|
10
|
+
} from '../hooks-util';
|
|
11
|
+
import { HLSChatHeaderView } from './HLSChatHeaderView';
|
|
12
|
+
import {
|
|
13
|
+
HLSDescriptionPaneHeader,
|
|
14
|
+
HLSDescriptionPaneHeaderHeight,
|
|
15
|
+
} from './HLSDescriptionPaneHeader';
|
|
16
|
+
import { HLSAnimatedDescriptionPane } from './HLSAnimatedDescriptionPane';
|
|
17
|
+
import { setHlsDescriptionPaneVisible } from '../redux/actions';
|
|
18
|
+
import type { RootState } from '../redux';
|
|
19
|
+
|
|
20
|
+
interface HLSDescriptionPaneProps {}
|
|
21
|
+
|
|
22
|
+
export const HLSDescriptionPane: React.FC<HLSDescriptionPaneProps> = () => {
|
|
23
|
+
const dispatch = useDispatch();
|
|
24
|
+
const paneVisible = useSelector(
|
|
25
|
+
(state: RootState) => state.app.hlsDescriptionPaneVisible
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
29
|
+
wrapper: {
|
|
30
|
+
backgroundColor: theme.palette.surface_dim,
|
|
31
|
+
},
|
|
32
|
+
regularSurfaceMedium: {
|
|
33
|
+
fontFamily: `${typography.font_family}-Regular`,
|
|
34
|
+
color: theme.palette.on_surface_medium,
|
|
35
|
+
},
|
|
36
|
+
link: {
|
|
37
|
+
color: theme.palette.primary_bright,
|
|
38
|
+
},
|
|
39
|
+
}));
|
|
40
|
+
|
|
41
|
+
const { descriptionPaneConstraints } = useHLSViewsConstraints();
|
|
42
|
+
|
|
43
|
+
const descriptionPaneContentHeight =
|
|
44
|
+
descriptionPaneConstraints.height - HLSDescriptionPaneHeaderHeight;
|
|
45
|
+
|
|
46
|
+
const desPaneTranslationValue = useSharedValue(0);
|
|
47
|
+
|
|
48
|
+
const _closeDescriptionPane = () => {
|
|
49
|
+
dispatch(setHlsDescriptionPaneVisible(false));
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const hideDescriptionPane = () => {
|
|
53
|
+
if (paneVisible) {
|
|
54
|
+
desPaneTranslationValue.value = withTiming(0, { duration: 280 }, () => {
|
|
55
|
+
runOnJS(_closeDescriptionPane)();
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
React.useEffect(() => {
|
|
61
|
+
if (!paneVisible) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
desPaneTranslationValue.value = withTiming(1, { duration: 280 });
|
|
65
|
+
return () => {
|
|
66
|
+
cancelAnimationFrame(desPaneTranslationValue.value);
|
|
67
|
+
};
|
|
68
|
+
}, [paneVisible]);
|
|
69
|
+
|
|
70
|
+
const description = useHMSConferencingScreenConfig((confScreenConfig) => {
|
|
71
|
+
return confScreenConfig?.elements?.header?.description;
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const handleLinkPress = async (url: string) => {
|
|
75
|
+
const canOpen = await Linking.canOpenURL(url);
|
|
76
|
+
if (canOpen) {
|
|
77
|
+
Linking.openURL(url);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
if (!paneVisible) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// TODO: for links to work, add query in manifest.xml
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<View
|
|
89
|
+
style={{
|
|
90
|
+
position: 'absolute',
|
|
91
|
+
bottom: 0,
|
|
92
|
+
width: descriptionPaneConstraints.width,
|
|
93
|
+
height: descriptionPaneConstraints.height,
|
|
94
|
+
zIndex: 10,
|
|
95
|
+
}}
|
|
96
|
+
>
|
|
97
|
+
<HLSDescriptionPaneHeader
|
|
98
|
+
close={hideDescriptionPane}
|
|
99
|
+
animatedValue={desPaneTranslationValue}
|
|
100
|
+
/>
|
|
101
|
+
|
|
102
|
+
<View style={{ flex: 1, overflow: 'hidden' }}>
|
|
103
|
+
<HLSAnimatedDescriptionPane
|
|
104
|
+
height={descriptionPaneContentHeight}
|
|
105
|
+
sharedValue={desPaneTranslationValue}
|
|
106
|
+
>
|
|
107
|
+
<ScrollView
|
|
108
|
+
style={hmsRoomStyles.wrapper}
|
|
109
|
+
contentContainerStyle={{ paddingBottom: 40 }}
|
|
110
|
+
>
|
|
111
|
+
<HLSChatHeaderView expanded={true} />
|
|
112
|
+
|
|
113
|
+
{description ? (
|
|
114
|
+
<Text
|
|
115
|
+
style={[styles.description, hmsRoomStyles.regularSurfaceMedium]}
|
|
116
|
+
>
|
|
117
|
+
{splitLinksAndContent(description, {
|
|
118
|
+
pressHandler: handleLinkPress,
|
|
119
|
+
style: hmsRoomStyles.link,
|
|
120
|
+
})}
|
|
121
|
+
</Text>
|
|
122
|
+
) : null}
|
|
123
|
+
</ScrollView>
|
|
124
|
+
</HLSAnimatedDescriptionPane>
|
|
125
|
+
</View>
|
|
126
|
+
</View>
|
|
127
|
+
);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const styles = StyleSheet.create({
|
|
131
|
+
description: {
|
|
132
|
+
fontSize: 14,
|
|
133
|
+
lineHeight: 20,
|
|
134
|
+
marginHorizontal: 16,
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
function splitLinksAndContent(
|
|
139
|
+
text: string,
|
|
140
|
+
{ pressHandler, style }: any
|
|
141
|
+
): string | (string | React.ReactElement)[] {
|
|
142
|
+
// Regular expression to find links in a string
|
|
143
|
+
const pattern = /http[s]?:\/\/\S+/g;
|
|
144
|
+
|
|
145
|
+
// Find all links in the text
|
|
146
|
+
const links = text.match(pattern) || [];
|
|
147
|
+
|
|
148
|
+
if (links.length <= 0) {
|
|
149
|
+
return text;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Split the text into an array of links and content
|
|
153
|
+
const parts = text.replace(pattern, '^<link>^').split('^');
|
|
154
|
+
|
|
155
|
+
return parts.map((p, i) => {
|
|
156
|
+
if (p !== '<link>') {
|
|
157
|
+
return p;
|
|
158
|
+
}
|
|
159
|
+
const link = links.pop();
|
|
160
|
+
return link ? (
|
|
161
|
+
<Text key={link + i} onPress={() => pressHandler(link)} style={style}>
|
|
162
|
+
{link}
|
|
163
|
+
</Text>
|
|
164
|
+
) : (
|
|
165
|
+
p
|
|
166
|
+
);
|
|
167
|
+
});
|
|
168
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { useHMSRoomStyleSheet } from '../hooks-util';
|
|
5
|
+
import { ChevronIcon } from '../Icons';
|
|
6
|
+
import Animated, {
|
|
7
|
+
useAnimatedStyle,
|
|
8
|
+
type SharedValue,
|
|
9
|
+
interpolate,
|
|
10
|
+
} from 'react-native-reanimated';
|
|
11
|
+
|
|
12
|
+
export interface HLSDescriptionPaneHeaderProps {
|
|
13
|
+
close(): void;
|
|
14
|
+
animatedValue: SharedValue<number>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const HLSDescriptionPaneHeaderHeight = 16 * 2 + 24; // vertical padding + content height
|
|
18
|
+
|
|
19
|
+
export const HLSDescriptionPaneHeader: React.FC<
|
|
20
|
+
HLSDescriptionPaneHeaderProps
|
|
21
|
+
> = ({ close, animatedValue }) => {
|
|
22
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
23
|
+
container: {
|
|
24
|
+
backgroundColor: theme.palette.surface_dim,
|
|
25
|
+
borderBottomColor: theme.palette.border_bright,
|
|
26
|
+
},
|
|
27
|
+
semiBoldSurfaceHigh: {
|
|
28
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
29
|
+
color: theme.palette.on_surface_high,
|
|
30
|
+
},
|
|
31
|
+
}));
|
|
32
|
+
|
|
33
|
+
const animatedChevronStyles = useAnimatedStyle(
|
|
34
|
+
() => ({
|
|
35
|
+
transform: [
|
|
36
|
+
{
|
|
37
|
+
rotateZ: `${interpolate(animatedValue.value, [0, 1], [0, -180])}deg`,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
}),
|
|
41
|
+
[]
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
const closeHlsDescriptionPane = () => {
|
|
45
|
+
close();
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<View style={[styles.container, hmsRoomStyles.container]}>
|
|
50
|
+
<Text style={[styles.title, hmsRoomStyles.semiBoldSurfaceHigh]}>
|
|
51
|
+
About Session
|
|
52
|
+
</Text>
|
|
53
|
+
|
|
54
|
+
<TouchableOpacity
|
|
55
|
+
hitSlop={{ bottom: 12, left: 12, top: 12, right: 12 }}
|
|
56
|
+
onPress={closeHlsDescriptionPane}
|
|
57
|
+
>
|
|
58
|
+
<Animated.View style={animatedChevronStyles}>
|
|
59
|
+
<ChevronIcon direction="down" />
|
|
60
|
+
</Animated.View>
|
|
61
|
+
</TouchableOpacity>
|
|
62
|
+
</View>
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const styles = StyleSheet.create({
|
|
67
|
+
container: {
|
|
68
|
+
padding: 16,
|
|
69
|
+
flexDirection: 'row',
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
justifyContent: 'space-between',
|
|
72
|
+
borderBottomWidth: 1,
|
|
73
|
+
},
|
|
74
|
+
title: {
|
|
75
|
+
fontSize: 16,
|
|
76
|
+
lineHeight: 24,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
@@ -4,7 +4,7 @@ import type { SharedValue } from 'react-native-reanimated';
|
|
|
4
4
|
|
|
5
5
|
import { Footer } from './Footer';
|
|
6
6
|
import { AnimatedHLSFooter } from './AnimatedHLSFooter';
|
|
7
|
-
import {
|
|
7
|
+
import { HMSOverlayChatView } from './HMSOverlayChatView';
|
|
8
8
|
import { useShowChatAndParticipants } from '../hooks-util';
|
|
9
9
|
import { HMSNotifications } from './HMSNotifications';
|
|
10
10
|
|
|
@@ -17,7 +17,7 @@ export const HLSFooter: React.FC<HLSFooterProps> = ({ offset }) => {
|
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
19
|
<AnimatedHLSFooter offset={offset} style={styles.animatedContainer}>
|
|
20
|
-
{overlayChatVisible ? <
|
|
20
|
+
{overlayChatVisible ? <HMSOverlayChatView offset={offset} /> : null}
|
|
21
21
|
|
|
22
22
|
<HMSNotifications />
|
|
23
23
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
useHMSConferencingScreenConfig,
|
|
6
|
+
useHMSLayoutConfig,
|
|
7
|
+
} from '../hooks-util';
|
|
8
|
+
import { HMSManageRaiseHand } from './HMSManageRaiseHand';
|
|
9
|
+
import {
|
|
10
|
+
useCanPublishAudio,
|
|
11
|
+
useCanPublishScreen,
|
|
12
|
+
useCanPublishVideo,
|
|
13
|
+
} from '../hooks-sdk';
|
|
14
|
+
|
|
15
|
+
export const HLSHandRaiseButton = () => {
|
|
16
|
+
const canPublishAudio = useCanPublishAudio();
|
|
17
|
+
const canPublishVideo = useCanPublishVideo();
|
|
18
|
+
const canPublishScreen = useCanPublishScreen();
|
|
19
|
+
|
|
20
|
+
const canRaiseHand = useHMSConferencingScreenConfig(
|
|
21
|
+
(confScreenConfig) => !!confScreenConfig?.elements?.hand_raise
|
|
22
|
+
);
|
|
23
|
+
const isOnStage = useHMSLayoutConfig((layoutConfig) => {
|
|
24
|
+
return !!layoutConfig?.screens?.conferencing?.default?.elements
|
|
25
|
+
?.on_stage_exp;
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const isViewer = !(canPublishAudio || canPublishVideo || canPublishScreen);
|
|
29
|
+
|
|
30
|
+
const canShowHandRaiseInFooter = canRaiseHand && !isOnStage && isViewer;
|
|
31
|
+
|
|
32
|
+
if (!canShowHandRaiseInFooter) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<View style={{ marginLeft: 12 }}>
|
|
38
|
+
<HMSManageRaiseHand />
|
|
39
|
+
</View>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
4
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
useHLSViewsConstraints,
|
|
8
|
+
useHMSChatState,
|
|
9
|
+
useHMSRoomStyleSheet,
|
|
10
|
+
useIsAllowedToSendMessage,
|
|
11
|
+
useIsLocalPeerBlockedFromChat,
|
|
12
|
+
} from '../hooks-util';
|
|
13
|
+
import { ChatPaused } from './Chat/ChatPaused';
|
|
14
|
+
import { PeerBlockedFromChat } from './Chat/PeerBlockedFromChat';
|
|
15
|
+
import { ChatFilterBottomSheetOpener } from './Chat/ChatFilterBottomSheetOpener';
|
|
16
|
+
import { HMSSendMessageInput } from './HMSSendMessageInput';
|
|
17
|
+
import type { RootState } from '../redux';
|
|
18
|
+
import { ChatFilterBottomSheet } from './Chat/ChatFilterBottomSheet';
|
|
19
|
+
import { HMSKeyboardAvoidingView } from './HMSKeyboardAvoidingView';
|
|
20
|
+
|
|
21
|
+
export const HLSManageChatTextInput = () => {
|
|
22
|
+
const { chatState } = useHMSChatState();
|
|
23
|
+
const isAllowedToSendMessage = useIsAllowedToSendMessage();
|
|
24
|
+
const isChatRecipientSelected = useSelector(
|
|
25
|
+
(state: RootState) => state.chatWindow.sendTo !== null
|
|
26
|
+
);
|
|
27
|
+
const isLocalPeerBlockedFromChat = useIsLocalPeerBlockedFromChat();
|
|
28
|
+
|
|
29
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme) => ({
|
|
30
|
+
input: {
|
|
31
|
+
backgroundColor: theme.palette.surface_default,
|
|
32
|
+
borderColor: theme.palette.surface_default,
|
|
33
|
+
},
|
|
34
|
+
}));
|
|
35
|
+
|
|
36
|
+
const { chatWrapperConstraints } = useHLSViewsConstraints();
|
|
37
|
+
const { bottom: bottomInset } = useSafeAreaInsets();
|
|
38
|
+
|
|
39
|
+
const keyboardAvoidingStyles = React.useMemo(
|
|
40
|
+
() => ({
|
|
41
|
+
active: { width: chatWrapperConstraints.width - 32 },
|
|
42
|
+
inactive: { width: '100%' },
|
|
43
|
+
}),
|
|
44
|
+
[chatWrapperConstraints]
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
if (isLocalPeerBlockedFromChat) {
|
|
48
|
+
return <PeerBlockedFromChat style={styles.shrink} />;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (chatState.enabled) {
|
|
52
|
+
return (
|
|
53
|
+
<>
|
|
54
|
+
{/* INFO: Chat action button UI might be broken,
|
|
55
|
+
but hls-viewer might not have permission to take action */}
|
|
56
|
+
<View style={styles.grow}>
|
|
57
|
+
<ChatFilterBottomSheetOpener useFilterModal={true} />
|
|
58
|
+
|
|
59
|
+
{isAllowedToSendMessage && isChatRecipientSelected ? (
|
|
60
|
+
<HMSKeyboardAvoidingView
|
|
61
|
+
bottomOffset={bottomInset}
|
|
62
|
+
styleWhenActive={keyboardAvoidingStyles.active}
|
|
63
|
+
styleWhenInactive={keyboardAvoidingStyles.inactive}
|
|
64
|
+
>
|
|
65
|
+
<HMSSendMessageInput
|
|
66
|
+
containerStyle={[styles.input, hmsRoomStyles.input]}
|
|
67
|
+
/>
|
|
68
|
+
</HMSKeyboardAvoidingView>
|
|
69
|
+
) : null}
|
|
70
|
+
</View>
|
|
71
|
+
|
|
72
|
+
<ChatFilterBottomSheet />
|
|
73
|
+
</>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (isAllowedToSendMessage) {
|
|
78
|
+
return <ChatPaused style={styles.shrink} />;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return <View style={styles.grow} />;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const styles = StyleSheet.create({
|
|
85
|
+
input: {
|
|
86
|
+
flex: 0,
|
|
87
|
+
height: 40,
|
|
88
|
+
marginHorizontal: 0,
|
|
89
|
+
marginTop: 0,
|
|
90
|
+
marginBottom: 0,
|
|
91
|
+
},
|
|
92
|
+
shrink: {
|
|
93
|
+
flexShrink: 1,
|
|
94
|
+
},
|
|
95
|
+
grow: {
|
|
96
|
+
flexGrow: 1,
|
|
97
|
+
},
|
|
98
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
+
|
|
5
|
+
import { HMSNotifications } from './HMSNotifications';
|
|
6
|
+
|
|
7
|
+
const _HLSNotifications = () => {
|
|
8
|
+
const { bottom: bottomInset } = useSafeAreaInsets();
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<View
|
|
12
|
+
style={[
|
|
13
|
+
styles.container,
|
|
14
|
+
{
|
|
15
|
+
bottom: bottomInset + 90,
|
|
16
|
+
},
|
|
17
|
+
]}
|
|
18
|
+
>
|
|
19
|
+
<HMSNotifications />
|
|
20
|
+
</View>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const HLSNotifications = React.memo(_HLSNotifications);
|
|
25
|
+
|
|
26
|
+
const styles = StyleSheet.create({
|
|
27
|
+
container: {
|
|
28
|
+
position: 'absolute',
|
|
29
|
+
width: '100%',
|
|
30
|
+
bottom: 0,
|
|
31
|
+
zIndex: 1,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
@@ -6,13 +6,12 @@ import {
|
|
|
6
6
|
Text,
|
|
7
7
|
StyleSheet,
|
|
8
8
|
Platform,
|
|
9
|
-
|
|
9
|
+
ActivityIndicator,
|
|
10
10
|
} from 'react-native';
|
|
11
11
|
import {
|
|
12
12
|
HMSHLSPlayer,
|
|
13
13
|
HMSHLSPlayerPlaybackState,
|
|
14
14
|
useHMSHLSPlayerPlaybackState,
|
|
15
|
-
useHMSHLSPlayerResolution,
|
|
16
15
|
} from '@100mslive/react-native-hms';
|
|
17
16
|
|
|
18
17
|
import type { RootState } from '../redux';
|
|
@@ -23,18 +22,20 @@ import { CustomControls } from './CustomHLSPlayerControls';
|
|
|
23
22
|
import { COLORS, hexToRgbA } from '../utils/theme';
|
|
24
23
|
import { HMSHLSNotStarted } from './HMSHLSNotStarted';
|
|
25
24
|
import { CrossCircleIcon } from '../Icons';
|
|
26
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
useHLSPlayerConstraints,
|
|
27
|
+
useHMSRoomColorPalette,
|
|
28
|
+
useHMSRoomStyleSheet,
|
|
29
|
+
} from '../hooks-util';
|
|
27
30
|
import { useIsHLSStreamingOn } from '../hooks-sdk';
|
|
28
|
-
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
29
31
|
|
|
30
|
-
export const
|
|
32
|
+
export const _HLSPlayer: React.FC = () => {
|
|
31
33
|
const dispatch = useDispatch();
|
|
32
34
|
const isHLSStreaming = useIsHLSStreamingOn();
|
|
33
35
|
const isStreamUrlPresent = useSelector(
|
|
34
36
|
(state: RootState) =>
|
|
35
37
|
!!state.hmsStates.room?.hlsStreamingState.variants?.[0]?.hlsStreamUrl
|
|
36
38
|
);
|
|
37
|
-
const { width, height } = useWindowDimensions();
|
|
38
39
|
const hmsHlsPlayerRef = useRef<ComponentRef<typeof HMSHLSPlayer>>(null);
|
|
39
40
|
const showHLSStats = useSelector(
|
|
40
41
|
(state: RootState) => state.app.joinConfig.showHLSStats
|
|
@@ -100,6 +101,7 @@ export const _HLSView: React.FC = () => {
|
|
|
100
101
|
}
|
|
101
102
|
};
|
|
102
103
|
|
|
104
|
+
const hlsPlayerConstraints = useHLSPlayerConstraints();
|
|
103
105
|
const [playerKey, setPlayerKey] = React.useState(1);
|
|
104
106
|
|
|
105
107
|
const prevReconnectingRef = React.useRef<null | boolean>(null);
|
|
@@ -108,12 +110,13 @@ export const _HLSView: React.FC = () => {
|
|
|
108
110
|
);
|
|
109
111
|
|
|
110
112
|
const hlsPlayerPlaybackState = useHMSHLSPlayerPlaybackState();
|
|
111
|
-
const resolution = useHMSHLSPlayerResolution();
|
|
112
|
-
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
113
113
|
|
|
114
114
|
const isPlaybackFailed =
|
|
115
115
|
hlsPlayerPlaybackState === HMSHLSPlayerPlaybackState.FAILED;
|
|
116
116
|
|
|
117
|
+
const isPlayerBuffering =
|
|
118
|
+
hlsPlayerPlaybackState === HMSHLSPlayerPlaybackState.BUFFERING;
|
|
119
|
+
|
|
117
120
|
React.useEffect(() => {
|
|
118
121
|
const prevReconnecting = prevReconnectingRef.current;
|
|
119
122
|
|
|
@@ -140,80 +143,85 @@ export const _HLSView: React.FC = () => {
|
|
|
140
143
|
color: theme.palette.on_surface_high,
|
|
141
144
|
fontFamily: `${typography.font_family}-Regular`,
|
|
142
145
|
},
|
|
146
|
+
warningText: {
|
|
147
|
+
color: theme.palette.alert_warning,
|
|
148
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
149
|
+
},
|
|
143
150
|
}));
|
|
144
151
|
|
|
152
|
+
const { primary_bright: PrimaryBrightColor } = useHMSRoomColorPalette();
|
|
153
|
+
|
|
154
|
+
if (!isHLSStreaming) return <HMSHLSNotStarted />;
|
|
155
|
+
|
|
156
|
+
if (!isStreamUrlPresent)
|
|
157
|
+
return (
|
|
158
|
+
<View style={styles.textContainer}>
|
|
159
|
+
<Text style={[styles.warningSubtitle, hmsRoomStyles.warningText]}>
|
|
160
|
+
Stream URL not found!
|
|
161
|
+
</Text>
|
|
162
|
+
</View>
|
|
163
|
+
);
|
|
164
|
+
|
|
145
165
|
return (
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
</View>
|
|
195
|
-
) : null}
|
|
196
|
-
</View>
|
|
197
|
-
) : (
|
|
198
|
-
<View style={styles.textContainer}>
|
|
199
|
-
<Text style={styles.warningSubtitle}>Stream URL not found!</Text>
|
|
200
|
-
</View>
|
|
201
|
-
)
|
|
202
|
-
) : (
|
|
203
|
-
<HMSHLSNotStarted />
|
|
204
|
-
)}
|
|
205
|
-
</View>
|
|
166
|
+
<>
|
|
167
|
+
<HMSHLSPlayer
|
|
168
|
+
key={playerKey}
|
|
169
|
+
ref={hmsHlsPlayerRef}
|
|
170
|
+
enableStats={showHLSStats}
|
|
171
|
+
enableControls={enableHLSPlayerControls}
|
|
172
|
+
style={{
|
|
173
|
+
width: hlsPlayerConstraints.width,
|
|
174
|
+
height: hlsPlayerConstraints.height,
|
|
175
|
+
}}
|
|
176
|
+
/>
|
|
177
|
+
|
|
178
|
+
<HLSPlayerEmoticons />
|
|
179
|
+
|
|
180
|
+
{showHLSStats ? (
|
|
181
|
+
<HLSPlayerStatsView onClosePress={handleClosePress} />
|
|
182
|
+
) : null}
|
|
183
|
+
|
|
184
|
+
{showCustomHLSPlayerControls ? (
|
|
185
|
+
<CustomControls handleControlPress={hlsPlayerActions} />
|
|
186
|
+
) : null}
|
|
187
|
+
|
|
188
|
+
{isPlayerBuffering ? (
|
|
189
|
+
<View
|
|
190
|
+
style={[
|
|
191
|
+
styles.playbackFailedContainer,
|
|
192
|
+
hmsRoomStyles.failedContainer,
|
|
193
|
+
]}
|
|
194
|
+
>
|
|
195
|
+
<ActivityIndicator size={'large'} color={PrimaryBrightColor} />
|
|
196
|
+
</View>
|
|
197
|
+
) : null}
|
|
198
|
+
|
|
199
|
+
{isPlaybackFailed ? (
|
|
200
|
+
<View
|
|
201
|
+
style={[
|
|
202
|
+
styles.playbackFailedContainer,
|
|
203
|
+
hmsRoomStyles.failedContainer,
|
|
204
|
+
]}
|
|
205
|
+
>
|
|
206
|
+
<CrossCircleIcon />
|
|
207
|
+
|
|
208
|
+
<Text style={[styles.playbackFailed, hmsRoomStyles.failedText]}>
|
|
209
|
+
Playback Failed
|
|
210
|
+
</Text>
|
|
211
|
+
</View>
|
|
212
|
+
) : null}
|
|
213
|
+
</>
|
|
206
214
|
);
|
|
207
215
|
};
|
|
208
216
|
|
|
209
|
-
export const
|
|
217
|
+
export const HLSPlayer = React.memo(_HLSPlayer);
|
|
210
218
|
|
|
211
219
|
const styles = StyleSheet.create({
|
|
212
220
|
hlsView: {
|
|
213
221
|
flex: 1,
|
|
214
222
|
},
|
|
215
223
|
hlsPlayerContainer: {
|
|
216
|
-
flex: 1,
|
|
224
|
+
// flex: 1,
|
|
217
225
|
position: 'relative',
|
|
218
226
|
},
|
|
219
227
|
textContainer: {
|
|
@@ -223,16 +231,11 @@ const styles = StyleSheet.create({
|
|
|
223
231
|
justifyContent: 'center',
|
|
224
232
|
},
|
|
225
233
|
warningSubtitle: {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
fontSize: 20,
|
|
229
|
-
fontWeight: '600',
|
|
234
|
+
fontSize: 16,
|
|
235
|
+
lineHeight: 20,
|
|
230
236
|
letterSpacing: 0.25,
|
|
231
237
|
textAlign: 'center',
|
|
232
238
|
},
|
|
233
|
-
taleLessSpaceAsYouCan: {
|
|
234
|
-
flex: 0,
|
|
235
|
-
},
|
|
236
239
|
playbackFailedContainer: {
|
|
237
240
|
flex: 1,
|
|
238
241
|
width: '100%',
|