@100mslive/react-native-room-kit 1.0.0 → 1.0.2-beta.0
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/README.md +1 -1
- package/lib/commonjs/HMSInstanceSetup.js +2 -2
- package/lib/commonjs/HMSInstanceSetup.js.map +1 -1
- package/lib/commonjs/HMSPrebuilt.js +20 -20
- package/lib/commonjs/HMSPrebuilt.js.map +1 -1
- package/lib/commonjs/HMSRoomSetup.js +87 -46
- package/lib/commonjs/HMSRoomSetup.js.map +1 -1
- package/lib/commonjs/Icons/Chevron/index.js +5 -1
- package/lib/commonjs/Icons/Chevron/index.js.map +1 -1
- package/lib/commonjs/Icons/Hand/assets/hand-off.png +0 -0
- package/lib/commonjs/Icons/Hand/assets/hand-off@2x.png +0 -0
- package/lib/commonjs/Icons/Hand/assets/hand-off@3x.png +0 -0
- package/lib/commonjs/Icons/Hand/index.js +2 -1
- package/lib/commonjs/Icons/Hand/index.js.map +1 -1
- package/lib/commonjs/Icons/Leave/index.js +5 -1
- package/lib/commonjs/Icons/Leave/index.js.map +1 -1
- package/lib/commonjs/Icons/Recording/assets/recording-off.png +0 -0
- package/lib/commonjs/Icons/Recording/assets/recording-off@2x.png +0 -0
- package/lib/commonjs/Icons/Recording/assets/recording-off@3x.png +0 -0
- package/lib/commonjs/Icons/Recording/index.js +2 -1
- package/lib/commonjs/Icons/Recording/index.js.map +1 -1
- package/lib/commonjs/Icons/WelcomeHand/assets/welcome-hand.png +0 -0
- package/lib/commonjs/Icons/WelcomeHand/assets/welcome-hand@2x.png +0 -0
- package/lib/commonjs/Icons/WelcomeHand/assets/welcome-hand@3x.png +0 -0
- package/lib/commonjs/Icons/WelcomeHand/index.js +30 -0
- package/lib/commonjs/Icons/WelcomeHand/index.js.map +1 -0
- package/lib/commonjs/Icons/index.js +11 -0
- package/lib/commonjs/Icons/index.js.map +1 -1
- package/lib/commonjs/components/AnimatedFooter.js +2 -2
- package/lib/commonjs/components/AnimatedFooter.js.map +1 -1
- package/lib/commonjs/components/AnimatedHLSFooter.js +2 -2
- package/lib/commonjs/components/AnimatedHLSFooter.js.map +1 -1
- package/lib/commonjs/components/AnimatedHeader.js +2 -2
- package/lib/commonjs/components/AnimatedHeader.js.map +1 -1
- package/lib/commonjs/components/AvatarView.js +2 -2
- package/lib/commonjs/components/AvatarView.js.map +1 -1
- package/lib/commonjs/components/BackButton.js +2 -2
- package/lib/commonjs/components/BackButton.js.map +1 -1
- package/lib/commonjs/components/BottomSheet.js +2 -2
- package/lib/commonjs/components/BottomSheet.js.map +1 -1
- package/lib/commonjs/components/ChangeNameModalContent.js +25 -6
- package/lib/commonjs/components/ChangeNameModalContent.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatBanner.js +2 -2
- package/lib/commonjs/components/Chat/ChatBanner.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js +3 -4
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js +3 -4
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterItem.js +3 -4
- package/lib/commonjs/components/Chat/ChatFilterItem.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterView.js +3 -4
- package/lib/commonjs/components/Chat/ChatFilterView.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatList.js +3 -4
- package/lib/commonjs/components/Chat/ChatList.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatMessage.js +3 -4
- package/lib/commonjs/components/Chat/ChatMessage.js.map +1 -1
- package/lib/commonjs/components/Chat/PinnedMessage.js +2 -2
- package/lib/commonjs/components/Chat/PinnedMessage.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js +2 -2
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsHeader.js +7 -7
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsHeader.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js +3 -4
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatView.js +3 -4
- package/lib/commonjs/components/ChatAndParticipants/ChatView.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ParticipantsView.js +15 -14
- package/lib/commonjs/components/ChatAndParticipants/ParticipantsView.js.map +1 -1
- package/lib/commonjs/components/DisplayView.js +5 -3
- package/lib/commonjs/components/DisplayView.js.map +1 -1
- package/lib/commonjs/components/EndRoomModal.js +29 -0
- package/lib/commonjs/components/EndRoomModal.js.map +1 -0
- package/lib/commonjs/components/EndRoomModalContent.js +11 -4
- package/lib/commonjs/components/EndRoomModalContent.js.map +1 -1
- package/lib/commonjs/components/Footer.js +13 -6
- package/lib/commonjs/components/Footer.js.map +1 -1
- package/lib/commonjs/components/FullScreenVideoView.js +2 -2
- package/lib/commonjs/components/FullScreenVideoView.js.map +1 -1
- package/lib/commonjs/components/GridView.js +3 -4
- package/lib/commonjs/components/GridView.js.map +1 -1
- package/lib/commonjs/components/HLSFooter.js +2 -2
- package/lib/commonjs/components/HLSFooter.js.map +1 -1
- package/lib/commonjs/components/HLSView.js +2 -2
- package/lib/commonjs/components/HLSView.js.map +1 -1
- package/lib/commonjs/components/HMSBaseButton.js +2 -2
- package/lib/commonjs/components/HMSBaseButton.js.map +1 -1
- package/lib/commonjs/components/HMSChat.js +2 -2
- package/lib/commonjs/components/HMSChat.js.map +1 -1
- package/lib/commonjs/components/HMSDangerButton.js +4 -3
- package/lib/commonjs/components/HMSDangerButton.js.map +1 -1
- package/lib/commonjs/components/HMSHLSMessage.js +3 -4
- package/lib/commonjs/components/HMSHLSMessage.js.map +1 -1
- package/lib/commonjs/components/HMSHLSMessageList.js +2 -2
- package/lib/commonjs/components/HMSHLSMessageList.js.map +1 -1
- package/lib/commonjs/components/HMSHLSNotStarted.js +2 -2
- package/lib/commonjs/components/HMSHLSNotStarted.js.map +1 -1
- package/lib/commonjs/components/HMSHLSStreamLoading.js +6 -4
- package/lib/commonjs/components/HMSHLSStreamLoading.js.map +1 -1
- package/lib/commonjs/components/HMSHandRaiseNotification.js +2 -2
- package/lib/commonjs/components/HMSHandRaiseNotification.js.map +1 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js +7 -23
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/commonjs/components/HMSLiveIndicator.js +5 -6
- package/lib/commonjs/components/HMSLiveIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSLocalScreenshareNotification.js +4 -4
- package/lib/commonjs/components/HMSLocalScreenshareNotification.js.map +1 -1
- package/lib/commonjs/components/HMSLocalVideoView.js +2 -2
- package/lib/commonjs/components/HMSLocalVideoView.js.map +1 -1
- package/lib/commonjs/components/HMSManageAudioOutput.js +2 -2
- package/lib/commonjs/components/HMSManageAudioOutput.js.map +1 -1
- package/lib/commonjs/components/HMSManageCameraRotation.js +2 -2
- package/lib/commonjs/components/HMSManageCameraRotation.js.map +1 -1
- package/lib/commonjs/components/HMSManageLeave.js +7 -181
- package/lib/commonjs/components/HMSManageLeave.js.map +1 -1
- package/lib/commonjs/components/HMSManageLocalAudio.js +2 -2
- package/lib/commonjs/components/HMSManageLocalAudio.js.map +1 -1
- package/lib/commonjs/components/HMSManageLocalVideo.js +2 -2
- package/lib/commonjs/components/HMSManageLocalVideo.js.map +1 -1
- package/lib/commonjs/components/HMSManageRaiseHand.js +23 -11
- package/lib/commonjs/components/HMSManageRaiseHand.js.map +1 -1
- package/lib/commonjs/components/HMSMeetingEnded.js +2 -2
- package/lib/commonjs/components/HMSMeetingEnded.js.map +1 -1
- package/lib/commonjs/components/HMSNotification.js +6 -5
- package/lib/commonjs/components/HMSNotification.js.map +1 -1
- package/lib/commonjs/components/HMSNotifications.js +34 -8
- package/lib/commonjs/components/HMSNotifications.js.map +1 -1
- package/lib/commonjs/components/HMSOverlayChatView.js +9 -3
- package/lib/commonjs/components/HMSOverlayChatView.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewEditName.js +2 -2
- package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js +5 -4
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewJoinButton.js +10 -5
- package/lib/commonjs/components/HMSPreviewJoinButton.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewNetworkQuality.js +2 -2
- package/lib/commonjs/components/HMSPreviewNetworkQuality.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewPeersList.js +2 -2
- package/lib/commonjs/components/HMSPreviewPeersList.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewSubtitle.js +2 -2
- package/lib/commonjs/components/HMSPreviewSubtitle.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewTile.js +3 -3
- package/lib/commonjs/components/HMSPreviewTile.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewTitle.js +2 -2
- package/lib/commonjs/components/HMSPreviewTitle.js.map +1 -1
- package/lib/commonjs/components/HMSPrimaryButton.js +2 -2
- package/lib/commonjs/components/HMSPrimaryButton.js.map +1 -1
- package/lib/commonjs/components/HMSReconnectingNotification.js +33 -0
- package/lib/commonjs/components/HMSReconnectingNotification.js.map +1 -0
- package/lib/commonjs/components/HMSRecordingIndicator.js +6 -3
- package/lib/commonjs/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSRoleChangeDeclinedNotification.js +2 -2
- package/lib/commonjs/components/HMSRoleChangeDeclinedNotification.js.map +1 -1
- package/lib/commonjs/components/HMSRoomOptions.js +2 -2
- package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
- package/lib/commonjs/components/HMSSendMessageInput.js +2 -2
- package/lib/commonjs/components/HMSSendMessageInput.js.map +1 -1
- package/lib/commonjs/components/HMSTerminalErrorNotification.js +66 -0
- package/lib/commonjs/components/HMSTerminalErrorNotification.js.map +1 -0
- package/lib/commonjs/components/HMSTextInput.js +5 -5
- package/lib/commonjs/components/HMSTextInput.js.map +1 -1
- package/lib/commonjs/components/HMSVideoView.js +2 -2
- package/lib/commonjs/components/HMSVideoView.js.map +1 -1
- package/lib/commonjs/components/Header.js +4 -6
- package/lib/commonjs/components/Header.js.map +1 -1
- package/lib/commonjs/components/LeaveRoomBottomSheet.js +175 -0
- package/lib/commonjs/components/LeaveRoomBottomSheet.js.map +1 -0
- package/lib/commonjs/components/LocalPeerRegularVideoView.js +2 -2
- package/lib/commonjs/components/LocalPeerRegularVideoView.js.map +1 -1
- package/lib/commonjs/components/LocalPeerScreenshareView.js +2 -2
- package/lib/commonjs/components/LocalPeerScreenshareView.js.map +1 -1
- package/lib/commonjs/components/Meeting.js +6 -2
- package/lib/commonjs/components/Meeting.js.map +1 -1
- package/lib/commonjs/components/MeetingScreenContent.js +5 -4
- package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
- package/lib/commonjs/components/MiniView.js +2 -2
- package/lib/commonjs/components/MiniView.js.map +1 -1
- package/lib/commonjs/components/Modals.js +2 -2
- package/lib/commonjs/components/Modals.js.map +1 -1
- package/lib/commonjs/components/OverlayContainer.js +2 -2
- package/lib/commonjs/components/OverlayContainer.js.map +1 -1
- package/lib/commonjs/components/OverlayedViews.js +3 -4
- package/lib/commonjs/components/OverlayedViews.js.map +1 -1
- package/lib/commonjs/components/PIPView.js +90 -19
- package/lib/commonjs/components/PIPView.js.map +1 -1
- package/lib/commonjs/components/PaginationDots.js +3 -4
- package/lib/commonjs/components/PaginationDots.js.map +1 -1
- package/lib/commonjs/components/Participants/MultiRoleParticipantsList.js +65 -0
- package/lib/commonjs/components/Participants/MultiRoleParticipantsList.js.map +1 -0
- package/lib/commonjs/components/Participants/ParticipantsAccordian.js +60 -0
- package/lib/commonjs/components/Participants/ParticipantsAccordian.js.map +1 -0
- package/lib/commonjs/components/Participants/ParticipantsAccordianExpanded.js +25 -0
- package/lib/commonjs/components/Participants/ParticipantsAccordianExpanded.js.map +1 -0
- package/lib/commonjs/components/Participants/ParticipantsGroupFooter.js +61 -0
- package/lib/commonjs/components/Participants/ParticipantsGroupFooter.js.map +1 -0
- package/lib/commonjs/components/Participants/ParticipantsGroupHeader.js +31 -31
- package/lib/commonjs/components/Participants/ParticipantsGroupHeader.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsGroupOptions.js +3 -4
- package/lib/commonjs/components/Participants/ParticipantsGroupOptions.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsItem.js +12 -21
- package/lib/commonjs/components/Participants/ParticipantsItem.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsItemOption.js +3 -4
- package/lib/commonjs/components/Participants/ParticipantsItemOption.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsItemOptions.js +26 -5
- package/lib/commonjs/components/Participants/ParticipantsItemOptions.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsList.js +157 -22
- package/lib/commonjs/components/Participants/ParticipantsList.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsListFooter.js +43 -0
- package/lib/commonjs/components/Participants/ParticipantsListFooter.js.map +1 -0
- package/lib/commonjs/components/Participants/ParticipantsSeachInput.js +4 -4
- package/lib/commonjs/components/Participants/ParticipantsSeachInput.js.map +1 -1
- package/lib/commonjs/components/Participants/index.js +11 -0
- package/lib/commonjs/components/Participants/index.js.map +1 -1
- package/lib/commonjs/components/ParticipantsCount.js +3 -4
- package/lib/commonjs/components/ParticipantsCount.js.map +1 -1
- package/lib/commonjs/components/PeerDisplayView.js +1 -2
- package/lib/commonjs/components/PeerDisplayView.js.map +1 -1
- package/lib/commonjs/components/PeerMinimizedView.js +3 -4
- package/lib/commonjs/components/PeerMinimizedView.js.map +1 -1
- package/lib/commonjs/components/PeerRTCStatsContainer.js +3 -4
- package/lib/commonjs/components/PeerRTCStatsContainer.js.map +1 -1
- package/lib/commonjs/components/PeerRTCStatsView.js +1 -2
- package/lib/commonjs/components/PeerRTCStatsView.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/AvatarView.js +8 -9
- package/lib/commonjs/components/PeerVideoTile/AvatarView.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/HMSFullScreenButton.js +2 -2
- package/lib/commonjs/components/PeerVideoTile/HMSFullScreenButton.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/HMSPinchGesture.js +2 -2
- package/lib/commonjs/components/PeerVideoTile/HMSPinchGesture.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerAudioIndicator.js +15 -8
- package/lib/commonjs/components/PeerVideoTile/PeerAudioIndicator.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerMetadata.js +22 -12
- package/lib/commonjs/components/PeerVideoTile/PeerMetadata.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerNameAndNetwork.js +2 -2
- package/lib/commonjs/components/PeerVideoTile/PeerNameAndNetwork.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js +27 -13
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/VideoView.js +3 -4
- package/lib/commonjs/components/PeerVideoTile/VideoView.js.map +1 -1
- package/lib/commonjs/components/PressableIcon.js +2 -2
- package/lib/commonjs/components/PressableIcon.js.map +1 -1
- package/lib/commonjs/components/Preview.js +5 -1
- package/lib/commonjs/components/Preview.js.map +1 -1
- package/lib/commonjs/components/PreviewForRoleChangeModal.js +6 -12
- package/lib/commonjs/components/PreviewForRoleChangeModal.js.map +1 -1
- package/lib/commonjs/components/ReconnectionView.js +3 -4
- package/lib/commonjs/components/ReconnectionView.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalContent.js +53 -20
- 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/StatusBar.js +2 -2
- package/lib/commonjs/components/StatusBar.js.map +1 -1
- package/lib/commonjs/components/StopRecordingModalContent.js +6 -3
- package/lib/commonjs/components/StopRecordingModalContent.js.map +1 -1
- package/lib/commonjs/components/StreamingQualityModalContent.js +2 -2
- package/lib/commonjs/components/StreamingQualityModalContent.js.map +1 -1
- package/lib/commonjs/components/Tile.js +1 -2
- package/lib/commonjs/components/Tile.js.map +1 -1
- package/lib/commonjs/components/TilesContainer.js +1 -2
- package/lib/commonjs/components/TilesContainer.js.map +1 -1
- package/lib/commonjs/components/UnmountAfterDelay.js +3 -4
- package/lib/commonjs/components/UnmountAfterDelay.js.map +1 -1
- package/lib/commonjs/components/WebrtcView.js +5 -5
- package/lib/commonjs/components/WebrtcView.js.map +1 -1
- package/lib/commonjs/components/WelcomeInMeeting.js +30 -9
- package/lib/commonjs/components/WelcomeInMeeting.js.map +1 -1
- package/lib/commonjs/components/styles.js +1 -2
- package/lib/commonjs/components/styles.js.map +1 -1
- package/lib/commonjs/hooks-sdk.js +46 -1
- package/lib/commonjs/hooks-sdk.js.map +1 -1
- package/lib/commonjs/hooks-util.js +323 -145
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/index.js +11 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +12 -6
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +41 -4
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/index.js +1 -2
- package/lib/commonjs/redux/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/appState.js +20 -5
- package/lib/commonjs/redux/reducers/appState.js.map +1 -1
- package/lib/commonjs/redux/reducers/chatWindow.js +1 -2
- package/lib/commonjs/redux/reducers/chatWindow.js.map +1 -1
- package/lib/commonjs/redux/reducers/hmsStates.js +192 -22
- package/lib/commonjs/redux/reducers/hmsStates.js.map +1 -1
- package/lib/commonjs/redux/reducers/index.js +1 -2
- package/lib/commonjs/redux/reducers/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/message.js +3 -4
- package/lib/commonjs/redux/reducers/message.js.map +1 -1
- package/lib/commonjs/redux/reducers/userState.js +8 -5
- package/lib/commonjs/redux/reducers/userState.js.map +1 -1
- package/lib/commonjs/types.js +11 -3
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/dimension.js +2 -4
- package/lib/commonjs/utils/dimension.js.map +1 -1
- package/lib/commonjs/utils/functions.js.map +1 -1
- package/lib/commonjs/utils/theme.js +5 -10
- package/lib/commonjs/utils/theme.js.map +1 -1
- package/lib/commonjs/utils/types.js +23 -23
- package/lib/commonjs/utils/types.js.map +1 -1
- package/lib/commonjs/utils.js +1 -8
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/HMSPrebuilt.js +18 -17
- package/lib/module/HMSPrebuilt.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +81 -40
- package/lib/module/HMSRoomSetup.js.map +1 -1
- package/lib/module/Icons/Chevron/index.js +5 -1
- package/lib/module/Icons/Chevron/index.js.map +1 -1
- package/lib/module/Icons/Hand/assets/hand-off.png +0 -0
- package/lib/module/Icons/Hand/assets/hand-off@2x.png +0 -0
- package/lib/module/Icons/Hand/assets/hand-off@3x.png +0 -0
- package/lib/module/Icons/Hand/index.js +2 -1
- package/lib/module/Icons/Hand/index.js.map +1 -1
- package/lib/module/Icons/Leave/index.js +5 -1
- package/lib/module/Icons/Leave/index.js.map +1 -1
- package/lib/module/Icons/Recording/assets/recording-off.png +0 -0
- package/lib/module/Icons/Recording/assets/recording-off@2x.png +0 -0
- package/lib/module/Icons/Recording/assets/recording-off@3x.png +0 -0
- package/lib/module/Icons/Recording/index.js +2 -1
- package/lib/module/Icons/Recording/index.js.map +1 -1
- package/lib/module/Icons/WelcomeHand/assets/welcome-hand.png +0 -0
- package/lib/module/Icons/WelcomeHand/assets/welcome-hand@2x.png +0 -0
- package/lib/module/Icons/WelcomeHand/assets/welcome-hand@3x.png +0 -0
- package/lib/module/Icons/WelcomeHand/index.js +22 -0
- package/lib/module/Icons/WelcomeHand/index.js.map +1 -0
- package/lib/module/Icons/index.js +1 -0
- package/lib/module/Icons/index.js.map +1 -1
- package/lib/module/components/ChangeNameModalContent.js +25 -6
- package/lib/module/components/ChangeNameModalContent.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsHeader.js +4 -3
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsHeader.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ParticipantsView.js +13 -12
- package/lib/module/components/ChatAndParticipants/ParticipantsView.js.map +1 -1
- package/lib/module/components/DisplayView.js +3 -1
- package/lib/module/components/DisplayView.js.map +1 -1
- package/lib/module/components/EndRoomModal.js +20 -0
- package/lib/module/components/EndRoomModal.js.map +1 -0
- package/lib/module/components/EndRoomModalContent.js +9 -2
- package/lib/module/components/EndRoomModalContent.js.map +1 -1
- package/lib/module/components/Footer.js +10 -2
- package/lib/module/components/Footer.js.map +1 -1
- package/lib/module/components/HMSDangerButton.js +2 -1
- package/lib/module/components/HMSDangerButton.js.map +1 -1
- package/lib/module/components/HMSHLSStreamLoading.js +5 -3
- package/lib/module/components/HMSHLSStreamLoading.js.map +1 -1
- package/lib/module/components/HMSKeyboardAvoidingView.js +6 -22
- package/lib/module/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/module/components/HMSLiveIndicator.js +3 -3
- package/lib/module/components/HMSLiveIndicator.js.map +1 -1
- package/lib/module/components/HMSLocalScreenshareNotification.js +1 -1
- package/lib/module/components/HMSManageLeave.js +7 -182
- package/lib/module/components/HMSManageLeave.js.map +1 -1
- package/lib/module/components/HMSManageRaiseHand.js +22 -10
- package/lib/module/components/HMSManageRaiseHand.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 +28 -2
- package/lib/module/components/HMSNotifications.js.map +1 -1
- package/lib/module/components/HMSOverlayChatView.js +7 -1
- package/lib/module/components/HMSOverlayChatView.js.map +1 -1
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js +3 -2
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
- package/lib/module/components/HMSPreviewJoinButton.js +9 -4
- package/lib/module/components/HMSPreviewJoinButton.js.map +1 -1
- package/lib/module/components/HMSPreviewTile.js +1 -1
- package/lib/module/components/HMSPreviewTile.js.map +1 -1
- package/lib/module/components/HMSReconnectingNotification.js +24 -0
- package/lib/module/components/HMSReconnectingNotification.js.map +1 -0
- package/lib/module/components/HMSRecordingIndicator.js +4 -1
- package/lib/module/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/module/components/HMSTerminalErrorNotification.js +57 -0
- package/lib/module/components/HMSTerminalErrorNotification.js.map +1 -0
- package/lib/module/components/HMSTextInput.js +3 -3
- package/lib/module/components/HMSTextInput.js.map +1 -1
- package/lib/module/components/LeaveRoomBottomSheet.js +167 -0
- package/lib/module/components/LeaveRoomBottomSheet.js.map +1 -0
- package/lib/module/components/Meeting.js +5 -1
- package/lib/module/components/Meeting.js.map +1 -1
- package/lib/module/components/MeetingScreenContent.js +3 -2
- package/lib/module/components/MeetingScreenContent.js.map +1 -1
- package/lib/module/components/PIPView.js +87 -14
- package/lib/module/components/PIPView.js.map +1 -1
- package/lib/module/components/Participants/MultiRoleParticipantsList.js +56 -0
- package/lib/module/components/Participants/MultiRoleParticipantsList.js.map +1 -0
- package/lib/module/components/Participants/ParticipantsAccordian.js +51 -0
- package/lib/module/components/Participants/ParticipantsAccordian.js.map +1 -0
- package/lib/module/components/Participants/ParticipantsAccordianExpanded.js +16 -0
- package/lib/module/components/Participants/ParticipantsAccordianExpanded.js.map +1 -0
- package/lib/module/components/Participants/ParticipantsGroupFooter.js +53 -0
- package/lib/module/components/Participants/ParticipantsGroupFooter.js.map +1 -0
- package/lib/module/components/Participants/ParticipantsGroupHeader.js +28 -27
- package/lib/module/components/Participants/ParticipantsGroupHeader.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsGroupOptions.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsItem.js +10 -18
- package/lib/module/components/Participants/ParticipantsItem.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsItemOptions.js +24 -2
- package/lib/module/components/Participants/ParticipantsItemOptions.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsList.js +156 -21
- package/lib/module/components/Participants/ParticipantsList.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsListFooter.js +35 -0
- package/lib/module/components/Participants/ParticipantsListFooter.js.map +1 -0
- package/lib/module/components/Participants/ParticipantsSeachInput.js +2 -2
- package/lib/module/components/Participants/ParticipantsSeachInput.js.map +1 -1
- package/lib/module/components/Participants/index.js +1 -0
- package/lib/module/components/Participants/index.js.map +1 -1
- package/lib/module/components/PeerVideoTile/AvatarView.js +5 -5
- package/lib/module/components/PeerVideoTile/AvatarView.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerAudioIndicator.js +14 -7
- package/lib/module/components/PeerVideoTile/PeerAudioIndicator.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerMetadata.js +21 -11
- package/lib/module/components/PeerVideoTile/PeerMetadata.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js +23 -7
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/module/components/Preview.js +6 -2
- package/lib/module/components/Preview.js.map +1 -1
- package/lib/module/components/PreviewForRoleChangeModal.js +2 -7
- package/lib/module/components/PreviewForRoleChangeModal.js.map +1 -1
- package/lib/module/components/RoomSettingsModalContent.js +54 -21
- package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/module/components/RoomSettingsModalDebugModeContent.js +1 -1
- package/lib/module/components/RoomSettingsModalDebugModeContent.js.map +1 -1
- package/lib/module/components/StopRecordingModalContent.js +4 -1
- package/lib/module/components/StopRecordingModalContent.js.map +1 -1
- package/lib/module/components/WebrtcView.js +2 -1
- package/lib/module/components/WebrtcView.js.map +1 -1
- package/lib/module/components/WelcomeInMeeting.js +29 -8
- package/lib/module/components/WelcomeInMeeting.js.map +1 -1
- package/lib/module/hooks-sdk.js +46 -1
- package/lib/module/hooks-sdk.js.map +1 -1
- package/lib/module/hooks-util.js +314 -143
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/redux/actionTypes.js +10 -2
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +32 -1
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/appState.js +17 -1
- package/lib/module/redux/reducers/appState.js.map +1 -1
- package/lib/module/redux/reducers/hmsStates.js +191 -20
- package/lib/module/redux/reducers/hmsStates.js.map +1 -1
- package/lib/module/redux/reducers/userState.js +5 -1
- package/lib/module/redux/reducers/userState.js.map +1 -1
- package/lib/module/types.js +9 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/functions.js.map +1 -1
- package/lib/module/utils/types.js +12 -0
- package/lib/module/utils/types.js.map +1 -1
- package/lib/module/utils.js +0 -6
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/HMSPrebuilt.d.ts +2 -16
- package/lib/typescript/HMSPrebuilt.d.ts.map +1 -1
- package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
- package/lib/typescript/Icons/Chevron/index.d.ts +1 -1
- package/lib/typescript/Icons/Chevron/index.d.ts.map +1 -1
- package/lib/typescript/Icons/Hand/index.d.ts +1 -0
- package/lib/typescript/Icons/Hand/index.d.ts.map +1 -1
- package/lib/typescript/Icons/Leave/index.d.ts.map +1 -1
- package/lib/typescript/Icons/Recording/index.d.ts +1 -0
- package/lib/typescript/Icons/Recording/index.d.ts.map +1 -1
- package/lib/typescript/Icons/WelcomeHand/index.d.ts +7 -0
- package/lib/typescript/Icons/WelcomeHand/index.d.ts.map +1 -0
- package/lib/typescript/Icons/index.d.ts +1 -0
- package/lib/typescript/Icons/index.d.ts.map +1 -1
- package/lib/typescript/components/ChangeNameModalContent.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsHeader.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ParticipantsView.d.ts.map +1 -1
- package/lib/typescript/components/DisplayView.d.ts.map +1 -1
- package/lib/typescript/components/EndRoomModal.d.ts +6 -0
- package/lib/typescript/components/EndRoomModal.d.ts.map +1 -0
- package/lib/typescript/components/EndRoomModalContent.d.ts.map +1 -1
- package/lib/typescript/components/Footer.d.ts +1 -0
- package/lib/typescript/components/Footer.d.ts.map +1 -1
- package/lib/typescript/components/HMSDangerButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSHLSStreamLoading.d.ts.map +1 -1
- package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts +1 -0
- package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts.map +1 -1
- package/lib/typescript/components/HMSManageLeave.d.ts.map +1 -1
- package/lib/typescript/components/HMSManageRaiseHand.d.ts.map +1 -1
- package/lib/typescript/components/HMSNotification.d.ts +1 -0
- package/lib/typescript/components/HMSNotification.d.ts.map +1 -1
- package/lib/typescript/components/HMSNotifications.d.ts +1 -0
- package/lib/typescript/components/HMSNotifications.d.ts.map +1 -1
- package/lib/typescript/components/HMSOverlayChatView.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewJoinButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSReconnectingNotification.d.ts +5 -0
- package/lib/typescript/components/HMSReconnectingNotification.d.ts.map +1 -0
- package/lib/typescript/components/HMSRecordingIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSTerminalErrorNotification.d.ts +10 -0
- package/lib/typescript/components/HMSTerminalErrorNotification.d.ts.map +1 -0
- package/lib/typescript/components/LeaveRoomBottomSheet.d.ts +6 -0
- package/lib/typescript/components/LeaveRoomBottomSheet.d.ts.map +1 -0
- package/lib/typescript/components/Meeting.d.ts.map +1 -1
- package/lib/typescript/components/PIPView.d.ts +2 -1
- package/lib/typescript/components/PIPView.d.ts.map +1 -1
- package/lib/typescript/components/Participants/MultiRoleParticipantsList.d.ts +7 -0
- package/lib/typescript/components/Participants/MultiRoleParticipantsList.d.ts.map +1 -0
- package/lib/typescript/components/Participants/ParticipantsAccordian.d.ts +11 -0
- package/lib/typescript/components/Participants/ParticipantsAccordian.d.ts.map +1 -0
- package/lib/typescript/components/Participants/ParticipantsAccordianExpanded.d.ts +9 -0
- package/lib/typescript/components/Participants/ParticipantsAccordianExpanded.d.ts.map +1 -0
- package/lib/typescript/components/Participants/ParticipantsGroupFooter.d.ts +9 -0
- package/lib/typescript/components/Participants/ParticipantsGroupFooter.d.ts.map +1 -0
- package/lib/typescript/components/Participants/ParticipantsGroupHeader.d.ts +6 -3
- package/lib/typescript/components/Participants/ParticipantsGroupHeader.d.ts.map +1 -1
- package/lib/typescript/components/Participants/ParticipantsGroupOptions.d.ts +0 -2
- package/lib/typescript/components/Participants/ParticipantsGroupOptions.d.ts.map +1 -1
- package/lib/typescript/components/Participants/ParticipantsItem.d.ts +3 -3
- package/lib/typescript/components/Participants/ParticipantsItem.d.ts.map +1 -1
- package/lib/typescript/components/Participants/ParticipantsItemOptions.d.ts +2 -2
- package/lib/typescript/components/Participants/ParticipantsItemOptions.d.ts.map +1 -1
- package/lib/typescript/components/Participants/ParticipantsList.d.ts +3 -4
- package/lib/typescript/components/Participants/ParticipantsList.d.ts.map +1 -1
- package/lib/typescript/components/Participants/ParticipantsListFooter.d.ts +6 -0
- package/lib/typescript/components/Participants/ParticipantsListFooter.d.ts.map +1 -0
- package/lib/typescript/components/Participants/index.d.ts +1 -0
- package/lib/typescript/components/Participants/index.d.ts.map +1 -1
- package/lib/typescript/components/PeerVideoTile/PeerAudioIndicator.d.ts.map +1 -1
- package/lib/typescript/components/PeerVideoTile/PeerMetadata.d.ts +1 -0
- package/lib/typescript/components/PeerVideoTile/PeerMetadata.d.ts.map +1 -1
- package/lib/typescript/components/PeerVideoTile/PeerVideoTileView.d.ts.map +1 -1
- package/lib/typescript/components/Preview.d.ts.map +1 -1
- package/lib/typescript/components/PreviewForRoleChangeModal.d.ts.map +1 -1
- package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/StopRecordingModalContent.d.ts.map +1 -1
- package/lib/typescript/components/WebrtcView.d.ts.map +1 -1
- package/lib/typescript/components/WelcomeInMeeting.d.ts.map +1 -1
- package/lib/typescript/hooks-sdk.d.ts +4 -0
- package/lib/typescript/hooks-sdk.d.ts.map +1 -1
- package/lib/typescript/hooks-util.d.ts +29 -26
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +7 -1
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +36 -14
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +6 -8
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/appState.d.ts +4 -5
- package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/hmsStates.d.ts +16 -3
- package/lib/typescript/redux/reducers/hmsStates.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +6 -8
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/userState.d.ts +2 -2
- package/lib/typescript/redux/reducers/userState.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +79 -0
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils/functions.d.ts +0 -1
- package/lib/typescript/utils/functions.d.ts.map +1 -1
- package/lib/typescript/utils/types.d.ts +25 -0
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/lib/typescript/utils.d.ts +0 -5
- package/lib/typescript/utils.d.ts.map +1 -1
- package/package.json +3 -4
- package/src/HMSPrebuilt.tsx +35 -29
- package/src/HMSRoomSetup.tsx +105 -53
- package/src/Icons/Chevron/index.tsx +9 -2
- package/src/Icons/Hand/assets/hand-off.png +0 -0
- package/src/Icons/Hand/assets/hand-off@2x.png +0 -0
- package/src/Icons/Hand/assets/hand-off@3x.png +0 -0
- package/src/Icons/Hand/index.tsx +13 -3
- package/src/Icons/Leave/index.tsx +7 -1
- package/src/Icons/Recording/assets/recording-off.png +0 -0
- package/src/Icons/Recording/assets/recording-off@2x.png +0 -0
- package/src/Icons/Recording/assets/recording-off@3x.png +0 -0
- package/src/Icons/Recording/index.tsx +9 -2
- package/src/Icons/WelcomeHand/assets/welcome-hand.png +0 -0
- package/src/Icons/WelcomeHand/assets/welcome-hand@2x.png +0 -0
- package/src/Icons/WelcomeHand/assets/welcome-hand@3x.png +0 -0
- package/src/Icons/WelcomeHand/index.tsx +27 -0
- package/src/Icons/index.ts +1 -0
- package/src/components/ChangeNameModalContent.tsx +28 -9
- package/src/components/ChatAndParticipants/ChatAndParticipantsHeader.tsx +6 -3
- package/src/components/ChatAndParticipants/ParticipantsView.tsx +21 -13
- package/src/components/DisplayView.tsx +6 -0
- package/src/components/EndRoomModal.tsx +24 -0
- package/src/components/EndRoomModalContent.tsx +9 -2
- package/src/components/Footer.tsx +18 -2
- package/src/components/HMSDangerButton.tsx +2 -1
- package/src/components/HMSHLSStreamLoading.tsx +9 -3
- package/src/components/HMSKeyboardAvoidingView.tsx +8 -26
- package/src/components/HMSLiveIndicator.tsx +3 -3
- package/src/components/HMSLocalScreenshareNotification.tsx +1 -1
- package/src/components/HMSManageLeave.tsx +6 -229
- package/src/components/HMSManageRaiseHand.tsx +20 -13
- package/src/components/HMSNotification.tsx +4 -2
- package/src/components/HMSNotifications.tsx +41 -7
- package/src/components/HMSOverlayChatView.tsx +6 -1
- package/src/components/HMSPreviewHLSLiveIndicator.tsx +3 -2
- package/src/components/HMSPreviewJoinButton.tsx +15 -4
- package/src/components/HMSPreviewTile.tsx +1 -1
- package/src/components/HMSReconnectingNotification.tsx +27 -0
- package/src/components/HMSRecordingIndicator.tsx +3 -1
- package/src/components/HMSTerminalErrorNotification.tsx +70 -0
- package/src/components/HMSTextInput.tsx +3 -3
- package/src/components/LeaveRoomBottomSheet.tsx +199 -0
- package/src/components/Meeting.tsx +7 -0
- package/src/components/MeetingScreenContent.tsx +2 -2
- package/src/components/PIPView.tsx +124 -15
- package/src/components/Participants/MultiRoleParticipantsList.tsx +70 -0
- package/src/components/Participants/ParticipantsAccordian.tsx +70 -0
- package/src/components/Participants/ParticipantsAccordianExpanded.tsx +27 -0
- package/src/components/Participants/ParticipantsGroupFooter.tsx +65 -0
- package/src/components/Participants/ParticipantsGroupHeader.tsx +37 -37
- package/src/components/Participants/ParticipantsGroupOptions.tsx +1 -6
- package/src/components/Participants/ParticipantsItem.tsx +16 -33
- package/src/components/Participants/ParticipantsItemOptions.tsx +28 -6
- package/src/components/Participants/ParticipantsList.tsx +197 -34
- package/src/components/Participants/ParticipantsListFooter.tsx +45 -0
- package/src/components/Participants/ParticipantsSeachInput.tsx +2 -2
- package/src/components/Participants/index.ts +1 -0
- package/src/components/PeerVideoTile/AvatarView.tsx +5 -5
- package/src/components/PeerVideoTile/PeerAudioIndicator.tsx +17 -7
- package/src/components/PeerVideoTile/PeerMetadata.tsx +21 -12
- package/src/components/PeerVideoTile/PeerVideoTileView.tsx +28 -9
- package/src/components/Preview.tsx +23 -9
- package/src/components/PreviewForRoleChangeModal.tsx +2 -7
- package/src/components/RoomSettingsModalContent.tsx +49 -18
- package/src/components/RoomSettingsModalDebugModeContent.tsx +1 -1
- package/src/components/StopRecordingModalContent.tsx +3 -1
- package/src/components/WebrtcView.tsx +10 -1
- package/src/components/WelcomeInMeeting.tsx +33 -5
- package/src/hooks-sdk.ts +58 -0
- package/src/hooks-util.ts +462 -209
- package/src/index.ts +2 -0
- package/src/redux/actionTypes.ts +11 -1
- package/src/redux/actions/index.ts +36 -8
- package/src/redux/reducers/appState.ts +18 -1
- package/src/redux/reducers/hmsStates.ts +269 -36
- package/src/redux/reducers/userState.ts +7 -3
- package/src/types.ts +71 -0
- package/src/utils/functions.ts +0 -1
- package/src/utils/types.ts +29 -0
- package/src/utils.ts +0 -6
- package/lib/commonjs/assets/welcome.png +0 -0
- package/lib/module/assets/welcome.png +0 -0
- package/src/assets/welcome.png +0 -0
package/lib/module/hooks-util.js
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { HMSConfig, HMSMessage, HMSMessageRecipientType, HMSPIPListenerActions, HMSPeerUpdate, HMSRoomUpdate, HMSTrackSource, HMSTrackType, HMSTrackUpdate, HMSUpdateListenerActions, HMSMessageRecipient
|
|
1
|
+
import { HMSConfig, HMSMessage, HMSMessageRecipientType, HMSPIPListenerActions, HMSPeerUpdate, HMSRoomUpdate, HMSTrackSource, HMSTrackType, HMSTrackUpdate, HMSUpdateListenerActions, HMSMessageRecipient, useHMSHLSPlayerResolution, useHmsViewsResolutionsState
|
|
2
2
|
// useHMSPeerUpdates,
|
|
3
3
|
} from '@100mslive/react-native-hms';
|
|
4
4
|
import Toast from 'react-native-simple-toast';
|
|
5
5
|
import { useRef, useCallback, useEffect, useState, useMemo, useContext } from 'react';
|
|
6
|
-
import { MaxTilesInOnePage, ModalTypes, PipModes } from './utils/types';
|
|
7
|
-
import { createPeerTrackNode
|
|
6
|
+
import { MaxTilesInOnePage, ModalTypes, OnLeaveReason, PeerListRefreshInterval, PipModes } from './utils/types';
|
|
7
|
+
import { createPeerTrackNode } from './utils/functions';
|
|
8
8
|
import { batch, shallowEqual, useDispatch, useSelector, useStore } from 'react-redux';
|
|
9
|
-
import { addMessage, addNotification, addParticipant, addPinnedMessage, addScreenshareTile, addUpdateParticipant, changeMeetingState, changePipModeStatus, changeStartingHLSStream, clearStore, removeNotification, removeParticipant, removeScreenshareTile, saveUserData, setActiveChatBottomSheetTab, setActiveSpeakers, setFullScreenPeerTrackNode, setHMSLocalPeerState, setHMSRoleState, setHMSRoomState, setIsLocalAudioMutedState, setIsLocalVideoMutedState, setLayoutConfig, setLocalPeerTrackNode, setMiniViewPeerTrackNode, setModalType, setReconnecting, setRoleChangeRequest, setStartingOrStoppingRecording, updateFullScreenPeerTrackNode, updateLocalPeerTrackNode, updateMiniViewPeerTrackNode, updateScreenshareTile } from './redux/actions';
|
|
9
|
+
import { addMessage, addNotification, addParticipant, addParticipants, addPinnedMessage, addScreenshareTile, addUpdateParticipant, changeMeetingState, changePipModeStatus, changeStartingHLSStream, clearStore, removeNotification, removeParticipant, removeParticipants, removeScreenshareTile, replaceParticipantsList, saveUserData, setActiveChatBottomSheetTab, setActiveSpeakers, setAutoEnterPipMode, setFullScreenPeerTrackNode, setHMSLocalPeerState, setHMSRoleState, setHMSRoomState, setHandleBackButton, setIsLocalAudioMutedState, setIsLocalVideoMutedState, setLayoutConfig, setLocalPeerTrackNode, setMiniViewPeerTrackNode, setModalType, setOnLeaveHandler, setPrebuiltData, setReconnecting, setRoleChangeRequest, setStartingOrStoppingRecording, updateFullScreenPeerTrackNode, updateLocalPeerTrackNode, updateMiniViewPeerTrackNode, updateScreenshareTile } from './redux/actions';
|
|
10
10
|
import { createPeerTrackNodeUniqueId, degradeOrRestorePeerTrackNodes, peerTrackNodeExistForPeer, peerTrackNodeExistForPeerAndTrack, removePeerTrackNodes, removePeerTrackNodesWithTrack, replacePeerTrackNodes, replacePeerTrackNodesWithTrack } from './peerTrackNodeUtils';
|
|
11
11
|
import { MeetingState } from './types';
|
|
12
|
-
import {
|
|
12
|
+
import { BackHandler, InteractionManager, Keyboard, Platform } from 'react-native';
|
|
13
13
|
import { NavigationContext } from '@react-navigation/native';
|
|
14
14
|
import { useIsLandscapeOrientation, useIsPortraitOrientation } from './utils/dimension';
|
|
15
15
|
import { selectChatLayoutConfig, selectConferencingScreenConfig, selectIsHLSViewer, selectLayoutConfigForRole, selectShouldGoLive, selectVideoTileLayoutConfig } from './hooks-util-selectors';
|
|
16
16
|
import { getRoomLayout } from './modules/HMSManager';
|
|
17
17
|
import { DEFAULT_THEME, DEFAULT_TYPOGRAPHY } from './utils/theme';
|
|
18
|
-
import { NotificationTypes } from './
|
|
18
|
+
import { NotificationTypes } from './types';
|
|
19
19
|
export const useHMSListeners = setPeerTrackNodes => {
|
|
20
20
|
const hmsInstance = useHMSInstance();
|
|
21
21
|
const updateLocalPeer = useUpdateHMSLocalPeer(hmsInstance);
|
|
22
22
|
useHMSRoomUpdate(hmsInstance);
|
|
23
23
|
useHMSPeersUpdate(hmsInstance, updateLocalPeer, setPeerTrackNodes);
|
|
24
|
+
useHMSPeerListUpdated(hmsInstance);
|
|
24
25
|
useHMSTrackUpdate(hmsInstance, updateLocalPeer, setPeerTrackNodes);
|
|
25
26
|
};
|
|
26
27
|
const useHMSRoomUpdate = hmsInstance => {
|
|
@@ -216,11 +217,11 @@ const useHMSPeersUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
|
|
|
216
217
|
}
|
|
217
218
|
return;
|
|
218
219
|
}
|
|
219
|
-
if (type === HMSPeerUpdate.METADATA_CHANGED || type === HMSPeerUpdate.NAME_CHANGED || type === HMSPeerUpdate.NETWORK_QUALITY_UPDATED) {
|
|
220
|
+
if (type === HMSPeerUpdate.METADATA_CHANGED || type === HMSPeerUpdate.HAND_RAISED_CHANGED || type === HMSPeerUpdate.NAME_CHANGED || type === HMSPeerUpdate.NETWORK_QUALITY_UPDATED) {
|
|
220
221
|
dispatch(addUpdateParticipant(peer));
|
|
221
222
|
const reduxState = store.getState();
|
|
222
|
-
if (type === HMSPeerUpdate.
|
|
223
|
-
const handRaised =
|
|
223
|
+
if (type === HMSPeerUpdate.HAND_RAISED_CHANGED) {
|
|
224
|
+
const handRaised = peer.isHandRaised;
|
|
224
225
|
if (handRaised) {
|
|
225
226
|
var _selectedLayoutConfig, _peer$role11, _reduxState$hmsStates;
|
|
226
227
|
const {
|
|
@@ -283,6 +284,25 @@ const useHMSPeersUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
|
|
|
283
284
|
};
|
|
284
285
|
}, [hmsInstance]);
|
|
285
286
|
};
|
|
287
|
+
const useHMSPeerListUpdated = hmsInstance => {
|
|
288
|
+
const dispatch = useDispatch();
|
|
289
|
+
useEffect(() => {
|
|
290
|
+
const peerListUpdateHandler = _ref2 => {
|
|
291
|
+
let {
|
|
292
|
+
addedPeers,
|
|
293
|
+
removedPeers
|
|
294
|
+
} = _ref2;
|
|
295
|
+
batch(() => {
|
|
296
|
+
dispatch(addParticipants(addedPeers));
|
|
297
|
+
dispatch(removeParticipants(removedPeers));
|
|
298
|
+
});
|
|
299
|
+
};
|
|
300
|
+
hmsInstance.addEventListener(HMSUpdateListenerActions.ON_PEER_LIST_UPDATED, peerListUpdateHandler);
|
|
301
|
+
return () => {
|
|
302
|
+
hmsInstance.removeEventListener(HMSUpdateListenerActions.ON_PEER_LIST_UPDATED);
|
|
303
|
+
};
|
|
304
|
+
}, [hmsInstance]);
|
|
305
|
+
};
|
|
286
306
|
export const isPublishingAllowed = peer => {
|
|
287
307
|
var _peer$role12, _peer$role13;
|
|
288
308
|
return (((_peer$role12 = peer.role) === null || _peer$role12 === void 0 || (_peer$role12 = _peer$role12.publishSettings) === null || _peer$role12 === void 0 ? void 0 : _peer$role12.allowed) && ((_peer$role13 = peer.role) === null || _peer$role13 === void 0 || (_peer$role13 = _peer$role13.publishSettings) === null || _peer$role13 === void 0 || (_peer$role13 = _peer$role13.allowed) === null || _peer$role13 === void 0 ? void 0 : _peer$role13.length) > 0) ?? false;
|
|
@@ -291,13 +311,13 @@ const useHMSTrackUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
|
|
|
291
311
|
const dispatch = useDispatch();
|
|
292
312
|
const store = useStore();
|
|
293
313
|
useEffect(() => {
|
|
294
|
-
const trackUpdateHandler =
|
|
314
|
+
const trackUpdateHandler = _ref3 => {
|
|
295
315
|
var _reduxState$hmsStates2, _selectVideoTileLayou2;
|
|
296
316
|
let {
|
|
297
317
|
peer,
|
|
298
318
|
track,
|
|
299
319
|
type
|
|
300
|
-
} =
|
|
320
|
+
} = _ref3;
|
|
301
321
|
const reduxState = store.getState();
|
|
302
322
|
const fullScreenPeerTrackNode = reduxState.app.fullScreenPeerTrackNode;
|
|
303
323
|
const miniviewPeerTrackNode = reduxState.app.miniviewPeerTrackNode;
|
|
@@ -747,10 +767,10 @@ export const useHMSSessionStore = () => {
|
|
|
747
767
|
const hmsInstance = useHMSInstance();
|
|
748
768
|
const dispatch = useDispatch();
|
|
749
769
|
useEffect(() => {
|
|
750
|
-
const onSessionStoreAvailableListener =
|
|
770
|
+
const onSessionStoreAvailableListener = _ref4 => {
|
|
751
771
|
let {
|
|
752
772
|
sessionStore
|
|
753
|
-
} =
|
|
773
|
+
} = _ref4;
|
|
754
774
|
// Saving `sessionStore` reference in `redux`
|
|
755
775
|
dispatch(saveUserData({
|
|
756
776
|
hmsSessionStore: sessionStore
|
|
@@ -804,12 +824,21 @@ export const useHMSReconnection = () => {
|
|
|
804
824
|
let mounted = true;
|
|
805
825
|
hmsInstance.addEventListener(HMSUpdateListenerActions.RECONNECTING, () => {
|
|
806
826
|
if (mounted) {
|
|
807
|
-
|
|
827
|
+
batch(() => {
|
|
828
|
+
dispatch(setReconnecting(true));
|
|
829
|
+
dispatch(addNotification({
|
|
830
|
+
id: NotificationTypes.RECONNECTING,
|
|
831
|
+
type: NotificationTypes.RECONNECTING
|
|
832
|
+
}));
|
|
833
|
+
});
|
|
808
834
|
}
|
|
809
835
|
});
|
|
810
836
|
hmsInstance.addEventListener(HMSUpdateListenerActions.RECONNECTED, () => {
|
|
811
837
|
if (mounted) {
|
|
812
|
-
|
|
838
|
+
batch(() => {
|
|
839
|
+
dispatch(setReconnecting(false));
|
|
840
|
+
dispatch(removeNotification(NotificationTypes.RECONNECTING));
|
|
841
|
+
});
|
|
813
842
|
}
|
|
814
843
|
});
|
|
815
844
|
return () => {
|
|
@@ -823,10 +852,10 @@ export const useHMSPIPRoomLeave = () => {
|
|
|
823
852
|
const hmsInstance = useHMSInstance();
|
|
824
853
|
const {
|
|
825
854
|
destroy
|
|
826
|
-
} = useLeaveMethods(
|
|
855
|
+
} = useLeaveMethods();
|
|
827
856
|
useEffect(() => {
|
|
828
857
|
const pipRoomLeaveHandler = () => {
|
|
829
|
-
destroy();
|
|
858
|
+
destroy(OnLeaveReason.PIP);
|
|
830
859
|
};
|
|
831
860
|
hmsInstance.addEventListener(HMSPIPListenerActions.ON_PIP_ROOM_LEAVE, pipRoomLeaveHandler);
|
|
832
861
|
return () => {
|
|
@@ -838,10 +867,10 @@ export const useHMSRemovedFromRoomUpdate = () => {
|
|
|
838
867
|
const hmsInstance = useHMSInstance();
|
|
839
868
|
const {
|
|
840
869
|
destroy
|
|
841
|
-
} = useLeaveMethods(
|
|
870
|
+
} = useLeaveMethods();
|
|
842
871
|
useEffect(() => {
|
|
843
|
-
const removedFromRoomHandler =
|
|
844
|
-
destroy();
|
|
872
|
+
const removedFromRoomHandler = data => {
|
|
873
|
+
destroy(data.roomEnded ? OnLeaveReason.ROOM_END : OnLeaveReason.PEER_KICKED);
|
|
845
874
|
};
|
|
846
875
|
hmsInstance.addEventListener(HMSUpdateListenerActions.ON_REMOVED_FROM_ROOM, removedFromRoomHandler);
|
|
847
876
|
return () => {
|
|
@@ -854,18 +883,14 @@ export const usePIPListener = () => {
|
|
|
854
883
|
const dispatch = useDispatch();
|
|
855
884
|
const isPipModeActive = useSelector(state => state.app.pipModeStatus === PipModes.ACTIVE);
|
|
856
885
|
useEffect(() => {
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
dispatch(changePipModeStatus(PipModes.INACTIVE));
|
|
866
|
-
};
|
|
867
|
-
}
|
|
868
|
-
}, [isPipModeActive]);
|
|
886
|
+
const pipModeChangedHandler = data => {
|
|
887
|
+
dispatch(changePipModeStatus(data.isInPictureInPictureMode ? PipModes.ACTIVE : PipModes.INACTIVE));
|
|
888
|
+
};
|
|
889
|
+
hmsInstance.addEventListener(HMSPIPListenerActions.ON_PIP_MODE_CHANGED, pipModeChangedHandler);
|
|
890
|
+
return () => {
|
|
891
|
+
hmsInstance.removeEventListener(HMSPIPListenerActions.ON_PIP_MODE_CHANGED);
|
|
892
|
+
};
|
|
893
|
+
}, []);
|
|
869
894
|
|
|
870
895
|
// Check if PIP is supported or not
|
|
871
896
|
useEffect(() => {
|
|
@@ -892,6 +917,71 @@ export const useHMSNetworkQualityUpdate = () => {
|
|
|
892
917
|
return () => hmsInstance.disableNetworkQualityUpdates();
|
|
893
918
|
}, [hmsInstance]);
|
|
894
919
|
};
|
|
920
|
+
export const useEnableAutoPip = () => {
|
|
921
|
+
const hmsInstance = useHMSInstance();
|
|
922
|
+
const enableAutoPip = useCallback(data => {
|
|
923
|
+
hmsInstance.setPipParams({
|
|
924
|
+
...data,
|
|
925
|
+
autoEnterPipMode: true
|
|
926
|
+
});
|
|
927
|
+
}, [hmsInstance]);
|
|
928
|
+
return enableAutoPip;
|
|
929
|
+
};
|
|
930
|
+
export const useDisableAutoPip = () => {
|
|
931
|
+
const hmsInstance = useHMSInstance();
|
|
932
|
+
const disableAutoPip = useCallback(data => {
|
|
933
|
+
hmsInstance.setPipParams({
|
|
934
|
+
...data,
|
|
935
|
+
autoEnterPipMode: false
|
|
936
|
+
});
|
|
937
|
+
}, [hmsInstance]);
|
|
938
|
+
return disableAutoPip;
|
|
939
|
+
};
|
|
940
|
+
export const useAutoPip = oneToOneCall => {
|
|
941
|
+
const enableAutoPip = useEnableAutoPip();
|
|
942
|
+
const disableAutoPip = useDisableAutoPip();
|
|
943
|
+
const autoEnterPipMode = useSelector(state => state.app.autoEnterPipMode);
|
|
944
|
+
const [numerator, denominator] = usePipAspectRatio(oneToOneCall);
|
|
945
|
+
useEffect(() => {
|
|
946
|
+
if (autoEnterPipMode) {
|
|
947
|
+
enableAutoPip({
|
|
948
|
+
aspectRatio: [numerator, denominator]
|
|
949
|
+
});
|
|
950
|
+
return disableAutoPip;
|
|
951
|
+
}
|
|
952
|
+
}, [numerator, denominator, autoEnterPipMode, enableAutoPip, disableAutoPip]);
|
|
953
|
+
};
|
|
954
|
+
export const usePipAspectRatio = oneToOneCall => {
|
|
955
|
+
const isHLSViewer = useIsHLSViewer();
|
|
956
|
+
const hlsPlayerResolution = useHMSHLSPlayerResolution();
|
|
957
|
+
const firstSSNodeId = useSelector(state => {
|
|
958
|
+
var _ssPeerTrackNode$trac;
|
|
959
|
+
const ssPeerTrackNode = state.app.screensharePeerTrackNodes[0];
|
|
960
|
+
return ssPeerTrackNode === null || ssPeerTrackNode === void 0 || (_ssPeerTrackNode$trac = ssPeerTrackNode.track) === null || _ssPeerTrackNode$trac === void 0 ? void 0 : _ssPeerTrackNode$trac.trackId;
|
|
961
|
+
});
|
|
962
|
+
const ssResolution = useHmsViewsResolutionsState(firstSSNodeId);
|
|
963
|
+
const aspectRatio = useMemo(() => {
|
|
964
|
+
// When user is hlsviewer and we have stream resolution
|
|
965
|
+
if (isHLSViewer && hlsPlayerResolution) {
|
|
966
|
+
return [hlsPlayerResolution.width, hlsPlayerResolution.height];
|
|
967
|
+
}
|
|
968
|
+
// When user is hlsviewer and we don't have stream resolution
|
|
969
|
+
if (isHLSViewer) {
|
|
970
|
+
return [9, 16];
|
|
971
|
+
}
|
|
972
|
+
// When we have screenshare resolution, use it
|
|
973
|
+
if (ssResolution) {
|
|
974
|
+
return [ssResolution.width, ssResolution.height];
|
|
975
|
+
}
|
|
976
|
+
// When there is no screenshare and one-to-one call is happening
|
|
977
|
+
if (!firstSSNodeId && oneToOneCall) {
|
|
978
|
+
return [9, 16];
|
|
979
|
+
}
|
|
980
|
+
// default aspect ratio
|
|
981
|
+
return [16, 9];
|
|
982
|
+
}, [isHLSViewer, firstSSNodeId, oneToOneCall, ssResolution, hlsPlayerResolution]);
|
|
983
|
+
return aspectRatio;
|
|
984
|
+
};
|
|
895
985
|
export const useHMSActiveSpeakerUpdates = (setPeerTrackNodes, active) => {
|
|
896
986
|
const hmsInstance = useHMSInstance();
|
|
897
987
|
const dispatch = useDispatch();
|
|
@@ -1039,17 +1129,15 @@ export const useHMSConfig = () => {
|
|
|
1039
1129
|
username: storeState.user.userName,
|
|
1040
1130
|
captureNetworkQualityInPreview: true,
|
|
1041
1131
|
endpoint: (_storeState$user$endP3 = storeState.user.endPoints) === null || _storeState$user$endP3 === void 0 ? void 0 : _storeState$user$endP3.init
|
|
1042
|
-
// metadata: JSON.stringify({isHandRaised: true}), // To join with hand raised
|
|
1043
1132
|
});
|
|
1044
|
-
|
|
1045
1133
|
return hmsConfig;
|
|
1046
1134
|
}, [hmsInstance]);
|
|
1047
1135
|
const updateConfig = useCallback(data => {
|
|
1048
1136
|
if (!hmsConfig) {
|
|
1049
1137
|
throw new Error('No HMSConfig is available to update!');
|
|
1050
1138
|
}
|
|
1051
|
-
Object.entries(data).forEach(
|
|
1052
|
-
let [key, value] =
|
|
1139
|
+
Object.entries(data).forEach(_ref5 => {
|
|
1140
|
+
let [key, value] = _ref5;
|
|
1053
1141
|
// @ts-ignore
|
|
1054
1142
|
hmsConfig[key] = value;
|
|
1055
1143
|
});
|
|
@@ -1141,21 +1229,69 @@ export const useLandscapeChatViewVisible = () => {
|
|
|
1141
1229
|
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
1142
1230
|
return pipModeNotActive && isLandscapeOrientation && overlayChatVisible;
|
|
1143
1231
|
};
|
|
1144
|
-
export const
|
|
1145
|
-
|
|
1232
|
+
export const useOffStageParticipants = () => {
|
|
1233
|
+
const dispatch = useDispatch();
|
|
1234
|
+
const hmsInstance = useHMSInstance();
|
|
1235
|
+
const offStageRoles = useHMSLayoutConfig(layoutConfig => {
|
|
1236
|
+
var _layoutConfig$screens;
|
|
1237
|
+
return (layoutConfig === null || layoutConfig === void 0 || (_layoutConfig$screens = layoutConfig.screens) === null || _layoutConfig$screens === void 0 || (_layoutConfig$screens = _layoutConfig$screens.conferencing) === null || _layoutConfig$screens === void 0 || (_layoutConfig$screens = _layoutConfig$screens.default) === null || _layoutConfig$screens === void 0 || (_layoutConfig$screens = _layoutConfig$screens.elements) === null || _layoutConfig$screens === void 0 || (_layoutConfig$screens = _layoutConfig$screens.on_stage_exp) === null || _layoutConfig$screens === void 0 ? void 0 : _layoutConfig$screens.off_stage_roles) || null;
|
|
1238
|
+
});
|
|
1239
|
+
const [participantsTotalCounts, setParticipantsTotalCounts] = useState({});
|
|
1240
|
+
useEffect(() => {
|
|
1241
|
+
if (offStageRoles) {
|
|
1242
|
+
let mounted = true;
|
|
1243
|
+
const createIterator = async forRole => {
|
|
1244
|
+
const iterator = hmsInstance.getPeerListIterator({
|
|
1245
|
+
byRoleName: forRole,
|
|
1246
|
+
limit: 10
|
|
1247
|
+
});
|
|
1248
|
+
const participants = await iterator.next();
|
|
1249
|
+
if (mounted) {
|
|
1250
|
+
dispatch(replaceParticipantsList(participants, forRole));
|
|
1251
|
+
setParticipantsTotalCounts(prev => ({
|
|
1252
|
+
...prev,
|
|
1253
|
+
[forRole]: iterator.totalCount
|
|
1254
|
+
}));
|
|
1255
|
+
}
|
|
1256
|
+
};
|
|
1257
|
+
const createIteratorForRoles = () => {
|
|
1258
|
+
offStageRoles.forEach(role => {
|
|
1259
|
+
createIterator(role);
|
|
1260
|
+
});
|
|
1261
|
+
};
|
|
1262
|
+
createIteratorForRoles();
|
|
1263
|
+
const intervalId = setInterval(() => {
|
|
1264
|
+
createIteratorForRoles();
|
|
1265
|
+
}, PeerListRefreshInterval);
|
|
1266
|
+
return () => {
|
|
1267
|
+
mounted = false;
|
|
1268
|
+
clearInterval(intervalId);
|
|
1269
|
+
};
|
|
1270
|
+
}
|
|
1271
|
+
}, [offStageRoles]);
|
|
1272
|
+
return participantsTotalCounts;
|
|
1273
|
+
};
|
|
1274
|
+
export const useFilteredParticipants = filterText => {
|
|
1275
|
+
var _participantsAccordia;
|
|
1146
1276
|
const roles = useSelector(state => state.hmsStates.roles);
|
|
1147
1277
|
const onStageRole = useHMSLayoutConfig(layoutConfig => {
|
|
1148
|
-
var _layoutConfig$
|
|
1149
|
-
return (layoutConfig === null || layoutConfig === void 0 || (_layoutConfig$
|
|
1278
|
+
var _layoutConfig$screens2;
|
|
1279
|
+
return (layoutConfig === null || layoutConfig === void 0 || (_layoutConfig$screens2 = layoutConfig.screens) === null || _layoutConfig$screens2 === void 0 || (_layoutConfig$screens2 = _layoutConfig$screens2.conferencing) === null || _layoutConfig$screens2 === void 0 || (_layoutConfig$screens2 = _layoutConfig$screens2.default) === null || _layoutConfig$screens2 === void 0 || (_layoutConfig$screens2 = _layoutConfig$screens2.elements) === null || _layoutConfig$screens2 === void 0 || (_layoutConfig$screens2 = _layoutConfig$screens2.on_stage_exp) === null || _layoutConfig$screens2 === void 0 ? void 0 : _layoutConfig$screens2.on_stage_role) || null;
|
|
1150
1280
|
});
|
|
1151
|
-
const
|
|
1152
|
-
const formattedSearchText =
|
|
1153
|
-
const
|
|
1154
|
-
const peerGroups = useMemo(() => {
|
|
1155
|
-
return groupParticipantsAsPerRole(participants, formattedSearchText);
|
|
1156
|
-
}, [formattedSearchText, participants]);
|
|
1281
|
+
const offStageParticipantsTotalCounts = useOffStageParticipants();
|
|
1282
|
+
const formattedSearchText = filterText.trim().toLowerCase();
|
|
1283
|
+
const groupedParticipants = useSelector(state => state.hmsStates.groupedParticipants);
|
|
1157
1284
|
const sortedRoles = useMemo(() => {
|
|
1158
|
-
return roles.filter(role =>
|
|
1285
|
+
return roles.filter(role => {
|
|
1286
|
+
if (!role.name || role.name.startsWith('_')) {
|
|
1287
|
+
return false;
|
|
1288
|
+
}
|
|
1289
|
+
return true;
|
|
1290
|
+
|
|
1291
|
+
// const list = groupedParticipants[role.name!];
|
|
1292
|
+
|
|
1293
|
+
// return list && list.length > 0;
|
|
1294
|
+
}).sort((a, b) => {
|
|
1159
1295
|
var _a$publishSettings, _b$publishSettings;
|
|
1160
1296
|
if (onStageRole) {
|
|
1161
1297
|
if (a.name === onStageRole && b.name === onStageRole) {
|
|
@@ -1178,106 +1314,57 @@ export const useFilteredParticipants = () => {
|
|
|
1178
1314
|
}
|
|
1179
1315
|
return 1;
|
|
1180
1316
|
});
|
|
1181
|
-
},
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
const
|
|
1185
|
-
|
|
1186
|
-
const
|
|
1187
|
-
if (handRaisedPeers) {
|
|
1188
|
-
const expanded = expandedGroups.includes('hand-raised');
|
|
1189
|
-
list.push({
|
|
1190
|
-
type: expanded ? 'EXPANDED_HEADER' : 'COLLAPSED_HEADER',
|
|
1191
|
-
key: 'hand-raised',
|
|
1192
|
-
data: {
|
|
1193
|
-
label: `Hand Raised (${handRaisedPeers.length})`,
|
|
1194
|
-
itemsLength: handRaisedPeers.length
|
|
1195
|
-
}
|
|
1196
|
-
});
|
|
1197
|
-
if (expanded) {
|
|
1198
|
-
list = list.concat(handRaisedPeers.map((peer, idx, arr) => {
|
|
1199
|
-
const isLast = arr.length - 1 === idx;
|
|
1200
|
-
return {
|
|
1201
|
-
data: peer,
|
|
1202
|
-
key: `${peer.peerID}--${'hand-raised'}`,
|
|
1203
|
-
type: isLast ? 'LAST_ITEM' : 'REGULAR_ITEM'
|
|
1204
|
-
};
|
|
1205
|
-
}));
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1317
|
+
},
|
|
1318
|
+
// [groupedParticipants, onStageRole, roles]
|
|
1319
|
+
[onStageRole, roles]);
|
|
1320
|
+
const participantsAccordianData = useMemo(() => {
|
|
1321
|
+
const t = [];
|
|
1322
|
+
const filteredHandRaisedPeers = [];
|
|
1208
1323
|
sortedRoles.forEach(role => {
|
|
1209
|
-
const
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1324
|
+
const list = groupedParticipants[role.name];
|
|
1325
|
+
const filteredList = Array.isArray(list) && formattedSearchText.length > 0 ? list.filter(peer => peer.name.toLowerCase().includes(formattedSearchText)) : list;
|
|
1326
|
+
if (Array.isArray(filteredList) && filteredList.length > 0) {
|
|
1327
|
+
filteredHandRaisedPeers.push(filteredList);
|
|
1328
|
+
const offStageRoleTotalCount = offStageParticipantsTotalCounts[role.name];
|
|
1329
|
+
const firstTen = filteredList.slice(0, 10);
|
|
1330
|
+
t.push({
|
|
1331
|
+
id: role.name,
|
|
1332
|
+
label: `${role.name} (${typeof offStageRoleTotalCount === 'number' ? offStageRoleTotalCount : filteredList.length})`,
|
|
1333
|
+
showViewAll: typeof offStageRoleTotalCount === 'number' && formattedSearchText.length <= 0 ? offStageRoleTotalCount > 10 : filteredList.length > 10,
|
|
1334
|
+
data: firstTen
|
|
1220
1335
|
});
|
|
1221
|
-
if (expanded) {
|
|
1222
|
-
list = list.concat(peers.map((peer, idx, arr) => {
|
|
1223
|
-
const isLast = arr.length - 1 === idx;
|
|
1224
|
-
return {
|
|
1225
|
-
data: peer,
|
|
1226
|
-
key: `${peer.peerID}--${role.name}`,
|
|
1227
|
-
type: isLast ? 'LAST_ITEM' : 'REGULAR_ITEM'
|
|
1228
|
-
};
|
|
1229
|
-
}));
|
|
1230
|
-
}
|
|
1231
1336
|
}
|
|
1232
1337
|
});
|
|
1233
|
-
|
|
1234
|
-
|
|
1338
|
+
const handRaisedParticipants = filteredHandRaisedPeers.flat().filter(participant => participant.isHandRaised);
|
|
1339
|
+
const firstTenHandRaisedParticipants = handRaisedParticipants.slice(0, 10);
|
|
1340
|
+
if (handRaisedParticipants.length > 0) {
|
|
1341
|
+
t.unshift({
|
|
1342
|
+
id: 'hand-raised',
|
|
1343
|
+
label: `Hand Raised (${handRaisedParticipants.length})`,
|
|
1344
|
+
showViewAll: handRaisedParticipants.length > 10,
|
|
1345
|
+
data: firstTenHandRaisedParticipants
|
|
1346
|
+
});
|
|
1347
|
+
}
|
|
1348
|
+
return t;
|
|
1349
|
+
}, [formattedSearchText, groupedParticipants, offStageParticipantsTotalCounts, sortedRoles]);
|
|
1350
|
+
const [expandedGroup, setExpandedGroup] = useState(((_participantsAccordia = participantsAccordianData[0]) === null || _participantsAccordia === void 0 ? void 0 : _participantsAccordia.id) ?? null);
|
|
1235
1351
|
return {
|
|
1236
|
-
data:
|
|
1237
|
-
searchText,
|
|
1352
|
+
data: participantsAccordianData,
|
|
1238
1353
|
formattedSearchText,
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
setExpandedGroups
|
|
1354
|
+
expandedGroup,
|
|
1355
|
+
setExpandedGroup
|
|
1242
1356
|
};
|
|
1243
1357
|
};
|
|
1244
|
-
const groupParticipantsAsPerRole = (participants, searchText) => {
|
|
1245
|
-
const groups = new Map();
|
|
1246
|
-
for (const participant of participants) {
|
|
1247
|
-
const participantRole = participant.role;
|
|
1248
|
-
if (!participantRole) {
|
|
1249
|
-
continue;
|
|
1250
|
-
}
|
|
1251
|
-
if (searchText.length <= 0 || participant.name.toLowerCase().includes(searchText)) {
|
|
1252
|
-
if (!groups.has(participantRole.name)) {
|
|
1253
|
-
groups.set(participantRole.name, []);
|
|
1254
|
-
}
|
|
1255
|
-
const group = groups.get(participantRole.name);
|
|
1256
|
-
if (!group) {
|
|
1257
|
-
continue;
|
|
1258
|
-
}
|
|
1259
|
-
group.push(participant);
|
|
1260
|
-
if (parseMetadata(participant.metadata).isHandRaised) {
|
|
1261
|
-
if (!groups.has('hand-raised')) {
|
|
1262
|
-
groups.set('hand-raised', []);
|
|
1263
|
-
}
|
|
1264
|
-
const group = groups.get('hand-raised');
|
|
1265
|
-
if (group) group.push(participant);
|
|
1266
|
-
}
|
|
1267
|
-
}
|
|
1268
|
-
}
|
|
1269
|
-
return groups;
|
|
1270
|
-
};
|
|
1271
1358
|
export const useShouldGoLive = () => {
|
|
1272
1359
|
const shouldGoLive = useSelector(selectShouldGoLive);
|
|
1273
1360
|
return shouldGoLive;
|
|
1274
1361
|
};
|
|
1275
|
-
export const useLeaveMethods =
|
|
1362
|
+
export const useLeaveMethods = () => {
|
|
1276
1363
|
const navigation = useContext(NavigationContext);
|
|
1277
1364
|
const hmsInstance = useHMSInstance();
|
|
1278
1365
|
const dispatch = useDispatch();
|
|
1279
1366
|
const reduxStore = useStore();
|
|
1280
|
-
const destroy = useCallback(
|
|
1367
|
+
const destroy = useCallback(reason => {
|
|
1281
1368
|
try {
|
|
1282
1369
|
const s = hmsInstance.destroy();
|
|
1283
1370
|
console.log('Destroy Success: ', s);
|
|
@@ -1303,9 +1390,9 @@ export const useLeaveMethods = isUnmounted => {
|
|
|
1303
1390
|
|
|
1304
1391
|
const onLeave = reduxStore.getState().user.onLeave;
|
|
1305
1392
|
if (typeof onLeave === 'function') {
|
|
1306
|
-
onLeave();
|
|
1393
|
+
onLeave(reason);
|
|
1307
1394
|
dispatch(clearStore());
|
|
1308
|
-
} else if (navigation && navigation.canGoBack
|
|
1395
|
+
} else if (navigation && typeof navigation.canGoBack === 'function' && navigation.canGoBack()) {
|
|
1309
1396
|
navigation.goBack();
|
|
1310
1397
|
dispatch(clearStore());
|
|
1311
1398
|
} else {
|
|
@@ -1319,8 +1406,8 @@ export const useLeaveMethods = isUnmounted => {
|
|
|
1319
1406
|
return Promise.reject(e);
|
|
1320
1407
|
}
|
|
1321
1408
|
}, [hmsInstance]);
|
|
1322
|
-
const leave = useCallback(async function () {
|
|
1323
|
-
let shouldEndStream = arguments.length >
|
|
1409
|
+
const leave = useCallback(async function (reason) {
|
|
1410
|
+
let shouldEndStream = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1324
1411
|
if (shouldEndStream) {
|
|
1325
1412
|
hmsInstance.stopHLSStreaming().catch(error => {
|
|
1326
1413
|
console.log('Stop HLS Streaming Error: ', error);
|
|
@@ -1329,26 +1416,26 @@ export const useLeaveMethods = isUnmounted => {
|
|
|
1329
1416
|
try {
|
|
1330
1417
|
const d = await hmsInstance.leave();
|
|
1331
1418
|
console.log('Leave Success: ', d);
|
|
1332
|
-
await destroy();
|
|
1419
|
+
await destroy(reason);
|
|
1333
1420
|
} catch (e) {
|
|
1334
1421
|
console.log(`Leave Room Error: ${e}`);
|
|
1335
1422
|
Toast.showWithGravity(`Leave Room Error: ${e}`, Toast.LONG, Toast.TOP);
|
|
1336
1423
|
}
|
|
1337
1424
|
}, [destroy, hmsInstance]);
|
|
1338
|
-
const
|
|
1425
|
+
const prebuiltCleanUp = useCallback(async () => {
|
|
1339
1426
|
try {
|
|
1340
1427
|
await hmsInstance.leave();
|
|
1341
1428
|
await hmsInstance.destroy();
|
|
1342
1429
|
dispatch(clearStore());
|
|
1343
1430
|
} catch (error) {
|
|
1344
|
-
Toast.showWithGravity(`Unable to
|
|
1431
|
+
Toast.showWithGravity(`Unable to leave or destroy: ${error}`, Toast.LONG, Toast.TOP);
|
|
1345
1432
|
}
|
|
1346
1433
|
}, [hmsInstance]);
|
|
1347
|
-
const endRoom = useCallback(async
|
|
1434
|
+
const endRoom = useCallback(async reason => {
|
|
1348
1435
|
try {
|
|
1349
1436
|
const d = await hmsInstance.endRoom('Host ended the room');
|
|
1350
1437
|
console.log('EndRoom Success: ', d);
|
|
1351
|
-
await destroy();
|
|
1438
|
+
await destroy(reason);
|
|
1352
1439
|
} catch (e) {
|
|
1353
1440
|
console.log('EndRoom Error: ', e);
|
|
1354
1441
|
}
|
|
@@ -1357,7 +1444,7 @@ export const useLeaveMethods = isUnmounted => {
|
|
|
1357
1444
|
destroy,
|
|
1358
1445
|
leave,
|
|
1359
1446
|
endRoom,
|
|
1360
|
-
|
|
1447
|
+
prebuiltCleanUp
|
|
1361
1448
|
};
|
|
1362
1449
|
};
|
|
1363
1450
|
|
|
@@ -1444,10 +1531,10 @@ export const useSendMessage = () => {
|
|
|
1444
1531
|
type: 'SET_TYPED_MESSAGE',
|
|
1445
1532
|
typedMessage: ''
|
|
1446
1533
|
});
|
|
1447
|
-
const handleMessageID =
|
|
1534
|
+
const handleMessageID = _ref6 => {
|
|
1448
1535
|
let {
|
|
1449
1536
|
messageId
|
|
1450
|
-
} =
|
|
1537
|
+
} = _ref6;
|
|
1451
1538
|
const localPeer = reduxStore.getState().hmsStates.localPeer;
|
|
1452
1539
|
if (messageId) {
|
|
1453
1540
|
Keyboard.dismiss();
|
|
@@ -1495,4 +1582,88 @@ export const useHMSConferencingScreenConfig = (selector, equalityFn) => {
|
|
|
1495
1582
|
return selector(conferencingScreenConfig);
|
|
1496
1583
|
}, equalityFn);
|
|
1497
1584
|
};
|
|
1585
|
+
export const useBackButtonPress = () => {
|
|
1586
|
+
const {
|
|
1587
|
+
handleModalVisibleType
|
|
1588
|
+
} = useModalType();
|
|
1589
|
+
const handleBackPress = useSelector(state => state.app.handleBackButton);
|
|
1590
|
+
useEffect(() => {
|
|
1591
|
+
if (handleBackPress) {
|
|
1592
|
+
const backPressHandler = () => {
|
|
1593
|
+
handleModalVisibleType(ModalTypes.LEAVE_ROOM);
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* When true is returned the event will not be bubbled up
|
|
1597
|
+
* & no other back action will execute
|
|
1598
|
+
*/
|
|
1599
|
+
return true;
|
|
1600
|
+
|
|
1601
|
+
/**
|
|
1602
|
+
* Returning false will let the event to bubble up & let other event listeners
|
|
1603
|
+
* or the system's default back action to be executed.
|
|
1604
|
+
*/
|
|
1605
|
+
// return false;
|
|
1606
|
+
};
|
|
1607
|
+
|
|
1608
|
+
const subscription = BackHandler.addEventListener('hardwareBackPress', backPressHandler);
|
|
1609
|
+
return () => {
|
|
1610
|
+
if (typeof subscription.remove === 'function') {
|
|
1611
|
+
subscription.remove();
|
|
1612
|
+
} else {
|
|
1613
|
+
BackHandler.removeEventListener('hardwareBackPress', backPressHandler);
|
|
1614
|
+
}
|
|
1615
|
+
};
|
|
1616
|
+
}
|
|
1617
|
+
}, [handleBackPress, handleModalVisibleType]);
|
|
1618
|
+
};
|
|
1619
|
+
export const useSavePropsToStore = (props, dispatch) => {
|
|
1620
|
+
const {
|
|
1621
|
+
roomCode,
|
|
1622
|
+
options,
|
|
1623
|
+
onLeave,
|
|
1624
|
+
handleBackButton,
|
|
1625
|
+
autoEnterPipMode
|
|
1626
|
+
} = props;
|
|
1627
|
+
useEffect(() => {
|
|
1628
|
+
dispatch(setPrebuiltData({
|
|
1629
|
+
roomCode,
|
|
1630
|
+
options
|
|
1631
|
+
}));
|
|
1632
|
+
}, [roomCode, options]);
|
|
1633
|
+
useEffect(() => {
|
|
1634
|
+
dispatch(setOnLeaveHandler(onLeave));
|
|
1635
|
+
}, [onLeave]);
|
|
1636
|
+
useEffect(() => {
|
|
1637
|
+
if (Platform.OS === 'android') {
|
|
1638
|
+
dispatch(setHandleBackButton(handleBackButton));
|
|
1639
|
+
}
|
|
1640
|
+
}, [handleBackButton]);
|
|
1641
|
+
useEffect(() => {
|
|
1642
|
+
if (Platform.OS === 'android') {
|
|
1643
|
+
dispatch(setAutoEnterPipMode(autoEnterPipMode));
|
|
1644
|
+
}
|
|
1645
|
+
}, [autoEnterPipMode]);
|
|
1646
|
+
};
|
|
1647
|
+
export const useStartRecording = () => {
|
|
1648
|
+
const dispatch = useDispatch();
|
|
1649
|
+
const hmsInstance = useHMSInstance();
|
|
1650
|
+
const startRecording = useCallback(() => {
|
|
1651
|
+
dispatch(setStartingOrStoppingRecording(true));
|
|
1652
|
+
hmsInstance.startRTMPOrRecording({
|
|
1653
|
+
record: true
|
|
1654
|
+
}).catch(error => {
|
|
1655
|
+
batch(() => {
|
|
1656
|
+
dispatch(setStartingOrStoppingRecording(false));
|
|
1657
|
+
dispatch(addNotification({
|
|
1658
|
+
id: Math.random().toString(16).slice(2),
|
|
1659
|
+
type: NotificationTypes.ERROR,
|
|
1660
|
+
message: error.message
|
|
1661
|
+
}));
|
|
1662
|
+
});
|
|
1663
|
+
});
|
|
1664
|
+
}, [hmsInstance]);
|
|
1665
|
+
return {
|
|
1666
|
+
startRecording
|
|
1667
|
+
};
|
|
1668
|
+
};
|
|
1498
1669
|
//# sourceMappingURL=hooks-util.js.map
|