@100mslive/react-native-room-kit 1.0.0 → 1.0.1
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 +5 -7
- package/lib/commonjs/HMSPrebuilt.js.map +1 -1
- package/lib/commonjs/HMSRoomSetup.js +3 -3
- 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/Leave/index.js +5 -1
- package/lib/commonjs/Icons/Leave/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 +2 -2
- package/lib/commonjs/components/DisplayView.js.map +1 -1
- package/lib/commonjs/components/EndRoomModalContent.js +2 -2
- package/lib/commonjs/components/EndRoomModalContent.js.map +1 -1
- package/lib/commonjs/components/Footer.js +4 -5
- 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 +4 -5
- 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 +2 -2
- 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 +4 -3
- 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 +2 -2
- package/lib/commonjs/components/HMSNotification.js.map +1 -1
- package/lib/commonjs/components/HMSNotifications.js +2 -2
- package/lib/commonjs/components/HMSNotifications.js.map +1 -1
- package/lib/commonjs/components/HMSOverlayChatView.js +2 -2
- 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/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/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/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 +2 -2
- package/lib/commonjs/components/Meeting.js.map +1 -1
- package/lib/commonjs/components/MeetingScreenContent.js +2 -2
- 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 +24 -18
- 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 +4 -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 +4 -5
- 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 +12 -7
- 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 +26 -12
- 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 +4 -10
- 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 +49 -13
- 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 +2 -2
- 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 +133 -119
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +6 -5
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +20 -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 +3 -4
- 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 +3 -4
- package/lib/commonjs/redux/reducers/userState.js.map +1 -1
- package/lib/commonjs/types.js +1 -2
- 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 +13 -23
- package/lib/commonjs/utils/types.js.map +1 -1
- package/lib/commonjs/utils.js +1 -2
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/HMSPrebuilt.js +2 -3
- package/lib/module/HMSPrebuilt.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +1 -1
- 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/Leave/index.js +5 -1
- package/lib/module/Icons/Leave/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/Footer.js +1 -1
- 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 +3 -4
- 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/HMSManageLeave.js +2 -1
- 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/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/HMSRecordingIndicator.js +4 -1
- package/lib/module/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/module/components/HMSTextInput.js +3 -3
- package/lib/module/components/HMSTextInput.js.map +1 -1
- package/lib/module/components/PIPView.js +21 -13
- 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 +1 -1
- 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 +1 -1
- package/lib/module/components/PeerVideoTile/AvatarView.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerAudioIndicator.js +11 -6
- 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 +22 -6
- 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 +1 -6
- package/lib/module/components/PreviewForRoleChangeModal.js.map +1 -1
- package/lib/module/components/RoomSettingsModalContent.js +49 -13
- 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/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 +135 -122
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +4 -1
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +14 -1
- package/lib/module/redux/actions/index.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/utils/functions.js.map +1 -1
- package/lib/module/utils/types.js +1 -0
- package/lib/module/utils/types.js.map +1 -1
- package/lib/typescript/HMSPrebuilt.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/Leave/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/HMSDangerButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSHLSStreamLoading.d.ts.map +1 -1
- 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/HMSPreviewHLSLiveIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewJoinButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSRecordingIndicator.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/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 +9 -19
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +4 -1
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +13 -0
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +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 +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 +1 -0
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/package.json +3 -4
- package/src/HMSPrebuilt.tsx +3 -6
- package/src/HMSRoomSetup.tsx +1 -1
- package/src/Icons/Chevron/index.tsx +9 -2
- package/src/Icons/Leave/index.tsx +7 -1
- 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/Footer.tsx +1 -1
- package/src/components/HMSDangerButton.tsx +2 -1
- package/src/components/HMSHLSStreamLoading.tsx +9 -3
- package/src/components/HMSKeyboardAvoidingView.tsx +3 -3
- package/src/components/HMSLiveIndicator.tsx +3 -3
- package/src/components/HMSManageLeave.tsx +2 -1
- package/src/components/HMSManageRaiseHand.tsx +20 -13
- package/src/components/HMSPreviewHLSLiveIndicator.tsx +3 -2
- package/src/components/HMSPreviewJoinButton.tsx +15 -4
- package/src/components/HMSPreviewTile.tsx +1 -1
- package/src/components/HMSRecordingIndicator.tsx +3 -1
- package/src/components/HMSTextInput.tsx +3 -3
- package/src/components/PIPView.tsx +34 -13
- 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 +3 -3
- 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 +1 -1
- package/src/components/PeerVideoTile/PeerAudioIndicator.tsx +11 -6
- package/src/components/PeerVideoTile/PeerMetadata.tsx +21 -12
- package/src/components/PeerVideoTile/PeerVideoTileView.tsx +25 -8
- package/src/components/Preview.tsx +23 -9
- package/src/components/PreviewForRoleChangeModal.tsx +1 -6
- package/src/components/RoomSettingsModalContent.tsx +44 -9
- package/src/components/RoomSettingsModalDebugModeContent.tsx +1 -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 +229 -193
- package/src/redux/actionTypes.ts +4 -1
- package/src/redux/actions/index.ts +17 -1
- package/src/redux/reducers/hmsStates.ts +269 -36
- package/src/utils/functions.ts +0 -1
- package/src/utils/types.ts +2 -0
- 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
|
@@ -46,9 +46,14 @@ import {
|
|
|
46
46
|
} from 'react';
|
|
47
47
|
import type { DependencyList } from 'react';
|
|
48
48
|
|
|
49
|
-
import {
|
|
49
|
+
import {
|
|
50
|
+
MaxTilesInOnePage,
|
|
51
|
+
ModalTypes,
|
|
52
|
+
PeerListRefreshInterval,
|
|
53
|
+
PipModes,
|
|
54
|
+
} from './utils/types';
|
|
50
55
|
import type { ChatBroadcastFilter, PeerTrackNode } from './utils/types';
|
|
51
|
-
import { createPeerTrackNode
|
|
56
|
+
import { createPeerTrackNode } from './utils/functions';
|
|
52
57
|
import {
|
|
53
58
|
batch,
|
|
54
59
|
shallowEqual,
|
|
@@ -61,6 +66,7 @@ import {
|
|
|
61
66
|
addMessage,
|
|
62
67
|
addNotification,
|
|
63
68
|
addParticipant,
|
|
69
|
+
addParticipants,
|
|
64
70
|
addPinnedMessage,
|
|
65
71
|
addScreenshareTile,
|
|
66
72
|
addUpdateParticipant,
|
|
@@ -70,7 +76,9 @@ import {
|
|
|
70
76
|
clearStore,
|
|
71
77
|
removeNotification,
|
|
72
78
|
removeParticipant,
|
|
79
|
+
removeParticipants,
|
|
73
80
|
removeScreenshareTile,
|
|
81
|
+
replaceParticipantsList,
|
|
74
82
|
saveUserData,
|
|
75
83
|
setActiveChatBottomSheetTab,
|
|
76
84
|
setActiveSpeakers,
|
|
@@ -103,13 +111,7 @@ import {
|
|
|
103
111
|
replacePeerTrackNodesWithTrack,
|
|
104
112
|
} from './peerTrackNodeUtils';
|
|
105
113
|
import { MeetingState } from './types';
|
|
106
|
-
import {
|
|
107
|
-
AppState,
|
|
108
|
-
InteractionManager,
|
|
109
|
-
Keyboard,
|
|
110
|
-
LayoutAnimation,
|
|
111
|
-
Platform,
|
|
112
|
-
} from 'react-native';
|
|
114
|
+
import { InteractionManager, Keyboard, Platform } from 'react-native';
|
|
113
115
|
import type { ImageStyle, StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
114
116
|
import { NavigationContext } from '@react-navigation/native';
|
|
115
117
|
import {
|
|
@@ -139,6 +141,8 @@ export const useHMSListeners = (
|
|
|
139
141
|
|
|
140
142
|
useHMSPeersUpdate(hmsInstance, updateLocalPeer, setPeerTrackNodes);
|
|
141
143
|
|
|
144
|
+
useHMSPeerListUpdated(hmsInstance);
|
|
145
|
+
|
|
142
146
|
useHMSTrackUpdate(hmsInstance, updateLocalPeer, setPeerTrackNodes);
|
|
143
147
|
};
|
|
144
148
|
|
|
@@ -414,6 +418,7 @@ const useHMSPeersUpdate = (
|
|
|
414
418
|
}
|
|
415
419
|
if (
|
|
416
420
|
type === HMSPeerUpdate.METADATA_CHANGED ||
|
|
421
|
+
type === HMSPeerUpdate.HAND_RAISED_CHANGED ||
|
|
417
422
|
type === HMSPeerUpdate.NAME_CHANGED ||
|
|
418
423
|
type === HMSPeerUpdate.NETWORK_QUALITY_UPDATED
|
|
419
424
|
) {
|
|
@@ -421,8 +426,8 @@ const useHMSPeersUpdate = (
|
|
|
421
426
|
|
|
422
427
|
const reduxState = store.getState();
|
|
423
428
|
|
|
424
|
-
if (type === HMSPeerUpdate.
|
|
425
|
-
const handRaised =
|
|
429
|
+
if (type === HMSPeerUpdate.HAND_RAISED_CHANGED) {
|
|
430
|
+
const handRaised = peer.isHandRaised;
|
|
426
431
|
|
|
427
432
|
if (handRaised) {
|
|
428
433
|
const { layoutConfig, localPeer } = reduxState.hmsStates;
|
|
@@ -506,6 +511,38 @@ const useHMSPeersUpdate = (
|
|
|
506
511
|
}, [hmsInstance]);
|
|
507
512
|
};
|
|
508
513
|
|
|
514
|
+
type PeerListUpdate = {
|
|
515
|
+
addedPeers: HMSPeer[];
|
|
516
|
+
removedPeers: HMSPeer[];
|
|
517
|
+
};
|
|
518
|
+
|
|
519
|
+
const useHMSPeerListUpdated = (hmsInstance: HMSSDK) => {
|
|
520
|
+
const dispatch = useDispatch();
|
|
521
|
+
|
|
522
|
+
useEffect(() => {
|
|
523
|
+
const peerListUpdateHandler = ({
|
|
524
|
+
addedPeers,
|
|
525
|
+
removedPeers,
|
|
526
|
+
}: PeerListUpdate) => {
|
|
527
|
+
batch(() => {
|
|
528
|
+
dispatch(addParticipants(addedPeers));
|
|
529
|
+
dispatch(removeParticipants(removedPeers));
|
|
530
|
+
});
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
hmsInstance.addEventListener(
|
|
534
|
+
HMSUpdateListenerActions.ON_PEER_LIST_UPDATED,
|
|
535
|
+
peerListUpdateHandler
|
|
536
|
+
);
|
|
537
|
+
|
|
538
|
+
return () => {
|
|
539
|
+
hmsInstance.removeEventListener(
|
|
540
|
+
HMSUpdateListenerActions.ON_PEER_LIST_UPDATED
|
|
541
|
+
);
|
|
542
|
+
};
|
|
543
|
+
}, [hmsInstance]);
|
|
544
|
+
};
|
|
545
|
+
|
|
509
546
|
type TrackUpdate = {
|
|
510
547
|
peer: HMSPeer;
|
|
511
548
|
track: HMSTrack;
|
|
@@ -1270,20 +1307,27 @@ export const usePIPListener = () => {
|
|
|
1270
1307
|
);
|
|
1271
1308
|
|
|
1272
1309
|
useEffect(() => {
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1310
|
+
const pipModeChangedHandler = (data: {
|
|
1311
|
+
isInPictureInPictureMode: boolean;
|
|
1312
|
+
}) => {
|
|
1313
|
+
dispatch(
|
|
1314
|
+
changePipModeStatus(
|
|
1315
|
+
data.isInPictureInPictureMode ? PipModes.ACTIVE : PipModes.INACTIVE
|
|
1316
|
+
)
|
|
1317
|
+
);
|
|
1318
|
+
};
|
|
1278
1319
|
|
|
1279
|
-
|
|
1320
|
+
hmsInstance.addEventListener(
|
|
1321
|
+
HMSPIPListenerActions.ON_PIP_MODE_CHANGED,
|
|
1322
|
+
pipModeChangedHandler
|
|
1323
|
+
);
|
|
1280
1324
|
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
}
|
|
1286
|
-
}, [
|
|
1325
|
+
return () => {
|
|
1326
|
+
hmsInstance.removeEventListener(
|
|
1327
|
+
HMSPIPListenerActions.ON_PIP_MODE_CHANGED
|
|
1328
|
+
);
|
|
1329
|
+
};
|
|
1330
|
+
}, []);
|
|
1287
1331
|
|
|
1288
1332
|
// Check if PIP is supported or not
|
|
1289
1333
|
useEffect(() => {
|
|
@@ -1524,7 +1568,6 @@ export const useHMSConfig = () => {
|
|
|
1524
1568
|
username: storeState.user.userName,
|
|
1525
1569
|
captureNetworkQualityInPreview: true,
|
|
1526
1570
|
endpoint: storeState.user.endPoints?.init,
|
|
1527
|
-
// metadata: JSON.stringify({isHandRaised: true}), // To join with hand raised
|
|
1528
1571
|
});
|
|
1529
1572
|
|
|
1530
1573
|
return hmsConfig;
|
|
@@ -1634,30 +1677,68 @@ export const useLandscapeChatViewVisible = () => {
|
|
|
1634
1677
|
return pipModeNotActive && isLandscapeOrientation && overlayChatVisible;
|
|
1635
1678
|
};
|
|
1636
1679
|
|
|
1637
|
-
export type
|
|
1680
|
+
export type ParticipantAccordianData = {
|
|
1681
|
+
id: string;
|
|
1638
1682
|
label: string;
|
|
1639
|
-
|
|
1640
|
-
|
|
1683
|
+
showViewAll: boolean;
|
|
1684
|
+
data: (HMSPeer | HMSLocalPeer)[];
|
|
1641
1685
|
};
|
|
1642
1686
|
|
|
1643
|
-
export
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1687
|
+
export const useOffStageParticipants = () => {
|
|
1688
|
+
const dispatch = useDispatch();
|
|
1689
|
+
const hmsInstance = useHMSInstance();
|
|
1690
|
+
const offStageRoles = useHMSLayoutConfig(
|
|
1691
|
+
(layoutConfig) =>
|
|
1692
|
+
layoutConfig?.screens?.conferencing?.default?.elements?.on_stage_exp
|
|
1693
|
+
?.off_stage_roles || null
|
|
1694
|
+
);
|
|
1695
|
+
|
|
1696
|
+
const [participantsTotalCounts, setParticipantsTotalCounts] = useState<
|
|
1697
|
+
Record<string, number>
|
|
1698
|
+
>({});
|
|
1699
|
+
|
|
1700
|
+
useEffect(() => {
|
|
1701
|
+
if (offStageRoles) {
|
|
1702
|
+
let mounted = true;
|
|
1647
1703
|
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1704
|
+
const createIterator = async (forRole: string) => {
|
|
1705
|
+
const iterator = hmsInstance.getPeerListIterator({
|
|
1706
|
+
byRoleName: forRole,
|
|
1707
|
+
limit: 10,
|
|
1708
|
+
});
|
|
1709
|
+
const participants = await iterator.next();
|
|
1710
|
+
if (mounted) {
|
|
1711
|
+
dispatch(replaceParticipantsList(participants, forRole));
|
|
1712
|
+
setParticipantsTotalCounts((prev) => ({
|
|
1713
|
+
...prev,
|
|
1714
|
+
[forRole]: iterator.totalCount,
|
|
1715
|
+
}));
|
|
1716
|
+
}
|
|
1717
|
+
};
|
|
1718
|
+
|
|
1719
|
+
const createIteratorForRoles = () => {
|
|
1720
|
+
offStageRoles.forEach((role) => {
|
|
1721
|
+
createIterator(role);
|
|
1722
|
+
});
|
|
1723
|
+
};
|
|
1724
|
+
|
|
1725
|
+
createIteratorForRoles();
|
|
1726
|
+
|
|
1727
|
+
const intervalId = setInterval(() => {
|
|
1728
|
+
createIteratorForRoles();
|
|
1729
|
+
}, PeerListRefreshInterval);
|
|
1730
|
+
|
|
1731
|
+
return () => {
|
|
1732
|
+
mounted = false;
|
|
1733
|
+
clearInterval(intervalId);
|
|
1734
|
+
};
|
|
1735
|
+
}
|
|
1736
|
+
}, [offStageRoles]);
|
|
1737
|
+
|
|
1738
|
+
return participantsTotalCounts;
|
|
1658
1739
|
};
|
|
1659
1740
|
|
|
1660
|
-
export const useFilteredParticipants = () => {
|
|
1741
|
+
export const useFilteredParticipants = (filterText: string) => {
|
|
1661
1742
|
const roles = useSelector((state: RootState) => state.hmsStates.roles);
|
|
1662
1743
|
const onStageRole = useHMSLayoutConfig(
|
|
1663
1744
|
(layoutConfig) =>
|
|
@@ -1665,183 +1746,138 @@ export const useFilteredParticipants = () => {
|
|
|
1665
1746
|
?.on_stage_role || null
|
|
1666
1747
|
);
|
|
1667
1748
|
|
|
1668
|
-
const
|
|
1669
|
-
const formattedSearchText = searchText.trim().toLowerCase();
|
|
1670
|
-
|
|
1671
|
-
const participants = useSelector(
|
|
1672
|
-
(state: RootState) => state.hmsStates.participants
|
|
1673
|
-
);
|
|
1749
|
+
const offStageParticipantsTotalCounts = useOffStageParticipants();
|
|
1674
1750
|
|
|
1675
|
-
const
|
|
1676
|
-
return groupParticipantsAsPerRole(participants, formattedSearchText);
|
|
1677
|
-
}, [formattedSearchText, participants]);
|
|
1751
|
+
const formattedSearchText = filterText.trim().toLowerCase();
|
|
1678
1752
|
|
|
1679
|
-
const
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
.sort((a, b) => {
|
|
1683
|
-
if (onStageRole) {
|
|
1684
|
-
if (a.name === onStageRole && b.name === onStageRole) {
|
|
1685
|
-
return 0;
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
|
-
if (a.name === onStageRole) {
|
|
1689
|
-
return -1;
|
|
1690
|
-
}
|
|
1753
|
+
const groupedParticipants = useSelector(
|
|
1754
|
+
(state: RootState) => state.hmsStates.groupedParticipants
|
|
1755
|
+
);
|
|
1691
1756
|
|
|
1692
|
-
|
|
1693
|
-
|
|
1757
|
+
const sortedRoles = useMemo(
|
|
1758
|
+
() => {
|
|
1759
|
+
return roles
|
|
1760
|
+
.filter((role) => {
|
|
1761
|
+
if (!role.name || role.name.startsWith('_')) {
|
|
1762
|
+
return false;
|
|
1694
1763
|
}
|
|
1695
|
-
|
|
1764
|
+
return true;
|
|
1696
1765
|
|
|
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
|
-
}
|
|
1766
|
+
// const list = groupedParticipants[role.name!];
|
|
1709
1767
|
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1768
|
+
// return list && list.length > 0;
|
|
1769
|
+
})
|
|
1770
|
+
.sort((a, b) => {
|
|
1771
|
+
if (onStageRole) {
|
|
1772
|
+
if (a.name === onStageRole && b.name === onStageRole) {
|
|
1773
|
+
return 0;
|
|
1774
|
+
}
|
|
1717
1775
|
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1776
|
+
if (a.name === onStageRole) {
|
|
1777
|
+
return -1;
|
|
1778
|
+
}
|
|
1721
1779
|
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1780
|
+
if (b.name === onStageRole) {
|
|
1781
|
+
return 1;
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1725
1784
|
|
|
1726
|
-
|
|
1727
|
-
|
|
1785
|
+
const canAPublish: boolean =
|
|
1786
|
+
(a.publishSettings?.allowed &&
|
|
1787
|
+
a.publishSettings.allowed.length > 0) ??
|
|
1788
|
+
false;
|
|
1789
|
+
const canBPublish: boolean =
|
|
1790
|
+
(b.publishSettings?.allowed &&
|
|
1791
|
+
b.publishSettings.allowed.length > 0) ??
|
|
1792
|
+
false;
|
|
1728
1793
|
|
|
1729
|
-
|
|
1794
|
+
if (canAPublish && canBPublish) {
|
|
1795
|
+
return 0;
|
|
1796
|
+
}
|
|
1730
1797
|
|
|
1731
|
-
|
|
1732
|
-
|
|
1798
|
+
if (canAPublish) {
|
|
1799
|
+
return -1;
|
|
1800
|
+
}
|
|
1733
1801
|
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
},
|
|
1741
|
-
});
|
|
1802
|
+
return 1;
|
|
1803
|
+
});
|
|
1804
|
+
},
|
|
1805
|
+
// [groupedParticipants, onStageRole, roles]
|
|
1806
|
+
[onStageRole, roles]
|
|
1807
|
+
);
|
|
1742
1808
|
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
handRaisedPeers.map((peer, idx, arr) => {
|
|
1746
|
-
const isLast = arr.length - 1 === idx;
|
|
1809
|
+
const participantsAccordianData: ParticipantAccordianData[] = useMemo(() => {
|
|
1810
|
+
const t = [];
|
|
1747
1811
|
|
|
1748
|
-
|
|
1749
|
-
data: peer,
|
|
1750
|
-
key: `${peer.peerID}--${'hand-raised'}`,
|
|
1751
|
-
type: isLast ? 'LAST_ITEM' : 'REGULAR_ITEM',
|
|
1752
|
-
};
|
|
1753
|
-
})
|
|
1754
|
-
);
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1812
|
+
const filteredHandRaisedPeers: (HMSPeer | HMSLocalPeer)[][] = [];
|
|
1757
1813
|
|
|
1758
1814
|
sortedRoles.forEach((role) => {
|
|
1759
|
-
const
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1815
|
+
const list = groupedParticipants[role.name!];
|
|
1816
|
+
const filteredList =
|
|
1817
|
+
Array.isArray(list) && formattedSearchText.length > 0
|
|
1818
|
+
? list.filter((peer) =>
|
|
1819
|
+
peer.name.toLowerCase().includes(formattedSearchText)
|
|
1820
|
+
)
|
|
1821
|
+
: list;
|
|
1822
|
+
|
|
1823
|
+
if (Array.isArray(filteredList) && filteredList.length > 0) {
|
|
1824
|
+
|
|
1825
|
+
filteredHandRaisedPeers.push(filteredList);
|
|
1826
|
+
const offStageRoleTotalCount =
|
|
1827
|
+
offStageParticipantsTotalCounts[role.name!];
|
|
1828
|
+
|
|
1829
|
+
const firstTen = filteredList.slice(0, 10);
|
|
1830
|
+
|
|
1831
|
+
t.push({
|
|
1832
|
+
id: role.name!,
|
|
1833
|
+
label: `${role.name!} (${
|
|
1834
|
+
typeof offStageRoleTotalCount === 'number'
|
|
1835
|
+
? offStageRoleTotalCount
|
|
1836
|
+
: filteredList.length
|
|
1837
|
+
})`,
|
|
1838
|
+
showViewAll:
|
|
1839
|
+
typeof offStageRoleTotalCount === 'number' &&
|
|
1840
|
+
formattedSearchText.length <= 0
|
|
1841
|
+
? offStageRoleTotalCount > 10
|
|
1842
|
+
: filteredList.length > 10,
|
|
1843
|
+
data: firstTen,
|
|
1772
1844
|
});
|
|
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
1845
|
}
|
|
1788
1846
|
});
|
|
1789
1847
|
|
|
1790
|
-
|
|
1791
|
-
|
|
1848
|
+
const handRaisedParticipants = filteredHandRaisedPeers
|
|
1849
|
+
.flat()
|
|
1850
|
+
.filter((participant) => participant.isHandRaised);
|
|
1792
1851
|
|
|
1793
|
-
|
|
1794
|
-
data: groupedList,
|
|
1795
|
-
searchText,
|
|
1796
|
-
formattedSearchText,
|
|
1797
|
-
setSearchText,
|
|
1798
|
-
expandedGroups,
|
|
1799
|
-
setExpandedGroups,
|
|
1800
|
-
};
|
|
1801
|
-
};
|
|
1802
|
-
|
|
1803
|
-
const groupParticipantsAsPerRole = (
|
|
1804
|
-
participants: (HMSLocalPeer | HMSPeer)[],
|
|
1805
|
-
searchText: string
|
|
1806
|
-
) => {
|
|
1807
|
-
const groups: Map<string, (HMSLocalPeer | HMSPeer)[]> = new Map();
|
|
1808
|
-
|
|
1809
|
-
for (const participant of participants) {
|
|
1810
|
-
const participantRole = participant.role;
|
|
1852
|
+
const firstTenHandRaisedParticipants = handRaisedParticipants.slice(0, 10);
|
|
1811
1853
|
|
|
1812
|
-
if (
|
|
1813
|
-
|
|
1854
|
+
if (handRaisedParticipants.length > 0) {
|
|
1855
|
+
t.unshift({
|
|
1856
|
+
id: 'hand-raised',
|
|
1857
|
+
label: `Hand Raised (${handRaisedParticipants.length})`,
|
|
1858
|
+
showViewAll: handRaisedParticipants.length > 10,
|
|
1859
|
+
data: firstTenHandRaisedParticipants,
|
|
1860
|
+
});
|
|
1814
1861
|
}
|
|
1815
1862
|
|
|
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');
|
|
1863
|
+
return t;
|
|
1864
|
+
}, [
|
|
1865
|
+
formattedSearchText,
|
|
1866
|
+
groupedParticipants,
|
|
1867
|
+
offStageParticipantsTotalCounts,
|
|
1868
|
+
sortedRoles,
|
|
1869
|
+
]);
|
|
1838
1870
|
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
}
|
|
1871
|
+
const [expandedGroup, setExpandedGroup] = useState<string | null>(
|
|
1872
|
+
participantsAccordianData[0]?.id ?? null
|
|
1873
|
+
);
|
|
1843
1874
|
|
|
1844
|
-
return
|
|
1875
|
+
return {
|
|
1876
|
+
data: participantsAccordianData,
|
|
1877
|
+
formattedSearchText,
|
|
1878
|
+
expandedGroup,
|
|
1879
|
+
setExpandedGroup,
|
|
1880
|
+
};
|
|
1845
1881
|
};
|
|
1846
1882
|
|
|
1847
1883
|
export const useShouldGoLive = () => {
|
package/src/redux/actionTypes.ts
CHANGED
|
@@ -141,8 +141,11 @@ export enum HmsStateActionTypes {
|
|
|
141
141
|
SET_LAYOUT_CONFIG = 'SET_LAYOUT_CONFIG',
|
|
142
142
|
SET_ROLE_CHANGE_REQUEST = 'SET_ROLE_CHANGE_REQUEST',
|
|
143
143
|
ADD_PARTICIPANT = 'ADD_PARTICIPANT',
|
|
144
|
+
ADD_PARTICIPANTS = 'ADD_PARTICIPANTS',
|
|
144
145
|
REMOVE_PARTICIPANT = 'REMOVE_PARTICIPANT',
|
|
145
|
-
|
|
146
|
+
REMOVE_PARTICIPANTS = 'REMOVE_PARTICIPANTS',
|
|
147
|
+
UPDATE_PARTICIPANT = 'UPDATE_PARTICIPANT',
|
|
148
|
+
REPLACE_PARTICIPANTS_LIST = 'REPLACE_PARTICIPANTS_LIST',
|
|
146
149
|
SET_ACTIVE_SPEAKERS = 'SET_ACTIVE_SPEAKERS',
|
|
147
150
|
SET_RECONNECTING = 'SET_RECONNECTING',
|
|
148
151
|
}
|
|
@@ -344,16 +344,32 @@ export const addParticipant = (participant: HMSPeer) => ({
|
|
|
344
344
|
participant,
|
|
345
345
|
});
|
|
346
346
|
|
|
347
|
+
export const addParticipants = (participants: HMSPeer[]) => ({
|
|
348
|
+
type: HmsStateActionTypes.ADD_PARTICIPANTS,
|
|
349
|
+
participants,
|
|
350
|
+
});
|
|
351
|
+
|
|
347
352
|
export const removeParticipant = (participant: HMSPeer) => ({
|
|
348
353
|
type: HmsStateActionTypes.REMOVE_PARTICIPANT,
|
|
349
354
|
participant,
|
|
350
355
|
});
|
|
351
356
|
|
|
357
|
+
export const removeParticipants = (participants: HMSPeer[]) => ({
|
|
358
|
+
type: HmsStateActionTypes.REMOVE_PARTICIPANTS,
|
|
359
|
+
participants,
|
|
360
|
+
});
|
|
361
|
+
|
|
352
362
|
export const addUpdateParticipant = (participant: HMSPeer) => ({
|
|
353
|
-
type: HmsStateActionTypes.
|
|
363
|
+
type: HmsStateActionTypes.UPDATE_PARTICIPANT,
|
|
354
364
|
participant,
|
|
355
365
|
});
|
|
356
366
|
|
|
367
|
+
export const replaceParticipantsList = (participants: HMSPeer[], roleName: string) => ({
|
|
368
|
+
type: HmsStateActionTypes.REPLACE_PARTICIPANTS_LIST,
|
|
369
|
+
participants,
|
|
370
|
+
roleName,
|
|
371
|
+
});
|
|
372
|
+
|
|
357
373
|
export const setActiveSpeakers = (activeSpeakers: HMSSpeaker[]) => ({
|
|
358
374
|
type: HmsStateActionTypes.SET_ACTIVE_SPEAKERS,
|
|
359
375
|
activeSpeakers,
|