@100mslive/react-native-room-kit 1.0.5 → 1.0.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/HMSRoomSetup.js +1 -0
- package/lib/commonjs/HMSRoomSetup.js.map +1 -1
- package/lib/commonjs/Icons/Recording/assets/recording-pause.png +0 -0
- package/lib/commonjs/Icons/Recording/assets/recording-pause@2x.png +0 -0
- package/lib/commonjs/Icons/Recording/assets/recording-pause@3x.png +0 -0
- package/lib/commonjs/Icons/Recording/index.js +1 -1
- package/lib/commonjs/Icons/Recording/index.js.map +1 -1
- package/lib/commonjs/components/AnimatedFooter.js +5 -3
- package/lib/commonjs/components/AnimatedFooter.js.map +1 -1
- package/lib/commonjs/components/AnimatedHLSFooter.js +4 -9
- package/lib/commonjs/components/AnimatedHLSFooter.js.map +1 -1
- package/lib/commonjs/components/AnimatedHeader.js +17 -5
- package/lib/commonjs/components/AnimatedHeader.js.map +1 -1
- package/lib/commonjs/components/AvatarView.js +0 -1
- package/lib/commonjs/components/AvatarView.js.map +1 -1
- package/lib/commonjs/components/BottomSheet.js +23 -7
- package/lib/commonjs/components/BottomSheet.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatBanner.js +10 -3
- package/lib/commonjs/components/Chat/ChatBanner.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js +7 -2
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js +14 -10
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js +5 -3
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
- package/lib/commonjs/components/DefaultModal.js +9 -1
- package/lib/commonjs/components/DefaultModal.js.map +1 -1
- package/lib/commonjs/components/DisplayView.js +4 -11
- package/lib/commonjs/components/DisplayView.js.map +1 -1
- package/lib/commonjs/components/EndRoomModal.js +1 -2
- package/lib/commonjs/components/EndRoomModal.js.map +1 -1
- package/lib/commonjs/components/EndRoomModalContent.js +2 -1
- package/lib/commonjs/components/EndRoomModalContent.js.map +1 -1
- package/lib/commonjs/components/Footer.js +12 -8
- package/lib/commonjs/components/Footer.js.map +1 -1
- package/lib/commonjs/components/GridView.js +53 -9
- package/lib/commonjs/components/GridView.js.map +1 -1
- package/lib/commonjs/components/HLSFooter.js +3 -1
- package/lib/commonjs/components/HLSFooter.js.map +1 -1
- package/lib/commonjs/components/HLSView.js +1 -1
- package/lib/commonjs/components/HLSView.js.map +1 -1
- package/lib/commonjs/components/HMSHLSMessageList.js +5 -2
- package/lib/commonjs/components/HMSHLSMessageList.js.map +1 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.android.js +44 -0
- package/lib/commonjs/components/HMSKeyboardAvoidingView.android.js.map +1 -0
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js +3 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/commonjs/components/HMSLiveIndicator.js +6 -57
- package/lib/commonjs/components/HMSLiveIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSLiveViewerCount.js +78 -0
- package/lib/commonjs/components/HMSLiveViewerCount.js.map +1 -0
- package/lib/commonjs/components/HMSManageAudioOutput.js +0 -1
- package/lib/commonjs/components/HMSManageAudioOutput.js.map +1 -1
- package/lib/commonjs/components/HMSNotifications.js +9 -1
- package/lib/commonjs/components/HMSNotifications.js.map +1 -1
- package/lib/commonjs/components/HMSOverlayChatView.js +11 -2
- package/lib/commonjs/components/HMSOverlayChatView.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewEditName.js +6 -1
- package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js +2 -1
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSRecordingIndicator.js +15 -4
- package/lib/commonjs/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSRoomOptions.js +3 -6
- package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
- package/lib/commonjs/components/HMSTextInput.js +2 -3
- package/lib/commonjs/components/HMSTextInput.js.map +1 -1
- package/lib/commonjs/components/Header.js +11 -3
- package/lib/commonjs/components/Header.js.map +1 -1
- package/lib/commonjs/components/LeaveRoomBottomSheet.js +4 -7
- package/lib/commonjs/components/LeaveRoomBottomSheet.js.map +1 -1
- package/lib/commonjs/components/Meeting.js +2 -13
- package/lib/commonjs/components/Meeting.js.map +1 -1
- package/lib/commonjs/components/MeetingScreenContent.js +45 -45
- package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
- package/lib/commonjs/components/MiniView.js +12 -13
- package/lib/commonjs/components/MiniView.js.map +1 -1
- package/lib/commonjs/components/OverlayedViews.js +6 -2
- package/lib/commonjs/components/OverlayedViews.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsGroupHeader.js +1 -0
- package/lib/commonjs/components/Participants/ParticipantsGroupHeader.js.map +1 -1
- package/lib/commonjs/components/PeerSettingsModalContent.js +2 -1
- package/lib/commonjs/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerNameAndNetwork.js +0 -1
- package/lib/commonjs/components/PeerVideoTile/PeerNameAndNetwork.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js +2 -1
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/VideoView.js +0 -1
- package/lib/commonjs/components/PeerVideoTile/VideoView.js.map +1 -1
- package/lib/commonjs/components/PressableIcon.js +6 -2
- package/lib/commonjs/components/PressableIcon.js.map +1 -1
- package/lib/commonjs/components/Preview.js +2 -1
- package/lib/commonjs/components/Preview.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalContent.js +25 -9
- package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js +1 -1
- package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js.map +1 -1
- package/lib/commonjs/components/TilesContainer.js +3 -3
- package/lib/commonjs/components/TilesContainer.js.map +1 -1
- package/lib/commonjs/components/WebrtcView.js +37 -2
- package/lib/commonjs/components/WebrtcView.js.map +1 -1
- package/lib/commonjs/hooks-util-selectors.js +2 -1
- package/lib/commonjs/hooks-util-selectors.js.map +1 -1
- package/lib/commonjs/hooks-util.js +78 -31
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +3 -1
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +8 -1
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/appState.js +9 -1
- package/lib/commonjs/redux/reducers/appState.js.map +1 -1
- package/lib/commonjs/utils/theme.js +0 -1
- package/lib/commonjs/utils/theme.js.map +1 -1
- package/lib/commonjs/utils/types.js +3 -3
- package/lib/commonjs/utils/types.js.map +1 -1
- package/lib/commonjs/utils.js +0 -1
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +2 -1
- package/lib/module/HMSRoomSetup.js.map +1 -1
- package/lib/module/Icons/Recording/assets/recording-pause.png +0 -0
- package/lib/module/Icons/Recording/assets/recording-pause@2x.png +0 -0
- package/lib/module/Icons/Recording/assets/recording-pause@3x.png +0 -0
- package/lib/module/Icons/Recording/index.js +1 -1
- package/lib/module/Icons/Recording/index.js.map +1 -1
- package/lib/module/components/AnimatedFooter.js +5 -3
- package/lib/module/components/AnimatedFooter.js.map +1 -1
- package/lib/module/components/AnimatedHLSFooter.js +5 -10
- package/lib/module/components/AnimatedHLSFooter.js.map +1 -1
- package/lib/module/components/AnimatedHeader.js +18 -6
- package/lib/module/components/AnimatedHeader.js.map +1 -1
- package/lib/module/components/AvatarView.js +0 -1
- package/lib/module/components/AvatarView.js.map +1 -1
- package/lib/module/components/BottomSheet.js +24 -8
- package/lib/module/components/BottomSheet.js.map +1 -1
- package/lib/module/components/Chat/ChatBanner.js +10 -3
- package/lib/module/components/Chat/ChatBanner.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterBottomSheetView.js +7 -2
- package/lib/module/components/Chat/ChatFilterBottomSheetView.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js +16 -12
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js +6 -4
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
- package/lib/module/components/DefaultModal.js +9 -1
- package/lib/module/components/DefaultModal.js.map +1 -1
- package/lib/module/components/DisplayView.js +5 -12
- package/lib/module/components/DisplayView.js.map +1 -1
- package/lib/module/components/EndRoomModal.js +1 -2
- package/lib/module/components/EndRoomModal.js.map +1 -1
- package/lib/module/components/EndRoomModalContent.js +2 -1
- package/lib/module/components/EndRoomModalContent.js.map +1 -1
- package/lib/module/components/Footer.js +12 -9
- package/lib/module/components/Footer.js.map +1 -1
- package/lib/module/components/GridView.js +54 -10
- package/lib/module/components/GridView.js.map +1 -1
- package/lib/module/components/HLSFooter.js +3 -1
- package/lib/module/components/HLSFooter.js.map +1 -1
- package/lib/module/components/HLSView.js +2 -2
- package/lib/module/components/HLSView.js.map +1 -1
- package/lib/module/components/HMSHLSMessageList.js +5 -2
- package/lib/module/components/HMSHLSMessageList.js.map +1 -1
- package/lib/module/components/HMSKeyboardAvoidingView.android.js +33 -0
- package/lib/module/components/HMSKeyboardAvoidingView.android.js.map +1 -0
- package/lib/module/components/HMSKeyboardAvoidingView.js +3 -1
- package/lib/module/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/module/components/HMSLiveIndicator.js +9 -60
- package/lib/module/components/HMSLiveIndicator.js.map +1 -1
- package/lib/module/components/HMSLiveViewerCount.js +70 -0
- package/lib/module/components/HMSLiveViewerCount.js.map +1 -0
- package/lib/module/components/HMSManageAudioOutput.js +0 -1
- package/lib/module/components/HMSManageAudioOutput.js.map +1 -1
- package/lib/module/components/HMSNotifications.js +9 -2
- package/lib/module/components/HMSNotifications.js.map +1 -1
- package/lib/module/components/HMSOverlayChatView.js +11 -2
- package/lib/module/components/HMSOverlayChatView.js.map +1 -1
- package/lib/module/components/HMSPreviewEditName.js +6 -1
- package/lib/module/components/HMSPreviewEditName.js.map +1 -1
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js +2 -1
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
- package/lib/module/components/HMSRecordingIndicator.js +15 -4
- package/lib/module/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/module/components/HMSRoomOptions.js +3 -6
- package/lib/module/components/HMSRoomOptions.js.map +1 -1
- package/lib/module/components/HMSTextInput.js +2 -3
- package/lib/module/components/HMSTextInput.js.map +1 -1
- package/lib/module/components/Header.js +10 -3
- package/lib/module/components/Header.js.map +1 -1
- package/lib/module/components/LeaveRoomBottomSheet.js +5 -7
- package/lib/module/components/LeaveRoomBottomSheet.js.map +1 -1
- package/lib/module/components/Meeting.js +3 -14
- package/lib/module/components/Meeting.js.map +1 -1
- package/lib/module/components/MeetingScreenContent.js +50 -50
- package/lib/module/components/MeetingScreenContent.js.map +1 -1
- package/lib/module/components/MiniView.js +12 -13
- package/lib/module/components/MiniView.js.map +1 -1
- package/lib/module/components/OverlayedViews.js +6 -2
- package/lib/module/components/OverlayedViews.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsGroupHeader.js +1 -0
- package/lib/module/components/Participants/ParticipantsGroupHeader.js.map +1 -1
- package/lib/module/components/PeerSettingsModalContent.js +2 -1
- package/lib/module/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerNameAndNetwork.js +0 -1
- package/lib/module/components/PeerVideoTile/PeerNameAndNetwork.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js +2 -1
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/module/components/PeerVideoTile/VideoView.js +0 -1
- package/lib/module/components/PeerVideoTile/VideoView.js.map +1 -1
- package/lib/module/components/PressableIcon.js +6 -2
- package/lib/module/components/PressableIcon.js.map +1 -1
- package/lib/module/components/Preview.js +2 -1
- package/lib/module/components/Preview.js.map +1 -1
- package/lib/module/components/RoomSettingsModalContent.js +26 -10
- package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/module/components/RoomSettingsModalDebugModeContent.js +2 -2
- package/lib/module/components/RoomSettingsModalDebugModeContent.js.map +1 -1
- package/lib/module/components/TilesContainer.js +3 -3
- package/lib/module/components/TilesContainer.js.map +1 -1
- package/lib/module/components/WebrtcView.js +37 -2
- package/lib/module/components/WebrtcView.js.map +1 -1
- package/lib/module/hooks-util-selectors.js +2 -1
- package/lib/module/hooks-util-selectors.js.map +1 -1
- package/lib/module/hooks-util.js +78 -32
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +3 -1
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +6 -0
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/appState.js +9 -1
- package/lib/module/redux/reducers/appState.js.map +1 -1
- package/lib/module/utils/theme.js +0 -1
- package/lib/module/utils/theme.js.map +1 -1
- package/lib/module/utils/types.js +2 -2
- package/lib/module/utils/types.js.map +1 -1
- package/lib/module/utils.js +0 -1
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
- package/lib/typescript/Icons/Recording/index.d.ts +1 -1
- package/lib/typescript/Icons/Recording/index.d.ts.map +1 -1
- package/lib/typescript/components/AnimatedFooter.d.ts.map +1 -1
- package/lib/typescript/components/AnimatedHLSFooter.d.ts.map +1 -1
- package/lib/typescript/components/AnimatedHeader.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet.d.ts +2 -0
- package/lib/typescript/components/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatBanner.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatFilterBottomSheetView.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsView.d.ts.map +1 -1
- package/lib/typescript/components/DefaultModal.d.ts.map +1 -1
- package/lib/typescript/components/DisplayView.d.ts.map +1 -1
- package/lib/typescript/components/EndRoomModal.d.ts.map +1 -1
- package/lib/typescript/components/EndRoomModalContent.d.ts.map +1 -1
- package/lib/typescript/components/Footer.d.ts +1 -1
- package/lib/typescript/components/Footer.d.ts.map +1 -1
- package/lib/typescript/components/GridView.d.ts.map +1 -1
- package/lib/typescript/components/HLSView.d.ts.map +1 -1
- package/lib/typescript/components/HMSHLSMessageList.d.ts.map +1 -1
- package/lib/typescript/components/HMSKeyboardAvoidingView.android.d.ts +9 -0
- package/lib/typescript/components/HMSKeyboardAvoidingView.android.d.ts.map +1 -0
- package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts +2 -1
- package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts.map +1 -1
- package/lib/typescript/components/HMSLiveIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSLiveViewerCount.d.ts +3 -0
- package/lib/typescript/components/HMSLiveViewerCount.d.ts.map +1 -0
- package/lib/typescript/components/HMSNotifications.d.ts.map +1 -1
- package/lib/typescript/components/HMSOverlayChatView.d.ts +5 -1
- package/lib/typescript/components/HMSOverlayChatView.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewEditName.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSRecordingIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -1
- package/lib/typescript/components/HMSTextInput.d.ts.map +1 -1
- package/lib/typescript/components/Header.d.ts +1 -0
- package/lib/typescript/components/Header.d.ts.map +1 -1
- package/lib/typescript/components/LeaveRoomBottomSheet.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/MiniView.d.ts +2 -3
- package/lib/typescript/components/MiniView.d.ts.map +1 -1
- package/lib/typescript/components/OverlayedViews.d.ts +4 -1
- package/lib/typescript/components/OverlayedViews.d.ts.map +1 -1
- package/lib/typescript/components/PeerSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/PeerVideoTile/PeerVideoTileView.d.ts.map +1 -1
- package/lib/typescript/components/PressableIcon.d.ts.map +1 -1
- package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/RoomSettingsModalDebugModeContent.d.ts.map +1 -1
- package/lib/typescript/components/TilesContainer.d.ts.map +1 -1
- package/lib/typescript/components/WebrtcView.d.ts +2 -0
- package/lib/typescript/components/WebrtcView.d.ts.map +1 -1
- package/lib/typescript/hooks-util-selectors.d.ts.map +1 -1
- package/lib/typescript/hooks-util.d.ts +5 -0
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +1 -0
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +6 -0
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +1 -0
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/appState.d.ts +1 -0
- package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +1 -0
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/lib/typescript/utils/types.d.ts +1 -0
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/package.json +179 -179
- package/src/HMSRoomSetup.tsx +4 -1
- package/src/Icons/Recording/assets/recording-pause.png +0 -0
- package/src/Icons/Recording/assets/recording-pause@2x.png +0 -0
- package/src/Icons/Recording/assets/recording-pause@3x.png +0 -0
- package/src/Icons/Recording/index.tsx +3 -1
- package/src/components/AnimatedFooter.tsx +9 -3
- package/src/components/AnimatedHLSFooter.tsx +8 -17
- package/src/components/AnimatedHeader.tsx +16 -5
- package/src/components/BottomSheet.tsx +52 -9
- package/src/components/Chat/ChatBanner.tsx +9 -0
- package/src/components/Chat/ChatFilterBottomSheetView.tsx +8 -1
- package/src/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.tsx +17 -7
- package/src/components/ChatAndParticipants/ChatAndParticipantsView.tsx +5 -4
- package/src/components/DefaultModal.tsx +12 -1
- package/src/components/DisplayView.tsx +4 -13
- package/src/components/EndRoomModal.tsx +0 -1
- package/src/components/EndRoomModalContent.tsx +2 -1
- package/src/components/Footer.tsx +19 -10
- package/src/components/GridView.tsx +54 -15
- package/src/components/HLSFooter.tsx +1 -1
- package/src/components/HLSView.tsx +2 -1
- package/src/components/HMSHLSMessageList.tsx +8 -2
- package/src/components/HMSKeyboardAvoidingView.android.tsx +45 -0
- package/src/components/HMSKeyboardAvoidingView.tsx +6 -3
- package/src/components/HMSLiveIndicator.tsx +8 -73
- package/src/components/HMSLiveViewerCount.tsx +90 -0
- package/src/components/HMSNotifications.tsx +11 -1
- package/src/components/HMSOverlayChatView.tsx +18 -2
- package/src/components/HMSPreviewEditName.tsx +10 -1
- package/src/components/HMSPreviewHLSLiveIndicator.tsx +2 -1
- package/src/components/HMSRecordingIndicator.tsx +28 -2
- package/src/components/HMSRoomOptions.tsx +0 -3
- package/src/components/HMSTextInput.tsx +1 -0
- package/src/components/Header.tsx +14 -3
- package/src/components/LeaveRoomBottomSheet.tsx +3 -6
- package/src/components/Meeting.tsx +2 -19
- package/src/components/MeetingScreenContent.tsx +67 -62
- package/src/components/MiniView.tsx +18 -15
- package/src/components/OverlayedViews.tsx +6 -3
- package/src/components/PeerSettingsModalContent.tsx +2 -1
- package/src/components/PeerVideoTile/PeerVideoTileView.tsx +2 -1
- package/src/components/PressableIcon.tsx +22 -17
- package/src/components/Preview.tsx +2 -2
- package/src/components/RoomSettingsModalContent.tsx +22 -6
- package/src/components/RoomSettingsModalDebugModeContent.tsx +2 -1
- package/src/components/TilesContainer.tsx +9 -5
- package/src/components/WebrtcView.tsx +59 -22
- package/src/hooks-util-selectors.tsx +2 -1
- package/src/hooks-util.ts +86 -43
- package/src/redux/actionTypes.ts +3 -0
- package/src/redux/actions/index.ts +5 -0
- package/src/redux/reducers/appState.ts +8 -0
- package/src/utils/types.ts +12 -3
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React, { useRef, useState, useImperativeHandle } from 'react';
|
|
2
2
|
import type { ElementRef } from 'react';
|
|
3
|
-
import { View, FlatList, StyleSheet,
|
|
3
|
+
import { View, FlatList, StyleSheet, useWindowDimensions, Platform } from 'react-native';
|
|
4
4
|
import { useDispatch, useSelector } from 'react-redux';
|
|
5
5
|
import type {
|
|
6
6
|
LayoutChangeEvent,
|
|
7
|
-
LayoutRectangle,
|
|
8
7
|
ViewToken,
|
|
9
8
|
} from 'react-native';
|
|
10
9
|
import type { HMSView, HMSPeer } from '@100mslive/react-native-hms';
|
|
@@ -18,6 +17,8 @@ import type { RootState } from '../redux';
|
|
|
18
17
|
import { PaginationDots } from './PaginationDots';
|
|
19
18
|
import { setGridViewActivePage } from '../redux/actions';
|
|
20
19
|
import { Tile } from './Tile';
|
|
20
|
+
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
21
|
+
import { useSafeAreaFrame } from 'react-native-safe-area-context';
|
|
21
22
|
|
|
22
23
|
export type GridViewProps = {
|
|
23
24
|
onPeerTileMorePress(peerTrackNode: PeerTrackNode): void;
|
|
@@ -46,11 +47,32 @@ export const GridView = React.forwardRef<GridViewRefAttrs, GridViewProps>(
|
|
|
46
47
|
const hmsViewRefs = useRef<Record<string, ElementRef<typeof HMSView>>>({});
|
|
47
48
|
const regularTilesFlatlistRef = useRef<FlatList<PeerTrackNode[]>>(null);
|
|
48
49
|
const screenshareTilesFlatlistRef = useRef<FlatList<PeerTrackNode>>(null);
|
|
49
|
-
const
|
|
50
|
+
const [insetTileBoundingBox, setInsetTileBoundingBox] = useState<{
|
|
51
|
+
width: number | null;
|
|
52
|
+
height: number | null;
|
|
53
|
+
}>({ width: null, height: null });
|
|
50
54
|
|
|
51
55
|
const screenshareTilesAvailable = useSelector(
|
|
52
56
|
(state: RootState) => state.app.screensharePeerTrackNodes.length > 0
|
|
53
57
|
);
|
|
58
|
+
const regularTilesAvailable = pairedPeers.length > 0;
|
|
59
|
+
|
|
60
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
61
|
+
|
|
62
|
+
// On Orientation change, scroll to first page of list
|
|
63
|
+
React.useEffect(() => {
|
|
64
|
+
if (screenshareTilesAvailable) {
|
|
65
|
+
screenshareTilesFlatlistRef.current?.scrollToOffset({ offset: 0, animated: false });
|
|
66
|
+
}
|
|
67
|
+
}, [screenshareTilesAvailable, isLandscapeOrientation]);
|
|
68
|
+
|
|
69
|
+
// On Orientation change, scroll to first page of list
|
|
70
|
+
React.useEffect(() => {
|
|
71
|
+
if (regularTilesAvailable) {
|
|
72
|
+
regularTilesFlatlistRef.current?.scrollToOffset({ offset: 0, animated: false });
|
|
73
|
+
}
|
|
74
|
+
}, [regularTilesAvailable, isLandscapeOrientation]);
|
|
75
|
+
|
|
54
76
|
const miniviewPeerTrackNodeExists = useSelector(
|
|
55
77
|
(state: RootState) => !!state.app.miniviewPeerTrackNode
|
|
56
78
|
);
|
|
@@ -104,7 +126,10 @@ export const GridView = React.forwardRef<GridViewRefAttrs, GridViewProps>(
|
|
|
104
126
|
|
|
105
127
|
const _handleLayoutChange = React.useCallback(
|
|
106
128
|
({ nativeEvent }: LayoutChangeEvent) => {
|
|
107
|
-
|
|
129
|
+
setInsetTileBoundingBox({
|
|
130
|
+
width: nativeEvent.layout.width,
|
|
131
|
+
height: nativeEvent.layout.height,
|
|
132
|
+
});
|
|
108
133
|
},
|
|
109
134
|
[]
|
|
110
135
|
);
|
|
@@ -121,16 +146,19 @@ export const GridView = React.forwardRef<GridViewRefAttrs, GridViewProps>(
|
|
|
121
146
|
/>
|
|
122
147
|
) : null}
|
|
123
148
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
149
|
+
{screenshareTilesAvailable && isLandscapeOrientation ? null : (
|
|
150
|
+
<RegularTiles
|
|
151
|
+
ref={regularTilesFlatlistRef}
|
|
152
|
+
pairedPeers={pairedPeers}
|
|
153
|
+
setHmsViewRefs={setHmsViewRefs}
|
|
154
|
+
onPeerTileMorePress={onPeerTileMorePress}
|
|
155
|
+
/>
|
|
156
|
+
)}
|
|
130
157
|
|
|
131
158
|
{pairedPeers.length > 0 && miniviewPeerTrackNodeExists ? (
|
|
132
159
|
<MiniView
|
|
133
|
-
|
|
160
|
+
boundingBoxWidth={insetTileBoundingBox.width}
|
|
161
|
+
boundingBoxHeight={insetTileBoundingBox.height}
|
|
134
162
|
onMoreOptionsPress={onPeerTileMorePress}
|
|
135
163
|
/>
|
|
136
164
|
) : null}
|
|
@@ -176,6 +204,8 @@ const RegularTiles = React.forwardRef<
|
|
|
176
204
|
RegularTilesProps
|
|
177
205
|
>(({ pairedPeers, onPeerTileMorePress, setHmsViewRefs }, flatlistRef) => {
|
|
178
206
|
const dispatch = useDispatch();
|
|
207
|
+
const { height: safeHeight } = useSafeAreaFrame();
|
|
208
|
+
|
|
179
209
|
const screenshareTilesAvailable = useSelector(
|
|
180
210
|
(state: RootState) => state.app.screensharePeerTrackNodes.length > 0
|
|
181
211
|
);
|
|
@@ -183,6 +213,8 @@ const RegularTiles = React.forwardRef<
|
|
|
183
213
|
(state: RootState) => state.app.gridViewActivePage
|
|
184
214
|
);
|
|
185
215
|
|
|
216
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
217
|
+
|
|
186
218
|
const _keyExtractor = React.useCallback((item) => item[0]?.id, []);
|
|
187
219
|
|
|
188
220
|
const _handleViewableItemsChanged = React.useCallback(
|
|
@@ -217,6 +249,7 @@ const RegularTiles = React.forwardRef<
|
|
|
217
249
|
<FlatList
|
|
218
250
|
ref={flatlistRef}
|
|
219
251
|
horizontal={true}
|
|
252
|
+
style={Platform.OS === 'ios' ? {maxHeight: (safeHeight - 16)} : null}
|
|
220
253
|
data={pairedPeers}
|
|
221
254
|
initialNumToRender={1}
|
|
222
255
|
maxToRenderPerBatch={1}
|
|
@@ -234,7 +267,11 @@ const RegularTiles = React.forwardRef<
|
|
|
234
267
|
<PaginationDots
|
|
235
268
|
list={pairedPeers}
|
|
236
269
|
activeIndex={activeIndex}
|
|
237
|
-
style={
|
|
270
|
+
style={
|
|
271
|
+
screenshareTilesAvailable || isLandscapeOrientation
|
|
272
|
+
? { marginVertical: isLandscapeOrientation ? 4 : 8 }
|
|
273
|
+
: null
|
|
274
|
+
}
|
|
238
275
|
/>
|
|
239
276
|
) : null}
|
|
240
277
|
</View>
|
|
@@ -250,6 +287,8 @@ const ScreenshareTiles = React.forwardRef<
|
|
|
250
287
|
FlatList<PeerTrackNode>,
|
|
251
288
|
ScreenshareTilesProps
|
|
252
289
|
>(({ onPeerTileMorePress, setHmsViewRefs }, flatlistRef) => {
|
|
290
|
+
const { width } = useWindowDimensions();
|
|
291
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
253
292
|
const [activePage, setActivePage] = useState(0);
|
|
254
293
|
const screensharePeerTrackNodes = useSelector(
|
|
255
294
|
(state: RootState) => state.app.screensharePeerTrackNodes
|
|
@@ -276,14 +315,14 @@ const ScreenshareTiles = React.forwardRef<
|
|
|
276
315
|
return (
|
|
277
316
|
<Tile
|
|
278
317
|
height={'100%'}
|
|
279
|
-
width={
|
|
318
|
+
width={width}
|
|
280
319
|
peerTrackNode={item}
|
|
281
320
|
onPeerTileMorePress={onPeerTileMorePress}
|
|
282
321
|
setHmsViewRefs={setHmsViewRefs}
|
|
283
322
|
/>
|
|
284
323
|
);
|
|
285
324
|
},
|
|
286
|
-
[onPeerTileMorePress, setHmsViewRefs]
|
|
325
|
+
[width, onPeerTileMorePress, setHmsViewRefs]
|
|
287
326
|
);
|
|
288
327
|
|
|
289
328
|
return (
|
|
@@ -308,7 +347,7 @@ const ScreenshareTiles = React.forwardRef<
|
|
|
308
347
|
<PaginationDots
|
|
309
348
|
list={screensharePeerTrackNodes}
|
|
310
349
|
activeIndex={activePage}
|
|
311
|
-
style={{ marginVertical: 8 }}
|
|
350
|
+
style={{ marginVertical: isLandscapeOrientation ? 4 : 8 }}
|
|
312
351
|
/>
|
|
313
352
|
) : null}
|
|
314
353
|
</View>
|
|
@@ -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 ? <HLSChatView /> : null}
|
|
20
|
+
{overlayChatVisible ? <HLSChatView offset={offset} /> : null}
|
|
21
21
|
|
|
22
22
|
<HMSNotifications />
|
|
23
23
|
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
HMSHLSPlayer,
|
|
7
7
|
HMSHLSPlayerPlaybackState,
|
|
8
8
|
useHMSHLSPlayerPlaybackState,
|
|
9
|
+
HMSStreamingState,
|
|
9
10
|
} from '@100mslive/react-native-hms';
|
|
10
11
|
|
|
11
12
|
import type { RootState } from '../redux';
|
|
@@ -128,7 +129,7 @@ export const _HLSView: React.FC = () => {
|
|
|
128
129
|
|
|
129
130
|
return (
|
|
130
131
|
<View style={styles.hlsView}>
|
|
131
|
-
{room?.hlsStreamingState?.
|
|
132
|
+
{room?.hlsStreamingState?.state === HMSStreamingState.STARTED ? (
|
|
132
133
|
room?.hlsStreamingState?.variants?.slice(0, 1)?.map((variant, index) =>
|
|
133
134
|
variant?.hlsStreamUrl ? (
|
|
134
135
|
<View key={index} style={styles.hlsPlayerContainer}>
|
|
@@ -6,10 +6,12 @@ import type { HMSMessage } from '@100mslive/react-native-hms';
|
|
|
6
6
|
|
|
7
7
|
import type { RootState } from '../redux';
|
|
8
8
|
import { HMSHLSMessage } from './HMSHLSMessage';
|
|
9
|
+
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
9
10
|
|
|
10
11
|
export const HMSHLSMessageList: React.FC = () => {
|
|
11
12
|
const { height: windowHeight } = useWindowDimensions();
|
|
12
13
|
const messages = useSelector((state: RootState) => state.messages.messages);
|
|
14
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
13
15
|
|
|
14
16
|
const _keyExtractor = React.useCallback(
|
|
15
17
|
(item: HMSMessage) => item.messageId,
|
|
@@ -24,14 +26,18 @@ export const HMSHLSMessageList: React.FC = () => {
|
|
|
24
26
|
return null;
|
|
25
27
|
}
|
|
26
28
|
|
|
29
|
+
const HEIGHT_MULTIPLIER = isLandscapeOrientation ? 0.45 : 0.2;
|
|
30
|
+
|
|
27
31
|
return (
|
|
28
32
|
<View
|
|
29
33
|
style={[
|
|
30
34
|
styles.container,
|
|
31
35
|
{
|
|
32
|
-
maxHeight: windowHeight *
|
|
36
|
+
maxHeight: windowHeight * HEIGHT_MULTIPLIER,
|
|
33
37
|
height:
|
|
34
|
-
messages.length > 3
|
|
38
|
+
messages.length > 3
|
|
39
|
+
? windowHeight * HEIGHT_MULTIPLIER
|
|
40
|
+
: messages.length * 54,
|
|
35
41
|
},
|
|
36
42
|
]}
|
|
37
43
|
>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import Animated from 'react-native-reanimated'; // useDerivedValue, // useAnimatedStyle, // useAnimatedKeyboard,
|
|
4
|
+
|
|
5
|
+
export interface HMSKeyboardAvoidingViewProps {
|
|
6
|
+
style?: StyleProp<Animated.AnimateStyle<StyleProp<ViewStyle>>>;
|
|
7
|
+
bottomOffset?: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const HMSKeyboardAvoidingView: React.FC<
|
|
11
|
+
HMSKeyboardAvoidingViewProps
|
|
12
|
+
> = ({
|
|
13
|
+
children,
|
|
14
|
+
style,
|
|
15
|
+
// bottomOffset=0
|
|
16
|
+
}) => {
|
|
17
|
+
// const animatedKeyboard = useAnimatedKeyboard();
|
|
18
|
+
|
|
19
|
+
// const initialPageY = useDerivedValue(() => bottomOffset, [bottomOffset]);
|
|
20
|
+
|
|
21
|
+
// const keyboardAvoidStyle = useAnimatedStyle(() => {
|
|
22
|
+
// const keyboardHeight = animatedKeyboard.height.value;
|
|
23
|
+
// return {
|
|
24
|
+
// transform: [
|
|
25
|
+
// {
|
|
26
|
+
// translateY:
|
|
27
|
+
// keyboardHeight <= initialPageY.value
|
|
28
|
+
// ? 0 // Keep element at original `pageY` till and when keyboard height is less than `pageY`
|
|
29
|
+
// : -(keyboardHeight - initialPageY.value),
|
|
30
|
+
// },
|
|
31
|
+
// ],
|
|
32
|
+
// };
|
|
33
|
+
// });
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<Animated.View
|
|
37
|
+
style={[
|
|
38
|
+
style,
|
|
39
|
+
// keyboardAvoidStyle
|
|
40
|
+
]}
|
|
41
|
+
>
|
|
42
|
+
{children}
|
|
43
|
+
</Animated.View>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
@@ -5,18 +5,21 @@ import Animated, {
|
|
|
5
5
|
useAnimatedStyle,
|
|
6
6
|
useDerivedValue,
|
|
7
7
|
} from 'react-native-reanimated';
|
|
8
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
8
9
|
|
|
9
10
|
export interface HMSKeyboardAvoidingViewProps {
|
|
10
11
|
style?: StyleProp<Animated.AnimateStyle<StyleProp<ViewStyle>>>;
|
|
11
|
-
bottomOffset?: number
|
|
12
|
+
bottomOffset?: number | SharedValue<number>;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
export const HMSKeyboardAvoidingView: React.FC<
|
|
15
16
|
HMSKeyboardAvoidingViewProps
|
|
16
|
-
> = ({ children, style, bottomOffset=0 }) => {
|
|
17
|
+
> = ({ children, style, bottomOffset = 0 }) => {
|
|
17
18
|
const animatedKeyboard = useAnimatedKeyboard();
|
|
18
19
|
|
|
19
|
-
const initialPageY = useDerivedValue(() =>
|
|
20
|
+
const initialPageY = useDerivedValue(() => {
|
|
21
|
+
return typeof bottomOffset === 'number' ? bottomOffset : bottomOffset.value;
|
|
22
|
+
}, [bottomOffset]);
|
|
20
23
|
|
|
21
24
|
const keyboardAvoidStyle = useAnimatedStyle(() => {
|
|
22
25
|
const keyboardHeight = animatedKeyboard.height.value;
|
|
@@ -4,27 +4,18 @@ import {
|
|
|
4
4
|
View,
|
|
5
5
|
Text,
|
|
6
6
|
Platform,
|
|
7
|
-
TouchableOpacity,
|
|
8
7
|
} from 'react-native';
|
|
9
8
|
import { useSelector } from 'react-redux';
|
|
9
|
+
import { HMSStreamingState } from '@100mslive/react-native-hms';
|
|
10
10
|
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
useIsHLSViewer,
|
|
14
|
-
useShowChatAndParticipants,
|
|
15
|
-
} from '../hooks-util';
|
|
16
|
-
import { EyeIcon } from '../Icons';
|
|
17
|
-
import { COLORS, hexToRgbA } from '../utils/theme';
|
|
11
|
+
import { useHMSRoomStyleSheet } from '../hooks-util';
|
|
12
|
+
import { COLORS } from '../utils/theme';
|
|
18
13
|
import type { RootState } from '../redux';
|
|
19
14
|
import { TestIds } from '../utils/constants';
|
|
20
15
|
|
|
21
16
|
const _HMSLiveIndicator = () => {
|
|
22
|
-
const isHLSViewer = useIsHLSViewer();
|
|
23
|
-
const previewPeerCount = useSelector(
|
|
24
|
-
(state: RootState) => state.hmsStates.room?.peerCount
|
|
25
|
-
);
|
|
26
17
|
const live = useSelector(
|
|
27
|
-
(state: RootState) =>
|
|
18
|
+
(state: RootState) => state.hmsStates.room?.hlsStreamingState?.state === HMSStreamingState.STARTED
|
|
28
19
|
);
|
|
29
20
|
|
|
30
21
|
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typograhy) => ({
|
|
@@ -35,51 +26,15 @@ const _HMSLiveIndicator = () => {
|
|
|
35
26
|
color: COLORS.WHITE,
|
|
36
27
|
fontFamily: `${typograhy.font_family}-SemiBold`,
|
|
37
28
|
},
|
|
38
|
-
viewers: {
|
|
39
|
-
backgroundColor: isHLSViewer
|
|
40
|
-
? theme.palette.background_dim &&
|
|
41
|
-
hexToRgbA(theme.palette.background_dim, 0.64)
|
|
42
|
-
: undefined,
|
|
43
|
-
borderWidth: isHLSViewer ? 0 : 1,
|
|
44
|
-
borderColor: theme.palette.border_bright,
|
|
45
|
-
},
|
|
46
|
-
count: {
|
|
47
|
-
color: theme.palette.on_surface_high,
|
|
48
|
-
fontFamily: `${typograhy.font_family}-SemiBold`,
|
|
49
|
-
},
|
|
50
29
|
}));
|
|
51
30
|
|
|
52
|
-
const { canShowParticipants, show } = useShowChatAndParticipants();
|
|
53
|
-
|
|
54
|
-
const showParticipantsSheet = () => {
|
|
55
|
-
show('participants');
|
|
56
|
-
};
|
|
57
|
-
|
|
58
31
|
if (!live) {
|
|
59
32
|
return null;
|
|
60
33
|
}
|
|
61
34
|
|
|
62
35
|
return (
|
|
63
|
-
<View style={styles.
|
|
64
|
-
{
|
|
65
|
-
<View style={[styles.live, hmsRoomStyles.live]}>
|
|
66
|
-
<Text testID={TestIds.live_text} style={[styles.liveText, hmsRoomStyles.liveText]}>LIVE</Text>
|
|
67
|
-
</View>
|
|
68
|
-
|
|
69
|
-
{/* Viewer Count */}
|
|
70
|
-
{typeof previewPeerCount === 'number' ? (
|
|
71
|
-
<TouchableOpacity
|
|
72
|
-
style={[styles.viewers, hmsRoomStyles.viewers]}
|
|
73
|
-
onPress={showParticipantsSheet}
|
|
74
|
-
disabled={!canShowParticipants}
|
|
75
|
-
>
|
|
76
|
-
<EyeIcon testID={TestIds.peer_count_icon} />
|
|
77
|
-
|
|
78
|
-
<Text testID={TestIds.peer_count} style={[styles.count, hmsRoomStyles.count]}>
|
|
79
|
-
{previewPeerCount}
|
|
80
|
-
</Text>
|
|
81
|
-
</TouchableOpacity>
|
|
82
|
-
) : null}
|
|
36
|
+
<View style={[styles.live, hmsRoomStyles.live]}>
|
|
37
|
+
<Text testID={TestIds.live_text} style={[styles.liveText, hmsRoomStyles.liveText]}>LIVE</Text>
|
|
83
38
|
</View>
|
|
84
39
|
);
|
|
85
40
|
};
|
|
@@ -87,13 +42,11 @@ const _HMSLiveIndicator = () => {
|
|
|
87
42
|
export const HMSLiveIndicator = React.memo(_HMSLiveIndicator);
|
|
88
43
|
|
|
89
44
|
const styles = StyleSheet.create({
|
|
90
|
-
container: {
|
|
91
|
-
flexDirection: 'row',
|
|
92
|
-
},
|
|
93
45
|
live: {
|
|
94
46
|
paddingHorizontal: 8,
|
|
95
|
-
paddingVertical:
|
|
47
|
+
paddingVertical: 6,
|
|
96
48
|
borderRadius: 4,
|
|
49
|
+
marginRight: 8,
|
|
97
50
|
alignItems: 'center',
|
|
98
51
|
justifyContent: 'center',
|
|
99
52
|
},
|
|
@@ -104,22 +57,4 @@ const styles = StyleSheet.create({
|
|
|
104
57
|
textAlign: 'center',
|
|
105
58
|
textAlignVertical: 'center',
|
|
106
59
|
},
|
|
107
|
-
viewers: {
|
|
108
|
-
flexDirection: 'row',
|
|
109
|
-
alignItems: 'center',
|
|
110
|
-
paddingVertical: 4,
|
|
111
|
-
paddingRight: 8,
|
|
112
|
-
paddingLeft: 6,
|
|
113
|
-
marginLeft: 8,
|
|
114
|
-
borderRadius: 4,
|
|
115
|
-
},
|
|
116
|
-
count: {
|
|
117
|
-
fontSize: 10,
|
|
118
|
-
lineHeight: Platform.OS === 'android' ? 16 : undefined,
|
|
119
|
-
letterSpacing: 1.5,
|
|
120
|
-
textAlign: 'center',
|
|
121
|
-
textAlignVertical: 'center',
|
|
122
|
-
|
|
123
|
-
marginLeft: 4,
|
|
124
|
-
},
|
|
125
60
|
});
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
StyleSheet,
|
|
4
|
+
Text,
|
|
5
|
+
Platform,
|
|
6
|
+
TouchableOpacity,
|
|
7
|
+
} from 'react-native';
|
|
8
|
+
import { useSelector } from 'react-redux';
|
|
9
|
+
import { HMSStreamingState } from '@100mslive/react-native-hms';
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
useHMSRoomStyleSheet,
|
|
13
|
+
useIsHLSViewer,
|
|
14
|
+
useShowChatAndParticipants,
|
|
15
|
+
} from '../hooks-util';
|
|
16
|
+
import { EyeIcon } from '../Icons';
|
|
17
|
+
import { hexToRgbA } from '../utils/theme';
|
|
18
|
+
import type { RootState } from '../redux';
|
|
19
|
+
import { TestIds } from '../utils/constants';
|
|
20
|
+
|
|
21
|
+
const _HMSLiveViewerCount = () => {
|
|
22
|
+
const isHLSViewer = useIsHLSViewer();
|
|
23
|
+
const previewPeerCount = useSelector(
|
|
24
|
+
(state: RootState) => state.hmsStates.room?.peerCount
|
|
25
|
+
);
|
|
26
|
+
const live = useSelector(
|
|
27
|
+
(state: RootState) => state.hmsStates.room?.hlsStreamingState?.state === HMSStreamingState.STARTED
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typograhy) => ({
|
|
31
|
+
viewers: {
|
|
32
|
+
backgroundColor: isHLSViewer
|
|
33
|
+
? theme.palette.background_dim &&
|
|
34
|
+
hexToRgbA(theme.palette.background_dim, 0.64)
|
|
35
|
+
: undefined,
|
|
36
|
+
borderWidth: isHLSViewer ? 0 : 1,
|
|
37
|
+
borderColor: theme.palette.border_bright,
|
|
38
|
+
},
|
|
39
|
+
count: {
|
|
40
|
+
color: theme.palette.on_surface_high,
|
|
41
|
+
fontFamily: `${typograhy.font_family}-SemiBold`,
|
|
42
|
+
},
|
|
43
|
+
}));
|
|
44
|
+
|
|
45
|
+
const { canShowParticipants, show } = useShowChatAndParticipants();
|
|
46
|
+
|
|
47
|
+
const showParticipantsSheet = () => {
|
|
48
|
+
show('participants');
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
if (!live || typeof previewPeerCount !== 'number') {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<TouchableOpacity
|
|
57
|
+
style={[styles.viewers, hmsRoomStyles.viewers]}
|
|
58
|
+
onPress={showParticipantsSheet}
|
|
59
|
+
disabled={!canShowParticipants}
|
|
60
|
+
>
|
|
61
|
+
<EyeIcon testID={TestIds.peer_count_icon} />
|
|
62
|
+
|
|
63
|
+
<Text testID={TestIds.peer_count} style={[styles.count, hmsRoomStyles.count]}>
|
|
64
|
+
{previewPeerCount}
|
|
65
|
+
</Text>
|
|
66
|
+
</TouchableOpacity>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const HMSLiveViewerCount = React.memo(_HMSLiveViewerCount);
|
|
71
|
+
|
|
72
|
+
const styles = StyleSheet.create({
|
|
73
|
+
viewers: {
|
|
74
|
+
flexDirection: 'row',
|
|
75
|
+
alignItems: 'center',
|
|
76
|
+
paddingVertical: 4,
|
|
77
|
+
paddingRight: 8,
|
|
78
|
+
paddingLeft: 6,
|
|
79
|
+
borderRadius: 4,
|
|
80
|
+
},
|
|
81
|
+
count: {
|
|
82
|
+
fontSize: 10,
|
|
83
|
+
lineHeight: Platform.OS === 'android' ? 16 : undefined,
|
|
84
|
+
letterSpacing: 1.5,
|
|
85
|
+
textAlign: 'center',
|
|
86
|
+
textAlignVertical: 'center',
|
|
87
|
+
|
|
88
|
+
marginLeft: 4,
|
|
89
|
+
},
|
|
90
|
+
});
|
|
@@ -11,6 +11,7 @@ import { HMSTerminalErrorNotification } from './HMSTerminalErrorNotification';
|
|
|
11
11
|
import { HMSNotification } from './HMSNotification';
|
|
12
12
|
import { AlertTriangleIcon } from '../Icons';
|
|
13
13
|
import { HMSReconnectingNotification } from './HMSReconnectingNotification';
|
|
14
|
+
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
14
15
|
|
|
15
16
|
export interface HMSNotificationsProps {}
|
|
16
17
|
|
|
@@ -23,6 +24,7 @@ export const HMSNotifications: React.FC<HMSNotificationsProps> = () => {
|
|
|
23
24
|
const isLocalScreenShared = useSelector(
|
|
24
25
|
(state: RootState) => state.hmsStates.isLocalScreenShared
|
|
25
26
|
);
|
|
27
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
26
28
|
|
|
27
29
|
// notifications is a stack, first will appear last
|
|
28
30
|
const notifications = useSelector((state: RootState) => {
|
|
@@ -81,7 +83,9 @@ export const HMSNotifications: React.FC<HMSNotificationsProps> = () => {
|
|
|
81
83
|
return (
|
|
82
84
|
<View
|
|
83
85
|
style={[
|
|
84
|
-
|
|
86
|
+
isLandscapeOrientation
|
|
87
|
+
? styles.absoluteLandscapeContainer
|
|
88
|
+
: styles.absoluteContainer,
|
|
85
89
|
{ paddingTop: (notifications.length - 1) * 16 },
|
|
86
90
|
]}
|
|
87
91
|
>
|
|
@@ -165,6 +169,12 @@ const styles = StyleSheet.create({
|
|
|
165
169
|
marginBottom: 8,
|
|
166
170
|
width: '100%',
|
|
167
171
|
},
|
|
172
|
+
absoluteLandscapeContainer: {
|
|
173
|
+
position: 'relative',
|
|
174
|
+
marginBottom: 8,
|
|
175
|
+
width: '60%',
|
|
176
|
+
alignSelf: 'center',
|
|
177
|
+
},
|
|
168
178
|
notificationWrapper: {
|
|
169
179
|
position: 'absolute',
|
|
170
180
|
width: '100%',
|
|
@@ -2,6 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
3
|
import LinearGradient from 'react-native-linear-gradient';
|
|
4
4
|
import MaskedView from '@react-native-masked-view/masked-view';
|
|
5
|
+
import { useDerivedValue, interpolate } from 'react-native-reanimated';
|
|
6
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
5
7
|
|
|
6
8
|
import { HMSKeyboardAvoidingView } from './HMSKeyboardAvoidingView';
|
|
7
9
|
import { HMSSendMessageInput } from './HMSSendMessageInput';
|
|
@@ -16,12 +18,26 @@ const colors = [
|
|
|
16
18
|
];
|
|
17
19
|
const colorLocations = [0, 0.4, 1];
|
|
18
20
|
|
|
19
|
-
export
|
|
21
|
+
export interface HLSChatViewProps {
|
|
22
|
+
offset?: SharedValue<number>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const HLSChatView: React.FC<HLSChatViewProps> = ({ offset }) => {
|
|
20
26
|
const footerHeight = useFooterHeight();
|
|
21
27
|
const hmsNotificationsHeight = useHMSNotificationsHeight();
|
|
22
28
|
|
|
29
|
+
const chatBottomOffset = useDerivedValue(() => {
|
|
30
|
+
if (offset) {
|
|
31
|
+
return (
|
|
32
|
+
interpolate(offset.value, [0, 1], [0, footerHeight]) +
|
|
33
|
+
hmsNotificationsHeight
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
return footerHeight + hmsNotificationsHeight;
|
|
37
|
+
}, [offset, footerHeight, hmsNotificationsHeight]);
|
|
38
|
+
|
|
23
39
|
return (
|
|
24
|
-
<HMSKeyboardAvoidingView bottomOffset={
|
|
40
|
+
<HMSKeyboardAvoidingView bottomOffset={chatBottomOffset}>
|
|
25
41
|
<MaskedView
|
|
26
42
|
maskElement={
|
|
27
43
|
<LinearGradient
|
|
@@ -13,11 +13,20 @@ export const HMSPreviewEditName: React.FC<HMSPreviewEditNameProps> = () => {
|
|
|
13
13
|
const dispatch = useDispatch();
|
|
14
14
|
const { updateConfig } = useHMSConfig();
|
|
15
15
|
const userName = useSelector((state: RootState) => state.user.userName);
|
|
16
|
+
const editUsernameDisabled = useSelector((state: RootState) => state.app.editUsernameDisabled);
|
|
16
17
|
|
|
17
18
|
const handleNameChange = (name: string) => {
|
|
18
19
|
dispatch(changeUsername(name));
|
|
19
20
|
updateConfig({ username: name });
|
|
20
21
|
};
|
|
21
22
|
|
|
22
|
-
return
|
|
23
|
+
return (
|
|
24
|
+
<HMSTextInput
|
|
25
|
+
editable={!editUsernameDisabled}
|
|
26
|
+
testID={TestIds.enter_name}
|
|
27
|
+
value={userName}
|
|
28
|
+
onChangeText={handleNameChange}
|
|
29
|
+
style={editUsernameDisabled ? { opacity: 0.5 } : null}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
23
32
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { View, Text, StyleSheet } from 'react-native';
|
|
3
3
|
import { useSelector } from 'react-redux';
|
|
4
|
+
import { HMSStreamingState } from '@100mslive/react-native-hms';
|
|
4
5
|
|
|
5
6
|
import type { RootState } from '../redux';
|
|
6
7
|
import { useHMSRoomStyleSheet } from '../hooks-util';
|
|
@@ -8,7 +9,7 @@ import { COLORS } from '../utils/theme';
|
|
|
8
9
|
|
|
9
10
|
export const HMSPreviewHLSLiveIndicator = () => {
|
|
10
11
|
const isHLSStreaming = useSelector(
|
|
11
|
-
(state: RootState) => state.hmsStates.room?.hlsStreamingState?.
|
|
12
|
+
(state: RootState) => state.hmsStates.room?.hlsStreamingState?.state === HMSStreamingState.STARTED
|
|
12
13
|
);
|
|
13
14
|
|
|
14
15
|
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
@@ -5,15 +5,35 @@ import { ActivityIndicator, StyleSheet } from 'react-native';
|
|
|
5
5
|
import type { RootState } from '../redux';
|
|
6
6
|
import { RecordingIcon } from '../Icons';
|
|
7
7
|
import { useHMSRoomColorPalette, useHMSRoomStyle } from '../hooks-util';
|
|
8
|
+
import { HMSRecordingState } from '@100mslive/react-native-hms';
|
|
8
9
|
|
|
9
10
|
export const HMSRecordingIndicator = () => {
|
|
10
11
|
const isRecordingOn = useSelector(
|
|
11
|
-
(state: RootState) =>
|
|
12
|
+
(state: RootState) =>
|
|
13
|
+
state.hmsStates.room?.browserRecordingState?.state === HMSRecordingState.STARTED ||
|
|
14
|
+
state.hmsStates.room?.browserRecordingState?.state === HMSRecordingState.RESUMED ||
|
|
15
|
+
|
|
16
|
+
state.hmsStates.room?.serverRecordingState?.state === HMSRecordingState.STARTED ||
|
|
17
|
+
state.hmsStates.room?.serverRecordingState?.state === HMSRecordingState.RESUMED ||
|
|
18
|
+
|
|
19
|
+
state.hmsStates.room?.hlsRecordingState?.state === HMSRecordingState.STARTED ||
|
|
20
|
+
state.hmsStates.room?.hlsRecordingState?.state === HMSRecordingState.RESUMED
|
|
21
|
+
);
|
|
22
|
+
const isRecordingPaused = useSelector(
|
|
23
|
+
(state: RootState) =>
|
|
24
|
+
state.hmsStates.room?.browserRecordingState?.state === HMSRecordingState.PAUSED ||
|
|
25
|
+
state.hmsStates.room?.serverRecordingState?.state === HMSRecordingState.PAUSED ||
|
|
26
|
+
state.hmsStates.room?.hlsRecordingState?.state === HMSRecordingState.PAUSED
|
|
12
27
|
);
|
|
13
28
|
const startingOrStoppingRecording = useSelector(
|
|
14
29
|
(state: RootState) =>
|
|
15
30
|
state.app.startingOrStoppingRecording ||
|
|
16
|
-
|
|
31
|
+
state.hmsStates.room?.browserRecordingState.state ===
|
|
32
|
+
HMSRecordingState.STARTING ||
|
|
33
|
+
state.hmsStates.room?.serverRecordingState.state ===
|
|
34
|
+
HMSRecordingState.STARTING ||
|
|
35
|
+
state.hmsStates.room?.hlsRecordingState?.state ===
|
|
36
|
+
HMSRecordingState.STARTING
|
|
17
37
|
);
|
|
18
38
|
|
|
19
39
|
const { on_surface_high: onSurfaceHighColor } = useHMSRoomColorPalette();
|
|
@@ -38,6 +58,12 @@ export const HMSRecordingIndicator = () => {
|
|
|
38
58
|
);
|
|
39
59
|
}
|
|
40
60
|
|
|
61
|
+
if (isRecordingPaused) {
|
|
62
|
+
return (
|
|
63
|
+
<RecordingIcon type='pause' style={[styles.icon, styles.rightSpace]} />
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
41
67
|
return null;
|
|
42
68
|
};
|
|
43
69
|
|