@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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useShowLandscapeLayout = exports.useShowChatAndParticipants = exports.useShouldGoLive = exports.useSendMessage = exports.usePortraitChatViewVisible = exports.usePIPListener = exports.useModalType = exports.useLeaveMethods = exports.useLandscapeChatViewVisible = exports.useIsHLSViewer = exports.useHMSSessionStoreListeners = exports.useHMSSessionStore = exports.useHMSRoomTypography = exports.useHMSRoomTheme = exports.useHMSRoomStyleSheet = exports.useHMSRoomStyle = exports.useHMSRoomColorPalette = exports.useHMSRoleChangeRequest = exports.useHMSRemovedFromRoomUpdate = exports.useHMSReconnection = exports.useHMSPIPRoomLeave = exports.useHMSNetworkQualityUpdate = exports.useHMSMessages = exports.useHMSListeners = exports.useHMSLayoutConfig = exports.useHMSInstance = exports.useHMSConfig = exports.useHMSConferencingScreenConfig = exports.useHMSChatLayoutConfig = exports.useHMSChangeTrackStateRequest = exports.useHMSActiveSpeakerUpdates = exports.useFilteredParticipants = exports.useFetchHMSRoles = exports.isPublishingAllowed = exports.clearPendingModalTasks = exports.clearConfig = void 0;
|
|
6
|
+
exports.useStartRecording = exports.useShowLandscapeLayout = exports.useShowChatAndParticipants = exports.useShouldGoLive = exports.useSendMessage = exports.useSavePropsToStore = exports.usePortraitChatViewVisible = exports.usePipAspectRatio = exports.usePIPListener = exports.useOffStageParticipants = exports.useModalType = exports.useLeaveMethods = exports.useLandscapeChatViewVisible = exports.useIsHLSViewer = exports.useHMSSessionStoreListeners = exports.useHMSSessionStore = exports.useHMSRoomTypography = exports.useHMSRoomTheme = exports.useHMSRoomStyleSheet = exports.useHMSRoomStyle = exports.useHMSRoomColorPalette = exports.useHMSRoleChangeRequest = exports.useHMSRemovedFromRoomUpdate = exports.useHMSReconnection = exports.useHMSPIPRoomLeave = exports.useHMSNetworkQualityUpdate = exports.useHMSMessages = exports.useHMSListeners = exports.useHMSLayoutConfig = exports.useHMSInstance = exports.useHMSConfig = exports.useHMSConferencingScreenConfig = exports.useHMSChatLayoutConfig = exports.useHMSChangeTrackStateRequest = exports.useHMSActiveSpeakerUpdates = exports.useFilteredParticipants = exports.useFetchHMSRoles = exports.useEnableAutoPip = exports.useDisableAutoPip = exports.useBackButtonPress = exports.useAutoPip = exports.isPublishingAllowed = exports.clearPendingModalTasks = exports.clearConfig = void 0;
|
|
7
7
|
var _reactNativeHms = require("@100mslive/react-native-hms");
|
|
8
8
|
var _reactNativeSimpleToast = _interopRequireDefault(require("react-native-simple-toast"));
|
|
9
9
|
var _react = require("react");
|
|
@@ -19,13 +19,13 @@ var _dimension = require("./utils/dimension");
|
|
|
19
19
|
var _hooksUtilSelectors = require("./hooks-util-selectors");
|
|
20
20
|
var _HMSManager = require("./modules/HMSManager");
|
|
21
21
|
var _theme = require("./utils/theme");
|
|
22
|
-
var _utils = require("./utils");
|
|
23
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
23
|
const useHMSListeners = setPeerTrackNodes => {
|
|
25
24
|
const hmsInstance = useHMSInstance();
|
|
26
25
|
const updateLocalPeer = useUpdateHMSLocalPeer(hmsInstance);
|
|
27
26
|
useHMSRoomUpdate(hmsInstance);
|
|
28
27
|
useHMSPeersUpdate(hmsInstance, updateLocalPeer, setPeerTrackNodes);
|
|
28
|
+
useHMSPeerListUpdated(hmsInstance);
|
|
29
29
|
useHMSTrackUpdate(hmsInstance, updateLocalPeer, setPeerTrackNodes);
|
|
30
30
|
};
|
|
31
31
|
exports.useHMSListeners = useHMSListeners;
|
|
@@ -222,11 +222,11 @@ const useHMSPeersUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
|
|
|
222
222
|
}
|
|
223
223
|
return;
|
|
224
224
|
}
|
|
225
|
-
if (type === _reactNativeHms.HMSPeerUpdate.METADATA_CHANGED || type === _reactNativeHms.HMSPeerUpdate.NAME_CHANGED || type === _reactNativeHms.HMSPeerUpdate.NETWORK_QUALITY_UPDATED) {
|
|
225
|
+
if (type === _reactNativeHms.HMSPeerUpdate.METADATA_CHANGED || type === _reactNativeHms.HMSPeerUpdate.HAND_RAISED_CHANGED || type === _reactNativeHms.HMSPeerUpdate.NAME_CHANGED || type === _reactNativeHms.HMSPeerUpdate.NETWORK_QUALITY_UPDATED) {
|
|
226
226
|
dispatch((0, _actions.addUpdateParticipant)(peer));
|
|
227
227
|
const reduxState = store.getState();
|
|
228
|
-
if (type === _reactNativeHms.HMSPeerUpdate.
|
|
229
|
-
const handRaised =
|
|
228
|
+
if (type === _reactNativeHms.HMSPeerUpdate.HAND_RAISED_CHANGED) {
|
|
229
|
+
const handRaised = peer.isHandRaised;
|
|
230
230
|
if (handRaised) {
|
|
231
231
|
var _selectedLayoutConfig, _peer$role11, _reduxState$hmsStates;
|
|
232
232
|
const {
|
|
@@ -243,14 +243,14 @@ const useHMSPeersUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
|
|
|
243
243
|
const canChangeRole = (_reduxState$hmsStates = reduxState.hmsStates.localPeer) === null || _reduxState$hmsStates === void 0 || (_reduxState$hmsStates = _reduxState$hmsStates.role) === null || _reduxState$hmsStates === void 0 || (_reduxState$hmsStates = _reduxState$hmsStates.permissions) === null || _reduxState$hmsStates === void 0 ? void 0 : _reduxState$hmsStates.changeRole;
|
|
244
244
|
if (shouldBringOnStage && canChangeRole) {
|
|
245
245
|
dispatch((0, _actions.addNotification)({
|
|
246
|
-
id: `${peer.peerID}-${
|
|
247
|
-
type:
|
|
246
|
+
id: `${peer.peerID}-${_types2.NotificationTypes.HAND_RAISE}`,
|
|
247
|
+
type: _types2.NotificationTypes.HAND_RAISE,
|
|
248
248
|
peer
|
|
249
249
|
}));
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
const notifications = reduxState.app.notifications;
|
|
253
|
-
const notificationToRemove = notifications.find(notification => notification.id === `${peer.peerID}-${
|
|
253
|
+
const notificationToRemove = notifications.find(notification => notification.id === `${peer.peerID}-${_types2.NotificationTypes.HAND_RAISE}`);
|
|
254
254
|
if (notificationToRemove) {
|
|
255
255
|
dispatch((0, _actions.removeNotification)(notificationToRemove.id));
|
|
256
256
|
}
|
|
@@ -289,6 +289,25 @@ const useHMSPeersUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
|
|
|
289
289
|
};
|
|
290
290
|
}, [hmsInstance]);
|
|
291
291
|
};
|
|
292
|
+
const useHMSPeerListUpdated = hmsInstance => {
|
|
293
|
+
const dispatch = (0, _reactRedux.useDispatch)();
|
|
294
|
+
(0, _react.useEffect)(() => {
|
|
295
|
+
const peerListUpdateHandler = _ref2 => {
|
|
296
|
+
let {
|
|
297
|
+
addedPeers,
|
|
298
|
+
removedPeers
|
|
299
|
+
} = _ref2;
|
|
300
|
+
(0, _reactRedux.batch)(() => {
|
|
301
|
+
dispatch((0, _actions.addParticipants)(addedPeers));
|
|
302
|
+
dispatch((0, _actions.removeParticipants)(removedPeers));
|
|
303
|
+
});
|
|
304
|
+
};
|
|
305
|
+
hmsInstance.addEventListener(_reactNativeHms.HMSUpdateListenerActions.ON_PEER_LIST_UPDATED, peerListUpdateHandler);
|
|
306
|
+
return () => {
|
|
307
|
+
hmsInstance.removeEventListener(_reactNativeHms.HMSUpdateListenerActions.ON_PEER_LIST_UPDATED);
|
|
308
|
+
};
|
|
309
|
+
}, [hmsInstance]);
|
|
310
|
+
};
|
|
292
311
|
const isPublishingAllowed = peer => {
|
|
293
312
|
var _peer$role12, _peer$role13;
|
|
294
313
|
return (((_peer$role12 = peer.role) === null || _peer$role12 === void 0 || (_peer$role12 = _peer$role12.publishSettings) === null || _peer$role12 === void 0 ? void 0 : _peer$role12.allowed) && ((_peer$role13 = peer.role) === null || _peer$role13 === void 0 || (_peer$role13 = _peer$role13.publishSettings) === null || _peer$role13 === void 0 || (_peer$role13 = _peer$role13.allowed) === null || _peer$role13 === void 0 ? void 0 : _peer$role13.length) > 0) ?? false;
|
|
@@ -298,13 +317,13 @@ const useHMSTrackUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
|
|
|
298
317
|
const dispatch = (0, _reactRedux.useDispatch)();
|
|
299
318
|
const store = (0, _reactRedux.useStore)();
|
|
300
319
|
(0, _react.useEffect)(() => {
|
|
301
|
-
const trackUpdateHandler =
|
|
320
|
+
const trackUpdateHandler = _ref3 => {
|
|
302
321
|
var _reduxState$hmsStates2, _selectVideoTileLayou2;
|
|
303
322
|
let {
|
|
304
323
|
peer,
|
|
305
324
|
track,
|
|
306
325
|
type
|
|
307
|
-
} =
|
|
326
|
+
} = _ref3;
|
|
308
327
|
const reduxState = store.getState();
|
|
309
328
|
const fullScreenPeerTrackNode = reduxState.app.fullScreenPeerTrackNode;
|
|
310
329
|
const miniviewPeerTrackNode = reduxState.app.miniviewPeerTrackNode;
|
|
@@ -759,10 +778,10 @@ const useHMSSessionStore = () => {
|
|
|
759
778
|
const hmsInstance = useHMSInstance();
|
|
760
779
|
const dispatch = (0, _reactRedux.useDispatch)();
|
|
761
780
|
(0, _react.useEffect)(() => {
|
|
762
|
-
const onSessionStoreAvailableListener =
|
|
781
|
+
const onSessionStoreAvailableListener = _ref4 => {
|
|
763
782
|
let {
|
|
764
783
|
sessionStore
|
|
765
|
-
} =
|
|
784
|
+
} = _ref4;
|
|
766
785
|
// Saving `sessionStore` reference in `redux`
|
|
767
786
|
dispatch((0, _actions.saveUserData)({
|
|
768
787
|
hmsSessionStore: sessionStore
|
|
@@ -788,12 +807,12 @@ const useHMSMessages = () => {
|
|
|
788
807
|
});
|
|
789
808
|
(0, _react.useEffect)(() => {
|
|
790
809
|
const onMessageListener = message => {
|
|
791
|
-
if (message.type ===
|
|
810
|
+
if (message.type === _types2.NotificationTypes.ROLE_CHANGE_DECLINED) {
|
|
792
811
|
if (canChangeRole) {
|
|
793
812
|
var _message$sender;
|
|
794
813
|
dispatch((0, _actions.addNotification)({
|
|
795
|
-
id: `${(_message$sender = message.sender) === null || _message$sender === void 0 ? void 0 : _message$sender.peerID}-${
|
|
796
|
-
type:
|
|
814
|
+
id: `${(_message$sender = message.sender) === null || _message$sender === void 0 ? void 0 : _message$sender.peerID}-${_types2.NotificationTypes.ROLE_CHANGE_DECLINED}`,
|
|
815
|
+
type: _types2.NotificationTypes.ROLE_CHANGE_DECLINED,
|
|
797
816
|
peer: message.sender
|
|
798
817
|
}));
|
|
799
818
|
}
|
|
@@ -818,12 +837,21 @@ const useHMSReconnection = () => {
|
|
|
818
837
|
let mounted = true;
|
|
819
838
|
hmsInstance.addEventListener(_reactNativeHms.HMSUpdateListenerActions.RECONNECTING, () => {
|
|
820
839
|
if (mounted) {
|
|
821
|
-
|
|
840
|
+
(0, _reactRedux.batch)(() => {
|
|
841
|
+
dispatch((0, _actions.setReconnecting)(true));
|
|
842
|
+
dispatch((0, _actions.addNotification)({
|
|
843
|
+
id: _types2.NotificationTypes.RECONNECTING,
|
|
844
|
+
type: _types2.NotificationTypes.RECONNECTING
|
|
845
|
+
}));
|
|
846
|
+
});
|
|
822
847
|
}
|
|
823
848
|
});
|
|
824
849
|
hmsInstance.addEventListener(_reactNativeHms.HMSUpdateListenerActions.RECONNECTED, () => {
|
|
825
850
|
if (mounted) {
|
|
826
|
-
|
|
851
|
+
(0, _reactRedux.batch)(() => {
|
|
852
|
+
dispatch((0, _actions.setReconnecting)(false));
|
|
853
|
+
dispatch((0, _actions.removeNotification)(_types2.NotificationTypes.RECONNECTING));
|
|
854
|
+
});
|
|
827
855
|
}
|
|
828
856
|
});
|
|
829
857
|
return () => {
|
|
@@ -838,10 +866,10 @@ const useHMSPIPRoomLeave = () => {
|
|
|
838
866
|
const hmsInstance = useHMSInstance();
|
|
839
867
|
const {
|
|
840
868
|
destroy
|
|
841
|
-
} = useLeaveMethods(
|
|
869
|
+
} = useLeaveMethods();
|
|
842
870
|
(0, _react.useEffect)(() => {
|
|
843
871
|
const pipRoomLeaveHandler = () => {
|
|
844
|
-
destroy();
|
|
872
|
+
destroy(_types.OnLeaveReason.PIP);
|
|
845
873
|
};
|
|
846
874
|
hmsInstance.addEventListener(_reactNativeHms.HMSPIPListenerActions.ON_PIP_ROOM_LEAVE, pipRoomLeaveHandler);
|
|
847
875
|
return () => {
|
|
@@ -854,10 +882,10 @@ const useHMSRemovedFromRoomUpdate = () => {
|
|
|
854
882
|
const hmsInstance = useHMSInstance();
|
|
855
883
|
const {
|
|
856
884
|
destroy
|
|
857
|
-
} = useLeaveMethods(
|
|
885
|
+
} = useLeaveMethods();
|
|
858
886
|
(0, _react.useEffect)(() => {
|
|
859
|
-
const removedFromRoomHandler =
|
|
860
|
-
destroy();
|
|
887
|
+
const removedFromRoomHandler = data => {
|
|
888
|
+
destroy(data.roomEnded ? _types.OnLeaveReason.ROOM_END : _types.OnLeaveReason.PEER_KICKED);
|
|
861
889
|
};
|
|
862
890
|
hmsInstance.addEventListener(_reactNativeHms.HMSUpdateListenerActions.ON_REMOVED_FROM_ROOM, removedFromRoomHandler);
|
|
863
891
|
return () => {
|
|
@@ -871,18 +899,14 @@ const usePIPListener = () => {
|
|
|
871
899
|
const dispatch = (0, _reactRedux.useDispatch)();
|
|
872
900
|
const isPipModeActive = (0, _reactRedux.useSelector)(state => state.app.pipModeStatus === _types.PipModes.ACTIVE);
|
|
873
901
|
(0, _react.useEffect)(() => {
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
dispatch((0, _actions.changePipModeStatus)(_types.PipModes.INACTIVE));
|
|
883
|
-
};
|
|
884
|
-
}
|
|
885
|
-
}, [isPipModeActive]);
|
|
902
|
+
const pipModeChangedHandler = data => {
|
|
903
|
+
dispatch((0, _actions.changePipModeStatus)(data.isInPictureInPictureMode ? _types.PipModes.ACTIVE : _types.PipModes.INACTIVE));
|
|
904
|
+
};
|
|
905
|
+
hmsInstance.addEventListener(_reactNativeHms.HMSPIPListenerActions.ON_PIP_MODE_CHANGED, pipModeChangedHandler);
|
|
906
|
+
return () => {
|
|
907
|
+
hmsInstance.removeEventListener(_reactNativeHms.HMSPIPListenerActions.ON_PIP_MODE_CHANGED);
|
|
908
|
+
};
|
|
909
|
+
}, []);
|
|
886
910
|
|
|
887
911
|
// Check if PIP is supported or not
|
|
888
912
|
(0, _react.useEffect)(() => {
|
|
@@ -911,6 +935,75 @@ const useHMSNetworkQualityUpdate = () => {
|
|
|
911
935
|
}, [hmsInstance]);
|
|
912
936
|
};
|
|
913
937
|
exports.useHMSNetworkQualityUpdate = useHMSNetworkQualityUpdate;
|
|
938
|
+
const useEnableAutoPip = () => {
|
|
939
|
+
const hmsInstance = useHMSInstance();
|
|
940
|
+
const enableAutoPip = (0, _react.useCallback)(data => {
|
|
941
|
+
hmsInstance.setPipParams({
|
|
942
|
+
...data,
|
|
943
|
+
autoEnterPipMode: true
|
|
944
|
+
});
|
|
945
|
+
}, [hmsInstance]);
|
|
946
|
+
return enableAutoPip;
|
|
947
|
+
};
|
|
948
|
+
exports.useEnableAutoPip = useEnableAutoPip;
|
|
949
|
+
const useDisableAutoPip = () => {
|
|
950
|
+
const hmsInstance = useHMSInstance();
|
|
951
|
+
const disableAutoPip = (0, _react.useCallback)(data => {
|
|
952
|
+
hmsInstance.setPipParams({
|
|
953
|
+
...data,
|
|
954
|
+
autoEnterPipMode: false
|
|
955
|
+
});
|
|
956
|
+
}, [hmsInstance]);
|
|
957
|
+
return disableAutoPip;
|
|
958
|
+
};
|
|
959
|
+
exports.useDisableAutoPip = useDisableAutoPip;
|
|
960
|
+
const useAutoPip = oneToOneCall => {
|
|
961
|
+
const enableAutoPip = useEnableAutoPip();
|
|
962
|
+
const disableAutoPip = useDisableAutoPip();
|
|
963
|
+
const autoEnterPipMode = (0, _reactRedux.useSelector)(state => state.app.autoEnterPipMode);
|
|
964
|
+
const [numerator, denominator] = usePipAspectRatio(oneToOneCall);
|
|
965
|
+
(0, _react.useEffect)(() => {
|
|
966
|
+
if (autoEnterPipMode) {
|
|
967
|
+
enableAutoPip({
|
|
968
|
+
aspectRatio: [numerator, denominator]
|
|
969
|
+
});
|
|
970
|
+
return disableAutoPip;
|
|
971
|
+
}
|
|
972
|
+
}, [numerator, denominator, autoEnterPipMode, enableAutoPip, disableAutoPip]);
|
|
973
|
+
};
|
|
974
|
+
exports.useAutoPip = useAutoPip;
|
|
975
|
+
const usePipAspectRatio = oneToOneCall => {
|
|
976
|
+
const isHLSViewer = useIsHLSViewer();
|
|
977
|
+
const hlsPlayerResolution = (0, _reactNativeHms.useHMSHLSPlayerResolution)();
|
|
978
|
+
const firstSSNodeId = (0, _reactRedux.useSelector)(state => {
|
|
979
|
+
var _ssPeerTrackNode$trac;
|
|
980
|
+
const ssPeerTrackNode = state.app.screensharePeerTrackNodes[0];
|
|
981
|
+
return ssPeerTrackNode === null || ssPeerTrackNode === void 0 || (_ssPeerTrackNode$trac = ssPeerTrackNode.track) === null || _ssPeerTrackNode$trac === void 0 ? void 0 : _ssPeerTrackNode$trac.trackId;
|
|
982
|
+
});
|
|
983
|
+
const ssResolution = (0, _reactNativeHms.useHmsViewsResolutionsState)(firstSSNodeId);
|
|
984
|
+
const aspectRatio = (0, _react.useMemo)(() => {
|
|
985
|
+
// When user is hlsviewer and we have stream resolution
|
|
986
|
+
if (isHLSViewer && hlsPlayerResolution) {
|
|
987
|
+
return [hlsPlayerResolution.width, hlsPlayerResolution.height];
|
|
988
|
+
}
|
|
989
|
+
// When user is hlsviewer and we don't have stream resolution
|
|
990
|
+
if (isHLSViewer) {
|
|
991
|
+
return [9, 16];
|
|
992
|
+
}
|
|
993
|
+
// When we have screenshare resolution, use it
|
|
994
|
+
if (ssResolution) {
|
|
995
|
+
return [ssResolution.width, ssResolution.height];
|
|
996
|
+
}
|
|
997
|
+
// When there is no screenshare and one-to-one call is happening
|
|
998
|
+
if (!firstSSNodeId && oneToOneCall) {
|
|
999
|
+
return [9, 16];
|
|
1000
|
+
}
|
|
1001
|
+
// default aspect ratio
|
|
1002
|
+
return [16, 9];
|
|
1003
|
+
}, [isHLSViewer, firstSSNodeId, oneToOneCall, ssResolution, hlsPlayerResolution]);
|
|
1004
|
+
return aspectRatio;
|
|
1005
|
+
};
|
|
1006
|
+
exports.usePipAspectRatio = usePipAspectRatio;
|
|
914
1007
|
const useHMSActiveSpeakerUpdates = (setPeerTrackNodes, active) => {
|
|
915
1008
|
const hmsInstance = useHMSInstance();
|
|
916
1009
|
const dispatch = (0, _reactRedux.useDispatch)();
|
|
@@ -1064,17 +1157,15 @@ const useHMSConfig = () => {
|
|
|
1064
1157
|
username: storeState.user.userName,
|
|
1065
1158
|
captureNetworkQualityInPreview: true,
|
|
1066
1159
|
endpoint: (_storeState$user$endP3 = storeState.user.endPoints) === null || _storeState$user$endP3 === void 0 ? void 0 : _storeState$user$endP3.init
|
|
1067
|
-
// metadata: JSON.stringify({isHandRaised: true}), // To join with hand raised
|
|
1068
1160
|
});
|
|
1069
|
-
|
|
1070
1161
|
return hmsConfig;
|
|
1071
1162
|
}, [hmsInstance]);
|
|
1072
1163
|
const updateConfig = (0, _react.useCallback)(data => {
|
|
1073
1164
|
if (!hmsConfig) {
|
|
1074
1165
|
throw new Error('No HMSConfig is available to update!');
|
|
1075
1166
|
}
|
|
1076
|
-
Object.entries(data).forEach(
|
|
1077
|
-
let [key, value] =
|
|
1167
|
+
Object.entries(data).forEach(_ref5 => {
|
|
1168
|
+
let [key, value] = _ref5;
|
|
1078
1169
|
// @ts-ignore
|
|
1079
1170
|
hmsConfig[key] = value;
|
|
1080
1171
|
});
|
|
@@ -1170,21 +1261,70 @@ const useLandscapeChatViewVisible = () => {
|
|
|
1170
1261
|
return pipModeNotActive && isLandscapeOrientation && overlayChatVisible;
|
|
1171
1262
|
};
|
|
1172
1263
|
exports.useLandscapeChatViewVisible = useLandscapeChatViewVisible;
|
|
1173
|
-
const
|
|
1174
|
-
|
|
1264
|
+
const useOffStageParticipants = () => {
|
|
1265
|
+
const dispatch = (0, _reactRedux.useDispatch)();
|
|
1266
|
+
const hmsInstance = useHMSInstance();
|
|
1267
|
+
const offStageRoles = useHMSLayoutConfig(layoutConfig => {
|
|
1268
|
+
var _layoutConfig$screens;
|
|
1269
|
+
return (layoutConfig === null || layoutConfig === void 0 || (_layoutConfig$screens = layoutConfig.screens) === null || _layoutConfig$screens === void 0 || (_layoutConfig$screens = _layoutConfig$screens.conferencing) === null || _layoutConfig$screens === void 0 || (_layoutConfig$screens = _layoutConfig$screens.default) === null || _layoutConfig$screens === void 0 || (_layoutConfig$screens = _layoutConfig$screens.elements) === null || _layoutConfig$screens === void 0 || (_layoutConfig$screens = _layoutConfig$screens.on_stage_exp) === null || _layoutConfig$screens === void 0 ? void 0 : _layoutConfig$screens.off_stage_roles) || null;
|
|
1270
|
+
});
|
|
1271
|
+
const [participantsTotalCounts, setParticipantsTotalCounts] = (0, _react.useState)({});
|
|
1272
|
+
(0, _react.useEffect)(() => {
|
|
1273
|
+
if (offStageRoles) {
|
|
1274
|
+
let mounted = true;
|
|
1275
|
+
const createIterator = async forRole => {
|
|
1276
|
+
const iterator = hmsInstance.getPeerListIterator({
|
|
1277
|
+
byRoleName: forRole,
|
|
1278
|
+
limit: 10
|
|
1279
|
+
});
|
|
1280
|
+
const participants = await iterator.next();
|
|
1281
|
+
if (mounted) {
|
|
1282
|
+
dispatch((0, _actions.replaceParticipantsList)(participants, forRole));
|
|
1283
|
+
setParticipantsTotalCounts(prev => ({
|
|
1284
|
+
...prev,
|
|
1285
|
+
[forRole]: iterator.totalCount
|
|
1286
|
+
}));
|
|
1287
|
+
}
|
|
1288
|
+
};
|
|
1289
|
+
const createIteratorForRoles = () => {
|
|
1290
|
+
offStageRoles.forEach(role => {
|
|
1291
|
+
createIterator(role);
|
|
1292
|
+
});
|
|
1293
|
+
};
|
|
1294
|
+
createIteratorForRoles();
|
|
1295
|
+
const intervalId = setInterval(() => {
|
|
1296
|
+
createIteratorForRoles();
|
|
1297
|
+
}, _types.PeerListRefreshInterval);
|
|
1298
|
+
return () => {
|
|
1299
|
+
mounted = false;
|
|
1300
|
+
clearInterval(intervalId);
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
}, [offStageRoles]);
|
|
1304
|
+
return participantsTotalCounts;
|
|
1305
|
+
};
|
|
1306
|
+
exports.useOffStageParticipants = useOffStageParticipants;
|
|
1307
|
+
const useFilteredParticipants = filterText => {
|
|
1308
|
+
var _participantsAccordia;
|
|
1175
1309
|
const roles = (0, _reactRedux.useSelector)(state => state.hmsStates.roles);
|
|
1176
1310
|
const onStageRole = useHMSLayoutConfig(layoutConfig => {
|
|
1177
|
-
var _layoutConfig$
|
|
1178
|
-
return (layoutConfig === null || layoutConfig === void 0 || (_layoutConfig$
|
|
1311
|
+
var _layoutConfig$screens2;
|
|
1312
|
+
return (layoutConfig === null || layoutConfig === void 0 || (_layoutConfig$screens2 = layoutConfig.screens) === null || _layoutConfig$screens2 === void 0 || (_layoutConfig$screens2 = _layoutConfig$screens2.conferencing) === null || _layoutConfig$screens2 === void 0 || (_layoutConfig$screens2 = _layoutConfig$screens2.default) === null || _layoutConfig$screens2 === void 0 || (_layoutConfig$screens2 = _layoutConfig$screens2.elements) === null || _layoutConfig$screens2 === void 0 || (_layoutConfig$screens2 = _layoutConfig$screens2.on_stage_exp) === null || _layoutConfig$screens2 === void 0 ? void 0 : _layoutConfig$screens2.on_stage_role) || null;
|
|
1179
1313
|
});
|
|
1180
|
-
const
|
|
1181
|
-
const formattedSearchText =
|
|
1182
|
-
const
|
|
1183
|
-
const peerGroups = (0, _react.useMemo)(() => {
|
|
1184
|
-
return groupParticipantsAsPerRole(participants, formattedSearchText);
|
|
1185
|
-
}, [formattedSearchText, participants]);
|
|
1314
|
+
const offStageParticipantsTotalCounts = useOffStageParticipants();
|
|
1315
|
+
const formattedSearchText = filterText.trim().toLowerCase();
|
|
1316
|
+
const groupedParticipants = (0, _reactRedux.useSelector)(state => state.hmsStates.groupedParticipants);
|
|
1186
1317
|
const sortedRoles = (0, _react.useMemo)(() => {
|
|
1187
|
-
return roles.filter(role =>
|
|
1318
|
+
return roles.filter(role => {
|
|
1319
|
+
if (!role.name || role.name.startsWith('_')) {
|
|
1320
|
+
return false;
|
|
1321
|
+
}
|
|
1322
|
+
return true;
|
|
1323
|
+
|
|
1324
|
+
// const list = groupedParticipants[role.name!];
|
|
1325
|
+
|
|
1326
|
+
// return list && list.length > 0;
|
|
1327
|
+
}).sort((a, b) => {
|
|
1188
1328
|
var _a$publishSettings, _b$publishSettings;
|
|
1189
1329
|
if (onStageRole) {
|
|
1190
1330
|
if (a.name === onStageRole && b.name === onStageRole) {
|
|
@@ -1207,108 +1347,59 @@ const useFilteredParticipants = () => {
|
|
|
1207
1347
|
}
|
|
1208
1348
|
return 1;
|
|
1209
1349
|
});
|
|
1210
|
-
},
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
const
|
|
1214
|
-
|
|
1215
|
-
const
|
|
1216
|
-
if (handRaisedPeers) {
|
|
1217
|
-
const expanded = expandedGroups.includes('hand-raised');
|
|
1218
|
-
list.push({
|
|
1219
|
-
type: expanded ? 'EXPANDED_HEADER' : 'COLLAPSED_HEADER',
|
|
1220
|
-
key: 'hand-raised',
|
|
1221
|
-
data: {
|
|
1222
|
-
label: `Hand Raised (${handRaisedPeers.length})`,
|
|
1223
|
-
itemsLength: handRaisedPeers.length
|
|
1224
|
-
}
|
|
1225
|
-
});
|
|
1226
|
-
if (expanded) {
|
|
1227
|
-
list = list.concat(handRaisedPeers.map((peer, idx, arr) => {
|
|
1228
|
-
const isLast = arr.length - 1 === idx;
|
|
1229
|
-
return {
|
|
1230
|
-
data: peer,
|
|
1231
|
-
key: `${peer.peerID}--${'hand-raised'}`,
|
|
1232
|
-
type: isLast ? 'LAST_ITEM' : 'REGULAR_ITEM'
|
|
1233
|
-
};
|
|
1234
|
-
}));
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1350
|
+
},
|
|
1351
|
+
// [groupedParticipants, onStageRole, roles]
|
|
1352
|
+
[onStageRole, roles]);
|
|
1353
|
+
const participantsAccordianData = (0, _react.useMemo)(() => {
|
|
1354
|
+
const t = [];
|
|
1355
|
+
const filteredHandRaisedPeers = [];
|
|
1237
1356
|
sortedRoles.forEach(role => {
|
|
1238
|
-
const
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1357
|
+
const list = groupedParticipants[role.name];
|
|
1358
|
+
const filteredList = Array.isArray(list) && formattedSearchText.length > 0 ? list.filter(peer => peer.name.toLowerCase().includes(formattedSearchText)) : list;
|
|
1359
|
+
if (Array.isArray(filteredList) && filteredList.length > 0) {
|
|
1360
|
+
filteredHandRaisedPeers.push(filteredList);
|
|
1361
|
+
const offStageRoleTotalCount = offStageParticipantsTotalCounts[role.name];
|
|
1362
|
+
const firstTen = filteredList.slice(0, 10);
|
|
1363
|
+
t.push({
|
|
1364
|
+
id: role.name,
|
|
1365
|
+
label: `${role.name} (${typeof offStageRoleTotalCount === 'number' ? offStageRoleTotalCount : filteredList.length})`,
|
|
1366
|
+
showViewAll: typeof offStageRoleTotalCount === 'number' && formattedSearchText.length <= 0 ? offStageRoleTotalCount > 10 : filteredList.length > 10,
|
|
1367
|
+
data: firstTen
|
|
1249
1368
|
});
|
|
1250
|
-
if (expanded) {
|
|
1251
|
-
list = list.concat(peers.map((peer, idx, arr) => {
|
|
1252
|
-
const isLast = arr.length - 1 === idx;
|
|
1253
|
-
return {
|
|
1254
|
-
data: peer,
|
|
1255
|
-
key: `${peer.peerID}--${role.name}`,
|
|
1256
|
-
type: isLast ? 'LAST_ITEM' : 'REGULAR_ITEM'
|
|
1257
|
-
};
|
|
1258
|
-
}));
|
|
1259
|
-
}
|
|
1260
1369
|
}
|
|
1261
1370
|
});
|
|
1262
|
-
|
|
1263
|
-
|
|
1371
|
+
const handRaisedParticipants = filteredHandRaisedPeers.flat().filter(participant => participant.isHandRaised);
|
|
1372
|
+
const firstTenHandRaisedParticipants = handRaisedParticipants.slice(0, 10);
|
|
1373
|
+
if (handRaisedParticipants.length > 0) {
|
|
1374
|
+
t.unshift({
|
|
1375
|
+
id: 'hand-raised',
|
|
1376
|
+
label: `Hand Raised (${handRaisedParticipants.length})`,
|
|
1377
|
+
showViewAll: handRaisedParticipants.length > 10,
|
|
1378
|
+
data: firstTenHandRaisedParticipants
|
|
1379
|
+
});
|
|
1380
|
+
}
|
|
1381
|
+
return t;
|
|
1382
|
+
}, [formattedSearchText, groupedParticipants, offStageParticipantsTotalCounts, sortedRoles]);
|
|
1383
|
+
const [expandedGroup, setExpandedGroup] = (0, _react.useState)(((_participantsAccordia = participantsAccordianData[0]) === null || _participantsAccordia === void 0 ? void 0 : _participantsAccordia.id) ?? null);
|
|
1264
1384
|
return {
|
|
1265
|
-
data:
|
|
1266
|
-
searchText,
|
|
1385
|
+
data: participantsAccordianData,
|
|
1267
1386
|
formattedSearchText,
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
setExpandedGroups
|
|
1387
|
+
expandedGroup,
|
|
1388
|
+
setExpandedGroup
|
|
1271
1389
|
};
|
|
1272
1390
|
};
|
|
1273
1391
|
exports.useFilteredParticipants = useFilteredParticipants;
|
|
1274
|
-
const groupParticipantsAsPerRole = (participants, searchText) => {
|
|
1275
|
-
const groups = new Map();
|
|
1276
|
-
for (const participant of participants) {
|
|
1277
|
-
const participantRole = participant.role;
|
|
1278
|
-
if (!participantRole) {
|
|
1279
|
-
continue;
|
|
1280
|
-
}
|
|
1281
|
-
if (searchText.length <= 0 || participant.name.toLowerCase().includes(searchText)) {
|
|
1282
|
-
if (!groups.has(participantRole.name)) {
|
|
1283
|
-
groups.set(participantRole.name, []);
|
|
1284
|
-
}
|
|
1285
|
-
const group = groups.get(participantRole.name);
|
|
1286
|
-
if (!group) {
|
|
1287
|
-
continue;
|
|
1288
|
-
}
|
|
1289
|
-
group.push(participant);
|
|
1290
|
-
if ((0, _functions.parseMetadata)(participant.metadata).isHandRaised) {
|
|
1291
|
-
if (!groups.has('hand-raised')) {
|
|
1292
|
-
groups.set('hand-raised', []);
|
|
1293
|
-
}
|
|
1294
|
-
const group = groups.get('hand-raised');
|
|
1295
|
-
if (group) group.push(participant);
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
return groups;
|
|
1300
|
-
};
|
|
1301
1392
|
const useShouldGoLive = () => {
|
|
1302
1393
|
const shouldGoLive = (0, _reactRedux.useSelector)(_hooksUtilSelectors.selectShouldGoLive);
|
|
1303
1394
|
return shouldGoLive;
|
|
1304
1395
|
};
|
|
1305
1396
|
exports.useShouldGoLive = useShouldGoLive;
|
|
1306
|
-
const useLeaveMethods =
|
|
1397
|
+
const useLeaveMethods = () => {
|
|
1307
1398
|
const navigation = (0, _react.useContext)(_native.NavigationContext);
|
|
1308
1399
|
const hmsInstance = useHMSInstance();
|
|
1309
1400
|
const dispatch = (0, _reactRedux.useDispatch)();
|
|
1310
1401
|
const reduxStore = (0, _reactRedux.useStore)();
|
|
1311
|
-
const destroy = (0, _react.useCallback)(
|
|
1402
|
+
const destroy = (0, _react.useCallback)(reason => {
|
|
1312
1403
|
try {
|
|
1313
1404
|
const s = hmsInstance.destroy();
|
|
1314
1405
|
console.log('Destroy Success: ', s);
|
|
@@ -1334,9 +1425,9 @@ const useLeaveMethods = isUnmounted => {
|
|
|
1334
1425
|
|
|
1335
1426
|
const onLeave = reduxStore.getState().user.onLeave;
|
|
1336
1427
|
if (typeof onLeave === 'function') {
|
|
1337
|
-
onLeave();
|
|
1428
|
+
onLeave(reason);
|
|
1338
1429
|
dispatch((0, _actions.clearStore)());
|
|
1339
|
-
} else if (navigation && navigation.canGoBack
|
|
1430
|
+
} else if (navigation && typeof navigation.canGoBack === 'function' && navigation.canGoBack()) {
|
|
1340
1431
|
navigation.goBack();
|
|
1341
1432
|
dispatch((0, _actions.clearStore)());
|
|
1342
1433
|
} else {
|
|
@@ -1350,8 +1441,8 @@ const useLeaveMethods = isUnmounted => {
|
|
|
1350
1441
|
return Promise.reject(e);
|
|
1351
1442
|
}
|
|
1352
1443
|
}, [hmsInstance]);
|
|
1353
|
-
const leave = (0, _react.useCallback)(async function () {
|
|
1354
|
-
let shouldEndStream = arguments.length >
|
|
1444
|
+
const leave = (0, _react.useCallback)(async function (reason) {
|
|
1445
|
+
let shouldEndStream = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1355
1446
|
if (shouldEndStream) {
|
|
1356
1447
|
hmsInstance.stopHLSStreaming().catch(error => {
|
|
1357
1448
|
console.log('Stop HLS Streaming Error: ', error);
|
|
@@ -1360,26 +1451,26 @@ const useLeaveMethods = isUnmounted => {
|
|
|
1360
1451
|
try {
|
|
1361
1452
|
const d = await hmsInstance.leave();
|
|
1362
1453
|
console.log('Leave Success: ', d);
|
|
1363
|
-
await destroy();
|
|
1454
|
+
await destroy(reason);
|
|
1364
1455
|
} catch (e) {
|
|
1365
1456
|
console.log(`Leave Room Error: ${e}`);
|
|
1366
1457
|
_reactNativeSimpleToast.default.showWithGravity(`Leave Room Error: ${e}`, _reactNativeSimpleToast.default.LONG, _reactNativeSimpleToast.default.TOP);
|
|
1367
1458
|
}
|
|
1368
1459
|
}, [destroy, hmsInstance]);
|
|
1369
|
-
const
|
|
1460
|
+
const prebuiltCleanUp = (0, _react.useCallback)(async () => {
|
|
1370
1461
|
try {
|
|
1371
1462
|
await hmsInstance.leave();
|
|
1372
1463
|
await hmsInstance.destroy();
|
|
1373
1464
|
dispatch((0, _actions.clearStore)());
|
|
1374
1465
|
} catch (error) {
|
|
1375
|
-
_reactNativeSimpleToast.default.showWithGravity(`Unable to
|
|
1466
|
+
_reactNativeSimpleToast.default.showWithGravity(`Unable to leave or destroy: ${error}`, _reactNativeSimpleToast.default.LONG, _reactNativeSimpleToast.default.TOP);
|
|
1376
1467
|
}
|
|
1377
1468
|
}, [hmsInstance]);
|
|
1378
|
-
const endRoom = (0, _react.useCallback)(async
|
|
1469
|
+
const endRoom = (0, _react.useCallback)(async reason => {
|
|
1379
1470
|
try {
|
|
1380
1471
|
const d = await hmsInstance.endRoom('Host ended the room');
|
|
1381
1472
|
console.log('EndRoom Success: ', d);
|
|
1382
|
-
await destroy();
|
|
1473
|
+
await destroy(reason);
|
|
1383
1474
|
} catch (e) {
|
|
1384
1475
|
console.log('EndRoom Error: ', e);
|
|
1385
1476
|
}
|
|
@@ -1388,7 +1479,7 @@ const useLeaveMethods = isUnmounted => {
|
|
|
1388
1479
|
destroy,
|
|
1389
1480
|
leave,
|
|
1390
1481
|
endRoom,
|
|
1391
|
-
|
|
1482
|
+
prebuiltCleanUp
|
|
1392
1483
|
};
|
|
1393
1484
|
};
|
|
1394
1485
|
|
|
@@ -1482,10 +1573,10 @@ const useSendMessage = () => {
|
|
|
1482
1573
|
type: 'SET_TYPED_MESSAGE',
|
|
1483
1574
|
typedMessage: ''
|
|
1484
1575
|
});
|
|
1485
|
-
const handleMessageID =
|
|
1576
|
+
const handleMessageID = _ref6 => {
|
|
1486
1577
|
let {
|
|
1487
1578
|
messageId
|
|
1488
|
-
} =
|
|
1579
|
+
} = _ref6;
|
|
1489
1580
|
const localPeer = reduxStore.getState().hmsStates.localPeer;
|
|
1490
1581
|
if (messageId) {
|
|
1491
1582
|
_reactNative.Keyboard.dismiss();
|
|
@@ -1536,4 +1627,91 @@ const useHMSConferencingScreenConfig = (selector, equalityFn) => {
|
|
|
1536
1627
|
}, equalityFn);
|
|
1537
1628
|
};
|
|
1538
1629
|
exports.useHMSConferencingScreenConfig = useHMSConferencingScreenConfig;
|
|
1630
|
+
const useBackButtonPress = () => {
|
|
1631
|
+
const {
|
|
1632
|
+
handleModalVisibleType
|
|
1633
|
+
} = useModalType();
|
|
1634
|
+
const handleBackPress = (0, _reactRedux.useSelector)(state => state.app.handleBackButton);
|
|
1635
|
+
(0, _react.useEffect)(() => {
|
|
1636
|
+
if (handleBackPress) {
|
|
1637
|
+
const backPressHandler = () => {
|
|
1638
|
+
handleModalVisibleType(_types.ModalTypes.LEAVE_ROOM);
|
|
1639
|
+
|
|
1640
|
+
/**
|
|
1641
|
+
* When true is returned the event will not be bubbled up
|
|
1642
|
+
* & no other back action will execute
|
|
1643
|
+
*/
|
|
1644
|
+
return true;
|
|
1645
|
+
|
|
1646
|
+
/**
|
|
1647
|
+
* Returning false will let the event to bubble up & let other event listeners
|
|
1648
|
+
* or the system's default back action to be executed.
|
|
1649
|
+
*/
|
|
1650
|
+
// return false;
|
|
1651
|
+
};
|
|
1652
|
+
|
|
1653
|
+
const subscription = _reactNative.BackHandler.addEventListener('hardwareBackPress', backPressHandler);
|
|
1654
|
+
return () => {
|
|
1655
|
+
if (typeof subscription.remove === 'function') {
|
|
1656
|
+
subscription.remove();
|
|
1657
|
+
} else {
|
|
1658
|
+
_reactNative.BackHandler.removeEventListener('hardwareBackPress', backPressHandler);
|
|
1659
|
+
}
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1662
|
+
}, [handleBackPress, handleModalVisibleType]);
|
|
1663
|
+
};
|
|
1664
|
+
exports.useBackButtonPress = useBackButtonPress;
|
|
1665
|
+
const useSavePropsToStore = (props, dispatch) => {
|
|
1666
|
+
const {
|
|
1667
|
+
roomCode,
|
|
1668
|
+
options,
|
|
1669
|
+
onLeave,
|
|
1670
|
+
handleBackButton,
|
|
1671
|
+
autoEnterPipMode
|
|
1672
|
+
} = props;
|
|
1673
|
+
(0, _react.useEffect)(() => {
|
|
1674
|
+
dispatch((0, _actions.setPrebuiltData)({
|
|
1675
|
+
roomCode,
|
|
1676
|
+
options
|
|
1677
|
+
}));
|
|
1678
|
+
}, [roomCode, options]);
|
|
1679
|
+
(0, _react.useEffect)(() => {
|
|
1680
|
+
dispatch((0, _actions.setOnLeaveHandler)(onLeave));
|
|
1681
|
+
}, [onLeave]);
|
|
1682
|
+
(0, _react.useEffect)(() => {
|
|
1683
|
+
if (_reactNative.Platform.OS === 'android') {
|
|
1684
|
+
dispatch((0, _actions.setHandleBackButton)(handleBackButton));
|
|
1685
|
+
}
|
|
1686
|
+
}, [handleBackButton]);
|
|
1687
|
+
(0, _react.useEffect)(() => {
|
|
1688
|
+
if (_reactNative.Platform.OS === 'android') {
|
|
1689
|
+
dispatch((0, _actions.setAutoEnterPipMode)(autoEnterPipMode));
|
|
1690
|
+
}
|
|
1691
|
+
}, [autoEnterPipMode]);
|
|
1692
|
+
};
|
|
1693
|
+
exports.useSavePropsToStore = useSavePropsToStore;
|
|
1694
|
+
const useStartRecording = () => {
|
|
1695
|
+
const dispatch = (0, _reactRedux.useDispatch)();
|
|
1696
|
+
const hmsInstance = useHMSInstance();
|
|
1697
|
+
const startRecording = (0, _react.useCallback)(() => {
|
|
1698
|
+
dispatch((0, _actions.setStartingOrStoppingRecording)(true));
|
|
1699
|
+
hmsInstance.startRTMPOrRecording({
|
|
1700
|
+
record: true
|
|
1701
|
+
}).catch(error => {
|
|
1702
|
+
(0, _reactRedux.batch)(() => {
|
|
1703
|
+
dispatch((0, _actions.setStartingOrStoppingRecording)(false));
|
|
1704
|
+
dispatch((0, _actions.addNotification)({
|
|
1705
|
+
id: Math.random().toString(16).slice(2),
|
|
1706
|
+
type: _types2.NotificationTypes.ERROR,
|
|
1707
|
+
message: error.message
|
|
1708
|
+
}));
|
|
1709
|
+
});
|
|
1710
|
+
});
|
|
1711
|
+
}, [hmsInstance]);
|
|
1712
|
+
return {
|
|
1713
|
+
startRecording
|
|
1714
|
+
};
|
|
1715
|
+
};
|
|
1716
|
+
exports.useStartRecording = useStartRecording;
|
|
1539
1717
|
//# sourceMappingURL=hooks-util.js.map
|