@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/src/hooks-util.ts
CHANGED
|
@@ -18,10 +18,13 @@ import {
|
|
|
18
18
|
HMSTrackUpdate,
|
|
19
19
|
HMSUpdateListenerActions,
|
|
20
20
|
HMSMessageRecipient,
|
|
21
|
+
useHMSHLSPlayerResolution,
|
|
22
|
+
useHmsViewsResolutionsState,
|
|
21
23
|
// useHMSPeerUpdates,
|
|
22
24
|
} from '@100mslive/react-native-hms';
|
|
23
25
|
import type { Chat as ChatConfig } from '@100mslive/types-prebuilt/elements/chat';
|
|
24
26
|
import type {
|
|
27
|
+
HMSPIPConfig,
|
|
25
28
|
HMSRole,
|
|
26
29
|
HMSSessionStore,
|
|
27
30
|
HMSSessionStoreValue,
|
|
@@ -46,9 +49,15 @@ import {
|
|
|
46
49
|
} from 'react';
|
|
47
50
|
import type { DependencyList } from 'react';
|
|
48
51
|
|
|
49
|
-
import {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
import {
|
|
53
|
+
MaxTilesInOnePage,
|
|
54
|
+
ModalTypes,
|
|
55
|
+
OnLeaveReason,
|
|
56
|
+
PeerListRefreshInterval,
|
|
57
|
+
PipModes,
|
|
58
|
+
} from './utils/types';
|
|
59
|
+
import type { ChatBroadcastFilter, OnLeaveHandler, PeerTrackNode } from './utils/types';
|
|
60
|
+
import { createPeerTrackNode } from './utils/functions';
|
|
52
61
|
import {
|
|
53
62
|
batch,
|
|
54
63
|
shallowEqual,
|
|
@@ -56,11 +65,12 @@ import {
|
|
|
56
65
|
useSelector,
|
|
57
66
|
useStore,
|
|
58
67
|
} from 'react-redux';
|
|
59
|
-
import type { RootState } from './redux';
|
|
68
|
+
import type { AppDispatch, RootState } from './redux';
|
|
60
69
|
import {
|
|
61
70
|
addMessage,
|
|
62
71
|
addNotification,
|
|
63
72
|
addParticipant,
|
|
73
|
+
addParticipants,
|
|
64
74
|
addPinnedMessage,
|
|
65
75
|
addScreenshareTile,
|
|
66
76
|
addUpdateParticipant,
|
|
@@ -70,20 +80,26 @@ import {
|
|
|
70
80
|
clearStore,
|
|
71
81
|
removeNotification,
|
|
72
82
|
removeParticipant,
|
|
83
|
+
removeParticipants,
|
|
73
84
|
removeScreenshareTile,
|
|
85
|
+
replaceParticipantsList,
|
|
74
86
|
saveUserData,
|
|
75
87
|
setActiveChatBottomSheetTab,
|
|
76
88
|
setActiveSpeakers,
|
|
89
|
+
setAutoEnterPipMode,
|
|
77
90
|
setFullScreenPeerTrackNode,
|
|
78
91
|
setHMSLocalPeerState,
|
|
79
92
|
setHMSRoleState,
|
|
80
93
|
setHMSRoomState,
|
|
94
|
+
setHandleBackButton,
|
|
81
95
|
setIsLocalAudioMutedState,
|
|
82
96
|
setIsLocalVideoMutedState,
|
|
83
97
|
setLayoutConfig,
|
|
84
98
|
setLocalPeerTrackNode,
|
|
85
99
|
setMiniViewPeerTrackNode,
|
|
86
100
|
setModalType,
|
|
101
|
+
setOnLeaveHandler,
|
|
102
|
+
setPrebuiltData,
|
|
87
103
|
setReconnecting,
|
|
88
104
|
setRoleChangeRequest,
|
|
89
105
|
setStartingOrStoppingRecording,
|
|
@@ -103,11 +119,11 @@ import {
|
|
|
103
119
|
replacePeerTrackNodesWithTrack,
|
|
104
120
|
} from './peerTrackNodeUtils';
|
|
105
121
|
import { MeetingState } from './types';
|
|
122
|
+
import type { HMSPrebuiltProps } from './types';
|
|
106
123
|
import {
|
|
107
|
-
|
|
124
|
+
BackHandler,
|
|
108
125
|
InteractionManager,
|
|
109
126
|
Keyboard,
|
|
110
|
-
LayoutAnimation,
|
|
111
127
|
Platform,
|
|
112
128
|
} from 'react-native';
|
|
113
129
|
import type { ImageStyle, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
@@ -127,7 +143,7 @@ import {
|
|
|
127
143
|
import type { GridViewRefAttrs } from './components/GridView';
|
|
128
144
|
import { getRoomLayout } from './modules/HMSManager';
|
|
129
145
|
import { DEFAULT_THEME, DEFAULT_TYPOGRAPHY } from './utils/theme';
|
|
130
|
-
import { NotificationTypes } from './
|
|
146
|
+
import { NotificationTypes } from './types';
|
|
131
147
|
|
|
132
148
|
export const useHMSListeners = (
|
|
133
149
|
setPeerTrackNodes: React.Dispatch<React.SetStateAction<PeerTrackNode[]>>
|
|
@@ -139,6 +155,8 @@ export const useHMSListeners = (
|
|
|
139
155
|
|
|
140
156
|
useHMSPeersUpdate(hmsInstance, updateLocalPeer, setPeerTrackNodes);
|
|
141
157
|
|
|
158
|
+
useHMSPeerListUpdated(hmsInstance);
|
|
159
|
+
|
|
142
160
|
useHMSTrackUpdate(hmsInstance, updateLocalPeer, setPeerTrackNodes);
|
|
143
161
|
};
|
|
144
162
|
|
|
@@ -414,6 +432,7 @@ const useHMSPeersUpdate = (
|
|
|
414
432
|
}
|
|
415
433
|
if (
|
|
416
434
|
type === HMSPeerUpdate.METADATA_CHANGED ||
|
|
435
|
+
type === HMSPeerUpdate.HAND_RAISED_CHANGED ||
|
|
417
436
|
type === HMSPeerUpdate.NAME_CHANGED ||
|
|
418
437
|
type === HMSPeerUpdate.NETWORK_QUALITY_UPDATED
|
|
419
438
|
) {
|
|
@@ -421,8 +440,8 @@ const useHMSPeersUpdate = (
|
|
|
421
440
|
|
|
422
441
|
const reduxState = store.getState();
|
|
423
442
|
|
|
424
|
-
if (type === HMSPeerUpdate.
|
|
425
|
-
const handRaised =
|
|
443
|
+
if (type === HMSPeerUpdate.HAND_RAISED_CHANGED) {
|
|
444
|
+
const handRaised = peer.isHandRaised;
|
|
426
445
|
|
|
427
446
|
if (handRaised) {
|
|
428
447
|
const { layoutConfig, localPeer } = reduxState.hmsStates;
|
|
@@ -506,6 +525,38 @@ const useHMSPeersUpdate = (
|
|
|
506
525
|
}, [hmsInstance]);
|
|
507
526
|
};
|
|
508
527
|
|
|
528
|
+
type PeerListUpdate = {
|
|
529
|
+
addedPeers: HMSPeer[];
|
|
530
|
+
removedPeers: HMSPeer[];
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
const useHMSPeerListUpdated = (hmsInstance: HMSSDK) => {
|
|
534
|
+
const dispatch = useDispatch();
|
|
535
|
+
|
|
536
|
+
useEffect(() => {
|
|
537
|
+
const peerListUpdateHandler = ({
|
|
538
|
+
addedPeers,
|
|
539
|
+
removedPeers,
|
|
540
|
+
}: PeerListUpdate) => {
|
|
541
|
+
batch(() => {
|
|
542
|
+
dispatch(addParticipants(addedPeers));
|
|
543
|
+
dispatch(removeParticipants(removedPeers));
|
|
544
|
+
});
|
|
545
|
+
};
|
|
546
|
+
|
|
547
|
+
hmsInstance.addEventListener(
|
|
548
|
+
HMSUpdateListenerActions.ON_PEER_LIST_UPDATED,
|
|
549
|
+
peerListUpdateHandler
|
|
550
|
+
);
|
|
551
|
+
|
|
552
|
+
return () => {
|
|
553
|
+
hmsInstance.removeEventListener(
|
|
554
|
+
HMSUpdateListenerActions.ON_PEER_LIST_UPDATED
|
|
555
|
+
);
|
|
556
|
+
};
|
|
557
|
+
}, [hmsInstance]);
|
|
558
|
+
};
|
|
559
|
+
|
|
509
560
|
type TrackUpdate = {
|
|
510
561
|
peer: HMSPeer;
|
|
511
562
|
track: HMSTrack;
|
|
@@ -1203,12 +1254,21 @@ export const useHMSReconnection = () => {
|
|
|
1203
1254
|
|
|
1204
1255
|
hmsInstance.addEventListener(HMSUpdateListenerActions.RECONNECTING, () => {
|
|
1205
1256
|
if (mounted) {
|
|
1206
|
-
|
|
1257
|
+
batch(() => {
|
|
1258
|
+
dispatch(setReconnecting(true));
|
|
1259
|
+
dispatch(addNotification({
|
|
1260
|
+
id: NotificationTypes.RECONNECTING,
|
|
1261
|
+
type: NotificationTypes.RECONNECTING
|
|
1262
|
+
}))
|
|
1263
|
+
});
|
|
1207
1264
|
}
|
|
1208
1265
|
});
|
|
1209
1266
|
hmsInstance.addEventListener(HMSUpdateListenerActions.RECONNECTED, () => {
|
|
1210
1267
|
if (mounted) {
|
|
1211
|
-
|
|
1268
|
+
batch(() => {
|
|
1269
|
+
dispatch(setReconnecting(false));
|
|
1270
|
+
dispatch(removeNotification(NotificationTypes.RECONNECTING));
|
|
1271
|
+
})
|
|
1212
1272
|
}
|
|
1213
1273
|
});
|
|
1214
1274
|
|
|
@@ -1222,11 +1282,11 @@ export const useHMSReconnection = () => {
|
|
|
1222
1282
|
|
|
1223
1283
|
export const useHMSPIPRoomLeave = () => {
|
|
1224
1284
|
const hmsInstance = useHMSInstance();
|
|
1225
|
-
const { destroy } = useLeaveMethods(
|
|
1285
|
+
const { destroy } = useLeaveMethods();
|
|
1226
1286
|
|
|
1227
1287
|
useEffect(() => {
|
|
1228
1288
|
const pipRoomLeaveHandler = () => {
|
|
1229
|
-
destroy();
|
|
1289
|
+
destroy(OnLeaveReason.PIP);
|
|
1230
1290
|
};
|
|
1231
1291
|
|
|
1232
1292
|
hmsInstance.addEventListener(
|
|
@@ -1242,11 +1302,17 @@ export const useHMSPIPRoomLeave = () => {
|
|
|
1242
1302
|
|
|
1243
1303
|
export const useHMSRemovedFromRoomUpdate = () => {
|
|
1244
1304
|
const hmsInstance = useHMSInstance();
|
|
1245
|
-
const { destroy } = useLeaveMethods(
|
|
1305
|
+
const { destroy } = useLeaveMethods();
|
|
1246
1306
|
|
|
1247
1307
|
useEffect(() => {
|
|
1248
|
-
const removedFromRoomHandler = (
|
|
1249
|
-
|
|
1308
|
+
const removedFromRoomHandler = (data: {
|
|
1309
|
+
requestedBy?: HMSPeer | null;
|
|
1310
|
+
reason?: string;
|
|
1311
|
+
roomEnded?: boolean;
|
|
1312
|
+
}) => {
|
|
1313
|
+
destroy(
|
|
1314
|
+
data.roomEnded ? OnLeaveReason.ROOM_END : OnLeaveReason.PEER_KICKED
|
|
1315
|
+
);
|
|
1250
1316
|
};
|
|
1251
1317
|
|
|
1252
1318
|
hmsInstance.addEventListener(
|
|
@@ -1270,20 +1336,27 @@ export const usePIPListener = () => {
|
|
|
1270
1336
|
);
|
|
1271
1337
|
|
|
1272
1338
|
useEffect(() => {
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1339
|
+
const pipModeChangedHandler = (data: {
|
|
1340
|
+
isInPictureInPictureMode: boolean;
|
|
1341
|
+
}) => {
|
|
1342
|
+
dispatch(
|
|
1343
|
+
changePipModeStatus(
|
|
1344
|
+
data.isInPictureInPictureMode ? PipModes.ACTIVE : PipModes.INACTIVE
|
|
1345
|
+
)
|
|
1346
|
+
);
|
|
1347
|
+
};
|
|
1278
1348
|
|
|
1279
|
-
|
|
1349
|
+
hmsInstance.addEventListener(
|
|
1350
|
+
HMSPIPListenerActions.ON_PIP_MODE_CHANGED,
|
|
1351
|
+
pipModeChangedHandler
|
|
1352
|
+
);
|
|
1280
1353
|
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
}
|
|
1286
|
-
}, [
|
|
1354
|
+
return () => {
|
|
1355
|
+
hmsInstance.removeEventListener(
|
|
1356
|
+
HMSPIPListenerActions.ON_PIP_MODE_CHANGED
|
|
1357
|
+
);
|
|
1358
|
+
};
|
|
1359
|
+
}, []);
|
|
1287
1360
|
|
|
1288
1361
|
// Check if PIP is supported or not
|
|
1289
1362
|
useEffect(() => {
|
|
@@ -1316,6 +1389,93 @@ export const useHMSNetworkQualityUpdate = () => {
|
|
|
1316
1389
|
}, [hmsInstance]);
|
|
1317
1390
|
};
|
|
1318
1391
|
|
|
1392
|
+
export type PIPConfig = Omit<HMSPIPConfig, 'autoEnterPipMode'>;
|
|
1393
|
+
|
|
1394
|
+
export const useEnableAutoPip = () => {
|
|
1395
|
+
const hmsInstance = useHMSInstance();
|
|
1396
|
+
|
|
1397
|
+
const enableAutoPip = useCallback(
|
|
1398
|
+
(data?: PIPConfig) => {
|
|
1399
|
+
hmsInstance.setPipParams({ ...data, autoEnterPipMode: true });
|
|
1400
|
+
},
|
|
1401
|
+
[hmsInstance]
|
|
1402
|
+
);
|
|
1403
|
+
|
|
1404
|
+
return enableAutoPip;
|
|
1405
|
+
};
|
|
1406
|
+
|
|
1407
|
+
export const useDisableAutoPip = () => {
|
|
1408
|
+
const hmsInstance = useHMSInstance();
|
|
1409
|
+
|
|
1410
|
+
const disableAutoPip = useCallback(
|
|
1411
|
+
(data?: PIPConfig) => {
|
|
1412
|
+
hmsInstance.setPipParams({ ...data, autoEnterPipMode: false });
|
|
1413
|
+
},
|
|
1414
|
+
[hmsInstance]
|
|
1415
|
+
);
|
|
1416
|
+
|
|
1417
|
+
return disableAutoPip;
|
|
1418
|
+
};
|
|
1419
|
+
|
|
1420
|
+
export const useAutoPip = (oneToOneCall: boolean) => {
|
|
1421
|
+
const enableAutoPip = useEnableAutoPip();
|
|
1422
|
+
const disableAutoPip = useDisableAutoPip();
|
|
1423
|
+
|
|
1424
|
+
const autoEnterPipMode = useSelector(
|
|
1425
|
+
(state: RootState) => state.app.autoEnterPipMode
|
|
1426
|
+
);
|
|
1427
|
+
const [numerator, denominator] = usePipAspectRatio(oneToOneCall);
|
|
1428
|
+
|
|
1429
|
+
useEffect(() => {
|
|
1430
|
+
if (autoEnterPipMode) {
|
|
1431
|
+
enableAutoPip({ aspectRatio: [numerator, denominator] });
|
|
1432
|
+
|
|
1433
|
+
return disableAutoPip;
|
|
1434
|
+
}
|
|
1435
|
+
}, [
|
|
1436
|
+
numerator,
|
|
1437
|
+
denominator,
|
|
1438
|
+
autoEnterPipMode,
|
|
1439
|
+
enableAutoPip,
|
|
1440
|
+
disableAutoPip,
|
|
1441
|
+
]);
|
|
1442
|
+
};
|
|
1443
|
+
|
|
1444
|
+
export const usePipAspectRatio = (oneToOneCall: boolean): [number, number] => {
|
|
1445
|
+
const isHLSViewer = useIsHLSViewer();
|
|
1446
|
+
const hlsPlayerResolution = useHMSHLSPlayerResolution();
|
|
1447
|
+
|
|
1448
|
+
const firstSSNodeId = useSelector((state: RootState) => {
|
|
1449
|
+
const ssPeerTrackNode = state.app.screensharePeerTrackNodes[0];
|
|
1450
|
+
return ssPeerTrackNode?.track?.trackId;
|
|
1451
|
+
});
|
|
1452
|
+
|
|
1453
|
+
const ssResolution = useHmsViewsResolutionsState(firstSSNodeId);
|
|
1454
|
+
|
|
1455
|
+
const aspectRatio = useMemo((): [number, number] => {
|
|
1456
|
+
// When user is hlsviewer and we have stream resolution
|
|
1457
|
+
if (isHLSViewer && hlsPlayerResolution) {
|
|
1458
|
+
return [hlsPlayerResolution.width, hlsPlayerResolution.height];
|
|
1459
|
+
}
|
|
1460
|
+
// When user is hlsviewer and we don't have stream resolution
|
|
1461
|
+
if (isHLSViewer) {
|
|
1462
|
+
return [9, 16];
|
|
1463
|
+
}
|
|
1464
|
+
// When we have screenshare resolution, use it
|
|
1465
|
+
if (ssResolution) {
|
|
1466
|
+
return [ssResolution.width, ssResolution.height];
|
|
1467
|
+
}
|
|
1468
|
+
// When there is no screenshare and one-to-one call is happening
|
|
1469
|
+
if (!firstSSNodeId && oneToOneCall) {
|
|
1470
|
+
return [9, 16];
|
|
1471
|
+
}
|
|
1472
|
+
// default aspect ratio
|
|
1473
|
+
return [16, 9];
|
|
1474
|
+
}, [isHLSViewer, firstSSNodeId, oneToOneCall, ssResolution, hlsPlayerResolution]);
|
|
1475
|
+
|
|
1476
|
+
return aspectRatio;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1319
1479
|
export const useHMSActiveSpeakerUpdates = (
|
|
1320
1480
|
setPeerTrackNodes: React.Dispatch<React.SetStateAction<PeerTrackNode[]>>,
|
|
1321
1481
|
active?: boolean
|
|
@@ -1524,7 +1684,6 @@ export const useHMSConfig = () => {
|
|
|
1524
1684
|
username: storeState.user.userName,
|
|
1525
1685
|
captureNetworkQualityInPreview: true,
|
|
1526
1686
|
endpoint: storeState.user.endPoints?.init,
|
|
1527
|
-
// metadata: JSON.stringify({isHandRaised: true}), // To join with hand raised
|
|
1528
1687
|
});
|
|
1529
1688
|
|
|
1530
1689
|
return hmsConfig;
|
|
@@ -1634,30 +1793,68 @@ export const useLandscapeChatViewVisible = () => {
|
|
|
1634
1793
|
return pipModeNotActive && isLandscapeOrientation && overlayChatVisible;
|
|
1635
1794
|
};
|
|
1636
1795
|
|
|
1637
|
-
export type
|
|
1796
|
+
export type ParticipantAccordianData = {
|
|
1797
|
+
id: string;
|
|
1638
1798
|
label: string;
|
|
1639
|
-
|
|
1640
|
-
|
|
1799
|
+
showViewAll: boolean;
|
|
1800
|
+
data: (HMSPeer | HMSLocalPeer)[];
|
|
1641
1801
|
};
|
|
1642
1802
|
|
|
1643
|
-
export
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1803
|
+
export const useOffStageParticipants = () => {
|
|
1804
|
+
const dispatch = useDispatch();
|
|
1805
|
+
const hmsInstance = useHMSInstance();
|
|
1806
|
+
const offStageRoles = useHMSLayoutConfig(
|
|
1807
|
+
(layoutConfig) =>
|
|
1808
|
+
layoutConfig?.screens?.conferencing?.default?.elements?.on_stage_exp
|
|
1809
|
+
?.off_stage_roles || null
|
|
1810
|
+
);
|
|
1811
|
+
|
|
1812
|
+
const [participantsTotalCounts, setParticipantsTotalCounts] = useState<
|
|
1813
|
+
Record<string, number>
|
|
1814
|
+
>({});
|
|
1647
1815
|
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1816
|
+
useEffect(() => {
|
|
1817
|
+
if (offStageRoles) {
|
|
1818
|
+
let mounted = true;
|
|
1819
|
+
|
|
1820
|
+
const createIterator = async (forRole: string) => {
|
|
1821
|
+
const iterator = hmsInstance.getPeerListIterator({
|
|
1822
|
+
byRoleName: forRole,
|
|
1823
|
+
limit: 10,
|
|
1824
|
+
});
|
|
1825
|
+
const participants = await iterator.next();
|
|
1826
|
+
if (mounted) {
|
|
1827
|
+
dispatch(replaceParticipantsList(participants, forRole));
|
|
1828
|
+
setParticipantsTotalCounts((prev) => ({
|
|
1829
|
+
...prev,
|
|
1830
|
+
[forRole]: iterator.totalCount,
|
|
1831
|
+
}));
|
|
1832
|
+
}
|
|
1833
|
+
};
|
|
1834
|
+
|
|
1835
|
+
const createIteratorForRoles = () => {
|
|
1836
|
+
offStageRoles.forEach((role) => {
|
|
1837
|
+
createIterator(role);
|
|
1838
|
+
});
|
|
1839
|
+
};
|
|
1840
|
+
|
|
1841
|
+
createIteratorForRoles();
|
|
1842
|
+
|
|
1843
|
+
const intervalId = setInterval(() => {
|
|
1844
|
+
createIteratorForRoles();
|
|
1845
|
+
}, PeerListRefreshInterval);
|
|
1846
|
+
|
|
1847
|
+
return () => {
|
|
1848
|
+
mounted = false;
|
|
1849
|
+
clearInterval(intervalId);
|
|
1850
|
+
};
|
|
1851
|
+
}
|
|
1852
|
+
}, [offStageRoles]);
|
|
1853
|
+
|
|
1854
|
+
return participantsTotalCounts;
|
|
1658
1855
|
};
|
|
1659
1856
|
|
|
1660
|
-
export const useFilteredParticipants = () => {
|
|
1857
|
+
export const useFilteredParticipants = (filterText: string) => {
|
|
1661
1858
|
const roles = useSelector((state: RootState) => state.hmsStates.roles);
|
|
1662
1859
|
const onStageRole = useHMSLayoutConfig(
|
|
1663
1860
|
(layoutConfig) =>
|
|
@@ -1665,183 +1862,137 @@ export const useFilteredParticipants = () => {
|
|
|
1665
1862
|
?.on_stage_role || null
|
|
1666
1863
|
);
|
|
1667
1864
|
|
|
1668
|
-
const
|
|
1669
|
-
const formattedSearchText = searchText.trim().toLowerCase();
|
|
1670
|
-
|
|
1671
|
-
const participants = useSelector(
|
|
1672
|
-
(state: RootState) => state.hmsStates.participants
|
|
1673
|
-
);
|
|
1674
|
-
|
|
1675
|
-
const peerGroups = useMemo(() => {
|
|
1676
|
-
return groupParticipantsAsPerRole(participants, formattedSearchText);
|
|
1677
|
-
}, [formattedSearchText, participants]);
|
|
1865
|
+
const offStageParticipantsTotalCounts = useOffStageParticipants();
|
|
1678
1866
|
|
|
1679
|
-
const
|
|
1680
|
-
return roles
|
|
1681
|
-
.filter((role) => peerGroups.has(role.name!))
|
|
1682
|
-
.sort((a, b) => {
|
|
1683
|
-
if (onStageRole) {
|
|
1684
|
-
if (a.name === onStageRole && b.name === onStageRole) {
|
|
1685
|
-
return 0;
|
|
1686
|
-
}
|
|
1867
|
+
const formattedSearchText = filterText.trim().toLowerCase();
|
|
1687
1868
|
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1869
|
+
const groupedParticipants = useSelector(
|
|
1870
|
+
(state: RootState) => state.hmsStates.groupedParticipants
|
|
1871
|
+
);
|
|
1691
1872
|
|
|
1692
|
-
|
|
1693
|
-
|
|
1873
|
+
const sortedRoles = useMemo(
|
|
1874
|
+
() => {
|
|
1875
|
+
return roles
|
|
1876
|
+
.filter((role) => {
|
|
1877
|
+
if (!role.name || role.name.startsWith('_')) {
|
|
1878
|
+
return false;
|
|
1694
1879
|
}
|
|
1695
|
-
|
|
1880
|
+
return true;
|
|
1696
1881
|
|
|
1697
|
-
|
|
1698
|
-
(a.publishSettings?.allowed &&
|
|
1699
|
-
a.publishSettings.allowed.length > 0) ??
|
|
1700
|
-
false;
|
|
1701
|
-
const canBPublish: boolean =
|
|
1702
|
-
(b.publishSettings?.allowed &&
|
|
1703
|
-
b.publishSettings.allowed.length > 0) ??
|
|
1704
|
-
false;
|
|
1705
|
-
|
|
1706
|
-
if (canAPublish && canBPublish) {
|
|
1707
|
-
return 0;
|
|
1708
|
-
}
|
|
1882
|
+
// const list = groupedParticipants[role.name!];
|
|
1709
1883
|
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1884
|
+
// return list && list.length > 0;
|
|
1885
|
+
})
|
|
1886
|
+
.sort((a, b) => {
|
|
1887
|
+
if (onStageRole) {
|
|
1888
|
+
if (a.name === onStageRole && b.name === onStageRole) {
|
|
1889
|
+
return 0;
|
|
1890
|
+
}
|
|
1717
1891
|
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1892
|
+
if (a.name === onStageRole) {
|
|
1893
|
+
return -1;
|
|
1894
|
+
}
|
|
1721
1895
|
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1896
|
+
if (b.name === onStageRole) {
|
|
1897
|
+
return 1;
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1725
1900
|
|
|
1726
|
-
|
|
1727
|
-
|
|
1901
|
+
const canAPublish: boolean =
|
|
1902
|
+
(a.publishSettings?.allowed &&
|
|
1903
|
+
a.publishSettings.allowed.length > 0) ??
|
|
1904
|
+
false;
|
|
1905
|
+
const canBPublish: boolean =
|
|
1906
|
+
(b.publishSettings?.allowed &&
|
|
1907
|
+
b.publishSettings.allowed.length > 0) ??
|
|
1908
|
+
false;
|
|
1728
1909
|
|
|
1729
|
-
|
|
1910
|
+
if (canAPublish && canBPublish) {
|
|
1911
|
+
return 0;
|
|
1912
|
+
}
|
|
1730
1913
|
|
|
1731
|
-
|
|
1732
|
-
|
|
1914
|
+
if (canAPublish) {
|
|
1915
|
+
return -1;
|
|
1916
|
+
}
|
|
1733
1917
|
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
},
|
|
1741
|
-
});
|
|
1918
|
+
return 1;
|
|
1919
|
+
});
|
|
1920
|
+
},
|
|
1921
|
+
// [groupedParticipants, onStageRole, roles]
|
|
1922
|
+
[onStageRole, roles]
|
|
1923
|
+
);
|
|
1742
1924
|
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
handRaisedPeers.map((peer, idx, arr) => {
|
|
1746
|
-
const isLast = arr.length - 1 === idx;
|
|
1925
|
+
const participantsAccordianData: ParticipantAccordianData[] = useMemo(() => {
|
|
1926
|
+
const t = [];
|
|
1747
1927
|
|
|
1748
|
-
|
|
1749
|
-
data: peer,
|
|
1750
|
-
key: `${peer.peerID}--${'hand-raised'}`,
|
|
1751
|
-
type: isLast ? 'LAST_ITEM' : 'REGULAR_ITEM',
|
|
1752
|
-
};
|
|
1753
|
-
})
|
|
1754
|
-
);
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1928
|
+
const filteredHandRaisedPeers: (HMSPeer | HMSLocalPeer)[][] = [];
|
|
1757
1929
|
|
|
1758
1930
|
sortedRoles.forEach((role) => {
|
|
1759
|
-
const
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1931
|
+
const list = groupedParticipants[role.name!];
|
|
1932
|
+
const filteredList =
|
|
1933
|
+
Array.isArray(list) && formattedSearchText.length > 0
|
|
1934
|
+
? list.filter((peer) =>
|
|
1935
|
+
peer.name.toLowerCase().includes(formattedSearchText)
|
|
1936
|
+
)
|
|
1937
|
+
: list;
|
|
1938
|
+
|
|
1939
|
+
if (Array.isArray(filteredList) && filteredList.length > 0) {
|
|
1940
|
+
filteredHandRaisedPeers.push(filteredList);
|
|
1941
|
+
const offStageRoleTotalCount =
|
|
1942
|
+
offStageParticipantsTotalCounts[role.name!];
|
|
1943
|
+
|
|
1944
|
+
const firstTen = filteredList.slice(0, 10);
|
|
1945
|
+
|
|
1946
|
+
t.push({
|
|
1947
|
+
id: role.name!,
|
|
1948
|
+
label: `${role.name!} (${
|
|
1949
|
+
typeof offStageRoleTotalCount === 'number'
|
|
1950
|
+
? offStageRoleTotalCount
|
|
1951
|
+
: filteredList.length
|
|
1952
|
+
})`,
|
|
1953
|
+
showViewAll:
|
|
1954
|
+
typeof offStageRoleTotalCount === 'number' &&
|
|
1955
|
+
formattedSearchText.length <= 0
|
|
1956
|
+
? offStageRoleTotalCount > 10
|
|
1957
|
+
: filteredList.length > 10,
|
|
1958
|
+
data: firstTen,
|
|
1772
1959
|
});
|
|
1773
|
-
|
|
1774
|
-
if (expanded) {
|
|
1775
|
-
list = list.concat(
|
|
1776
|
-
peers.map((peer, idx, arr) => {
|
|
1777
|
-
const isLast = arr.length - 1 === idx;
|
|
1778
|
-
|
|
1779
|
-
return {
|
|
1780
|
-
data: peer,
|
|
1781
|
-
key: `${peer.peerID}--${role.name!}`,
|
|
1782
|
-
type: isLast ? 'LAST_ITEM' : 'REGULAR_ITEM',
|
|
1783
|
-
};
|
|
1784
|
-
})
|
|
1785
|
-
);
|
|
1786
|
-
}
|
|
1787
1960
|
}
|
|
1788
1961
|
});
|
|
1789
1962
|
|
|
1790
|
-
|
|
1791
|
-
|
|
1963
|
+
const handRaisedParticipants = filteredHandRaisedPeers
|
|
1964
|
+
.flat()
|
|
1965
|
+
.filter((participant) => participant.isHandRaised);
|
|
1792
1966
|
|
|
1793
|
-
|
|
1794
|
-
data: groupedList,
|
|
1795
|
-
searchText,
|
|
1796
|
-
formattedSearchText,
|
|
1797
|
-
setSearchText,
|
|
1798
|
-
expandedGroups,
|
|
1799
|
-
setExpandedGroups,
|
|
1800
|
-
};
|
|
1801
|
-
};
|
|
1967
|
+
const firstTenHandRaisedParticipants = handRaisedParticipants.slice(0, 10);
|
|
1802
1968
|
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
const participantRole = participant.role;
|
|
1811
|
-
|
|
1812
|
-
if (!participantRole) {
|
|
1813
|
-
continue;
|
|
1969
|
+
if (handRaisedParticipants.length > 0) {
|
|
1970
|
+
t.unshift({
|
|
1971
|
+
id: 'hand-raised',
|
|
1972
|
+
label: `Hand Raised (${handRaisedParticipants.length})`,
|
|
1973
|
+
showViewAll: handRaisedParticipants.length > 10,
|
|
1974
|
+
data: firstTenHandRaisedParticipants,
|
|
1975
|
+
});
|
|
1814
1976
|
}
|
|
1815
1977
|
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
const group = groups.get(participantRole.name!);
|
|
1825
|
-
|
|
1826
|
-
if (!group) {
|
|
1827
|
-
continue;
|
|
1828
|
-
}
|
|
1829
|
-
|
|
1830
|
-
group.push(participant);
|
|
1831
|
-
|
|
1832
|
-
if (parseMetadata(participant.metadata).isHandRaised) {
|
|
1833
|
-
if (!groups.has('hand-raised')) {
|
|
1834
|
-
groups.set('hand-raised', []);
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
|
-
const group = groups.get('hand-raised');
|
|
1978
|
+
return t;
|
|
1979
|
+
}, [
|
|
1980
|
+
formattedSearchText,
|
|
1981
|
+
groupedParticipants,
|
|
1982
|
+
offStageParticipantsTotalCounts,
|
|
1983
|
+
sortedRoles,
|
|
1984
|
+
]);
|
|
1838
1985
|
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
}
|
|
1986
|
+
const [expandedGroup, setExpandedGroup] = useState<string | null>(
|
|
1987
|
+
participantsAccordianData[0]?.id ?? null
|
|
1988
|
+
);
|
|
1843
1989
|
|
|
1844
|
-
return
|
|
1990
|
+
return {
|
|
1991
|
+
data: participantsAccordianData,
|
|
1992
|
+
formattedSearchText,
|
|
1993
|
+
expandedGroup,
|
|
1994
|
+
setExpandedGroup,
|
|
1995
|
+
};
|
|
1845
1996
|
};
|
|
1846
1997
|
|
|
1847
1998
|
export const useShouldGoLive = () => {
|
|
@@ -1850,13 +2001,13 @@ export const useShouldGoLive = () => {
|
|
|
1850
2001
|
return shouldGoLive;
|
|
1851
2002
|
};
|
|
1852
2003
|
|
|
1853
|
-
export const useLeaveMethods = (
|
|
2004
|
+
export const useLeaveMethods = () => {
|
|
1854
2005
|
const navigation = useContext(NavigationContext);
|
|
1855
2006
|
const hmsInstance = useHMSInstance();
|
|
1856
2007
|
const dispatch = useDispatch();
|
|
1857
2008
|
const reduxStore = useStore<RootState>();
|
|
1858
2009
|
|
|
1859
|
-
const destroy = useCallback(() => {
|
|
2010
|
+
const destroy = useCallback((reason: Parameters<OnLeaveHandler>[0]) => {
|
|
1860
2011
|
try {
|
|
1861
2012
|
const s = hmsInstance.destroy();
|
|
1862
2013
|
console.log('Destroy Success: ', s);
|
|
@@ -1883,9 +2034,13 @@ export const useLeaveMethods = (isUnmounted: boolean) => {
|
|
|
1883
2034
|
const onLeave = reduxStore.getState().user.onLeave;
|
|
1884
2035
|
|
|
1885
2036
|
if (typeof onLeave === 'function') {
|
|
1886
|
-
onLeave();
|
|
2037
|
+
onLeave(reason);
|
|
1887
2038
|
dispatch(clearStore());
|
|
1888
|
-
} else if (
|
|
2039
|
+
} else if (
|
|
2040
|
+
navigation &&
|
|
2041
|
+
typeof navigation.canGoBack === 'function' &&
|
|
2042
|
+
navigation.canGoBack()
|
|
2043
|
+
) {
|
|
1889
2044
|
navigation.goBack();
|
|
1890
2045
|
dispatch(clearStore());
|
|
1891
2046
|
} else {
|
|
@@ -1905,7 +2060,7 @@ export const useLeaveMethods = (isUnmounted: boolean) => {
|
|
|
1905
2060
|
}, [hmsInstance]);
|
|
1906
2061
|
|
|
1907
2062
|
const leave = useCallback(
|
|
1908
|
-
async (shouldEndStream: boolean = false) => {
|
|
2063
|
+
async (reason: OnLeaveReason, shouldEndStream: boolean = false) => {
|
|
1909
2064
|
if (shouldEndStream) {
|
|
1910
2065
|
hmsInstance.stopHLSStreaming().catch((error) => {
|
|
1911
2066
|
console.log('Stop HLS Streaming Error: ', error);
|
|
@@ -1914,7 +2069,7 @@ export const useLeaveMethods = (isUnmounted: boolean) => {
|
|
|
1914
2069
|
try {
|
|
1915
2070
|
const d = await hmsInstance.leave();
|
|
1916
2071
|
console.log('Leave Success: ', d);
|
|
1917
|
-
await destroy();
|
|
2072
|
+
await destroy(reason);
|
|
1918
2073
|
} catch (e) {
|
|
1919
2074
|
console.log(`Leave Room Error: ${e}`);
|
|
1920
2075
|
Toast.showWithGravity(`Leave Room Error: ${e}`, Toast.LONG, Toast.TOP);
|
|
@@ -1923,31 +2078,31 @@ export const useLeaveMethods = (isUnmounted: boolean) => {
|
|
|
1923
2078
|
[destroy, hmsInstance]
|
|
1924
2079
|
);
|
|
1925
2080
|
|
|
1926
|
-
const
|
|
2081
|
+
const prebuiltCleanUp = useCallback(async () => {
|
|
1927
2082
|
try {
|
|
1928
2083
|
await hmsInstance.leave();
|
|
1929
2084
|
await hmsInstance.destroy();
|
|
1930
2085
|
dispatch(clearStore());
|
|
1931
2086
|
} catch (error) {
|
|
1932
2087
|
Toast.showWithGravity(
|
|
1933
|
-
`Unable to
|
|
2088
|
+
`Unable to leave or destroy: ${error}`,
|
|
1934
2089
|
Toast.LONG,
|
|
1935
2090
|
Toast.TOP
|
|
1936
2091
|
);
|
|
1937
2092
|
}
|
|
1938
2093
|
}, [hmsInstance]);
|
|
1939
2094
|
|
|
1940
|
-
const endRoom = useCallback(async () => {
|
|
2095
|
+
const endRoom = useCallback(async (reason: OnLeaveReason) => {
|
|
1941
2096
|
try {
|
|
1942
2097
|
const d = await hmsInstance.endRoom('Host ended the room');
|
|
1943
2098
|
console.log('EndRoom Success: ', d);
|
|
1944
|
-
await destroy();
|
|
2099
|
+
await destroy(reason);
|
|
1945
2100
|
} catch (e) {
|
|
1946
2101
|
console.log('EndRoom Error: ', e);
|
|
1947
2102
|
}
|
|
1948
2103
|
}, [destroy, hmsInstance]);
|
|
1949
2104
|
|
|
1950
|
-
return { destroy, leave, endRoom,
|
|
2105
|
+
return { destroy, leave, endRoom, prebuiltCleanUp };
|
|
1951
2106
|
};
|
|
1952
2107
|
|
|
1953
2108
|
// Returns layout config as it is returned from server
|
|
@@ -2153,3 +2308,101 @@ export const useHMSConferencingScreenConfig = <Selected = unknown>(
|
|
|
2153
2308
|
return selector(conferencingScreenConfig);
|
|
2154
2309
|
}, equalityFn);
|
|
2155
2310
|
};
|
|
2311
|
+
|
|
2312
|
+
export const useBackButtonPress = () => {
|
|
2313
|
+
const { handleModalVisibleType } = useModalType();
|
|
2314
|
+
|
|
2315
|
+
const handleBackPress = useSelector(
|
|
2316
|
+
(state: RootState) => state.app.handleBackButton
|
|
2317
|
+
);
|
|
2318
|
+
|
|
2319
|
+
useEffect(() => {
|
|
2320
|
+
if (handleBackPress) {
|
|
2321
|
+
const backPressHandler = () => {
|
|
2322
|
+
handleModalVisibleType(ModalTypes.LEAVE_ROOM);
|
|
2323
|
+
|
|
2324
|
+
/**
|
|
2325
|
+
* When true is returned the event will not be bubbled up
|
|
2326
|
+
* & no other back action will execute
|
|
2327
|
+
*/
|
|
2328
|
+
return true;
|
|
2329
|
+
|
|
2330
|
+
/**
|
|
2331
|
+
* Returning false will let the event to bubble up & let other event listeners
|
|
2332
|
+
* or the system's default back action to be executed.
|
|
2333
|
+
*/
|
|
2334
|
+
// return false;
|
|
2335
|
+
};
|
|
2336
|
+
|
|
2337
|
+
const subscription = BackHandler.addEventListener(
|
|
2338
|
+
'hardwareBackPress',
|
|
2339
|
+
backPressHandler
|
|
2340
|
+
);
|
|
2341
|
+
|
|
2342
|
+
return () => {
|
|
2343
|
+
if (typeof subscription.remove === 'function') {
|
|
2344
|
+
subscription.remove();
|
|
2345
|
+
} else {
|
|
2346
|
+
BackHandler.removeEventListener(
|
|
2347
|
+
'hardwareBackPress',
|
|
2348
|
+
backPressHandler
|
|
2349
|
+
);
|
|
2350
|
+
}
|
|
2351
|
+
};
|
|
2352
|
+
}
|
|
2353
|
+
}, [handleBackPress, handleModalVisibleType]);
|
|
2354
|
+
};
|
|
2355
|
+
|
|
2356
|
+
export const useSavePropsToStore = (
|
|
2357
|
+
props: HMSPrebuiltProps,
|
|
2358
|
+
dispatch: AppDispatch
|
|
2359
|
+
) => {
|
|
2360
|
+
const { roomCode, options, onLeave, handleBackButton, autoEnterPipMode } =
|
|
2361
|
+
props;
|
|
2362
|
+
|
|
2363
|
+
useEffect(() => {
|
|
2364
|
+
dispatch(setPrebuiltData({ roomCode, options }));
|
|
2365
|
+
}, [roomCode, options]);
|
|
2366
|
+
|
|
2367
|
+
useEffect(() => {
|
|
2368
|
+
dispatch(setOnLeaveHandler(onLeave));
|
|
2369
|
+
}, [onLeave]);
|
|
2370
|
+
|
|
2371
|
+
useEffect(() => {
|
|
2372
|
+
if (Platform.OS === 'android') {
|
|
2373
|
+
dispatch(setHandleBackButton(handleBackButton));
|
|
2374
|
+
}
|
|
2375
|
+
}, [handleBackButton]);
|
|
2376
|
+
|
|
2377
|
+
useEffect(() => {
|
|
2378
|
+
if (Platform.OS === 'android') {
|
|
2379
|
+
dispatch(setAutoEnterPipMode(autoEnterPipMode));
|
|
2380
|
+
}
|
|
2381
|
+
}, [autoEnterPipMode]);
|
|
2382
|
+
};
|
|
2383
|
+
|
|
2384
|
+
export const useStartRecording = () => {
|
|
2385
|
+
const dispatch = useDispatch();
|
|
2386
|
+
const hmsInstance = useHMSInstance();
|
|
2387
|
+
|
|
2388
|
+
const startRecording = useCallback(() => {
|
|
2389
|
+
dispatch(setStartingOrStoppingRecording(true));
|
|
2390
|
+
|
|
2391
|
+
hmsInstance.startRTMPOrRecording({ record: true }).catch((error) => {
|
|
2392
|
+
batch(() => {
|
|
2393
|
+
dispatch(setStartingOrStoppingRecording(false));
|
|
2394
|
+
dispatch(
|
|
2395
|
+
addNotification({
|
|
2396
|
+
id: Math.random().toString(16).slice(2),
|
|
2397
|
+
type: NotificationTypes.ERROR,
|
|
2398
|
+
message: error.message
|
|
2399
|
+
})
|
|
2400
|
+
);
|
|
2401
|
+
});
|
|
2402
|
+
});
|
|
2403
|
+
}, [hmsInstance]);
|
|
2404
|
+
|
|
2405
|
+
return {
|
|
2406
|
+
startRecording,
|
|
2407
|
+
};
|
|
2408
|
+
};
|