@100mslive/react-native-room-kit 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/HMSRoomSetup.js +4 -1
- package/lib/commonjs/HMSRoomSetup.js.map +1 -1
- package/lib/commonjs/Icons/Chat/assets/chat-on.png +0 -0
- package/lib/commonjs/Icons/Chat/assets/chat-on@2x.png +0 -0
- package/lib/commonjs/Icons/Chat/assets/chat-on@3x.png +0 -0
- package/lib/commonjs/Icons/Chat/index.js +4 -3
- package/lib/commonjs/Icons/Chat/index.js.map +1 -1
- package/lib/commonjs/Icons/NoEntry/assets/no-entry.png +0 -0
- package/lib/commonjs/Icons/NoEntry/assets/no-entry@2x.png +0 -0
- package/lib/commonjs/Icons/NoEntry/assets/no-entry@3x.png +0 -0
- package/lib/commonjs/Icons/NoEntry/index.js +33 -0
- package/lib/commonjs/Icons/NoEntry/index.js.map +1 -0
- package/lib/commonjs/Icons/PauseCircle/assets/pause-circle.png +0 -0
- package/lib/commonjs/Icons/PauseCircle/assets/pause-circle@2x.png +0 -0
- package/lib/commonjs/Icons/PauseCircle/assets/pause-circle@3x.png +0 -0
- package/lib/commonjs/Icons/PauseCircle/index.js +29 -0
- package/lib/commonjs/Icons/PauseCircle/index.js.map +1 -0
- package/lib/commonjs/Icons/Pin/assets/unpin.png +0 -0
- package/lib/commonjs/Icons/Pin/assets/unpin@2x.png +0 -0
- package/lib/commonjs/Icons/Pin/assets/unpin@3x.png +0 -0
- package/lib/commonjs/Icons/Pin/index.js +2 -1
- package/lib/commonjs/Icons/Pin/index.js.map +1 -1
- package/lib/commonjs/Icons/Recording/assets/recording-pause.png +0 -0
- package/lib/commonjs/Icons/Recording/assets/recording-pause@2x.png +0 -0
- package/lib/commonjs/Icons/Recording/assets/recording-pause@3x.png +0 -0
- package/lib/commonjs/Icons/Recording/index.js +1 -1
- package/lib/commonjs/Icons/Recording/index.js.map +1 -1
- package/lib/commonjs/Icons/index.js +22 -0
- package/lib/commonjs/Icons/index.js.map +1 -1
- package/lib/commonjs/components/AnimatedFooter.js +5 -3
- package/lib/commonjs/components/AnimatedFooter.js.map +1 -1
- package/lib/commonjs/components/AnimatedHLSFooter.js +4 -9
- package/lib/commonjs/components/AnimatedHLSFooter.js.map +1 -1
- package/lib/commonjs/components/AnimatedHeader.js +17 -5
- package/lib/commonjs/components/AnimatedHeader.js.map +1 -1
- package/lib/commonjs/components/BottomSheet.js +11 -5
- package/lib/commonjs/components/BottomSheet.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheet.js +36 -0
- package/lib/commonjs/components/Chat/ChatFilterBottomSheet.js.map +1 -0
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js +90 -23
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js +2 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterItem.js +10 -7
- package/lib/commonjs/components/Chat/ChatFilterItem.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterView.js +54 -45
- package/lib/commonjs/components/Chat/ChatFilterView.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatList.js +13 -6
- package/lib/commonjs/components/Chat/ChatList.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatMessage.js +79 -7
- package/lib/commonjs/components/Chat/ChatMessage.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatMoreActionsModal.js +61 -0
- package/lib/commonjs/components/Chat/ChatMoreActionsModal.js.map +1 -0
- package/lib/commonjs/components/Chat/ChatMoreActionsSheetView.js +63 -0
- package/lib/commonjs/components/Chat/ChatMoreActionsSheetView.js.map +1 -0
- package/lib/commonjs/components/Chat/ChatMoreActionsView.js +83 -0
- package/lib/commonjs/components/Chat/ChatMoreActionsView.js.map +1 -0
- package/lib/commonjs/components/Chat/ChatPaused.js +86 -0
- package/lib/commonjs/components/Chat/ChatPaused.js.map +1 -0
- package/lib/commonjs/components/Chat/MessageOptionsBottomSheet.js +34 -0
- package/lib/commonjs/components/Chat/MessageOptionsBottomSheet.js.map +1 -0
- package/lib/commonjs/components/Chat/MessageOptionsBottomSheetView.js +66 -0
- package/lib/commonjs/components/Chat/MessageOptionsBottomSheetView.js.map +1 -0
- package/lib/commonjs/components/Chat/MessageOptionsView.js +188 -0
- package/lib/commonjs/components/Chat/MessageOptionsView.js.map +1 -0
- package/lib/commonjs/components/Chat/PeerBlockedFromChat.js +47 -0
- package/lib/commonjs/components/Chat/PeerBlockedFromChat.js.map +1 -0
- package/lib/commonjs/components/Chat/PinnedMessages.js +297 -0
- package/lib/commonjs/components/Chat/PinnedMessages.js.map +1 -0
- package/lib/commonjs/components/Chat/index.js +4 -4
- package/lib/commonjs/components/Chat/index.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js +11 -10
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsHeader.js +21 -2
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsHeader.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js +8 -4
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatView.js +21 -2
- package/lib/commonjs/components/ChatAndParticipants/ChatView.js.map +1 -1
- package/lib/commonjs/components/DisplayView.js +4 -11
- package/lib/commonjs/components/DisplayView.js.map +1 -1
- package/lib/commonjs/components/EndRoomModal.js +1 -2
- package/lib/commonjs/components/EndRoomModal.js.map +1 -1
- package/lib/commonjs/components/EndRoomModalContent.js +6 -8
- package/lib/commonjs/components/EndRoomModalContent.js.map +1 -1
- package/lib/commonjs/components/Footer.js +12 -18
- package/lib/commonjs/components/Footer.js.map +1 -1
- package/lib/commonjs/components/GridView.js +31 -1
- package/lib/commonjs/components/GridView.js.map +1 -1
- package/lib/commonjs/components/HLSFooter.js +3 -1
- package/lib/commonjs/components/HLSFooter.js.map +1 -1
- package/lib/commonjs/components/HLSView.js +8 -6
- package/lib/commonjs/components/HLSView.js.map +1 -1
- package/lib/commonjs/components/HMSBaseButton.js +10 -2
- package/lib/commonjs/components/HMSBaseButton.js.map +1 -1
- package/lib/commonjs/components/HMSDangerButton.js +4 -2
- package/lib/commonjs/components/HMSDangerButton.js.map +1 -1
- package/lib/commonjs/components/HMSHLSMessage.js +86 -1
- 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/HMSHandRaiseNotification.js +6 -3
- package/lib/commonjs/components/HMSHandRaiseNotification.js.map +1 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.android.js +2 -0
- package/lib/commonjs/components/HMSKeyboardAvoidingView.android.js.map +1 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js +8 -2
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/commonjs/components/HMSLiveIndicator.js +5 -60
- package/lib/commonjs/components/HMSLiveIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSLiveViewerCount.js +79 -0
- package/lib/commonjs/components/HMSLiveViewerCount.js.map +1 -0
- package/lib/commonjs/components/HMSLocalScreenshareNotification.js +2 -1
- package/lib/commonjs/components/HMSLocalScreenshareNotification.js.map +1 -1
- package/lib/commonjs/components/HMSNotification.js +31 -4
- package/lib/commonjs/components/HMSNotification.js.map +1 -1
- package/lib/commonjs/components/HMSNotifications.js +9 -2
- package/lib/commonjs/components/HMSNotifications.js.map +1 -1
- package/lib/commonjs/components/HMSOverlayChatView.js +55 -4
- package/lib/commonjs/components/HMSOverlayChatView.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewEditName.js +6 -1
- package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js +2 -5
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSPrimaryButton.js +4 -2
- package/lib/commonjs/components/HMSPrimaryButton.js.map +1 -1
- package/lib/commonjs/components/HMSRecordingIndicator.js +12 -7
- package/lib/commonjs/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSRoomOptions.js +3 -6
- package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
- package/lib/commonjs/components/HMSTerminalErrorNotification.js +6 -2
- package/lib/commonjs/components/HMSTerminalErrorNotification.js.map +1 -1
- package/lib/commonjs/components/Header.js +11 -3
- package/lib/commonjs/components/Header.js.map +1 -1
- package/lib/commonjs/components/LeaveRoomBottomSheet.js +5 -11
- package/lib/commonjs/components/LeaveRoomBottomSheet.js.map +1 -1
- package/lib/commonjs/components/Meeting.js +5 -13
- package/lib/commonjs/components/Meeting.js.map +1 -1
- package/lib/commonjs/components/MeetingScreenContent.js +46 -48
- package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
- package/lib/commonjs/components/MiniView.js.map +1 -1
- package/lib/commonjs/components/Modals.js +9 -12
- package/lib/commonjs/components/Modals.js.map +1 -1
- package/lib/commonjs/components/OverlayedViews.js +6 -2
- package/lib/commonjs/components/OverlayedViews.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsItemOptions.js +5 -1
- package/lib/commonjs/components/Participants/ParticipantsItemOptions.js.map +1 -1
- package/lib/commonjs/components/PeerSettingsModalContent.js +2 -1
- package/lib/commonjs/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js +2 -1
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/commonjs/components/PressableIcon.js +6 -2
- package/lib/commonjs/components/PressableIcon.js.map +1 -1
- package/lib/commonjs/components/Preview.js +14 -1
- package/lib/commonjs/components/Preview.js.map +1 -1
- package/lib/commonjs/components/PreviewForRoleChangeModal.js +5 -4
- package/lib/commonjs/components/PreviewForRoleChangeModal.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalContent.js +34 -9
- package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js +2 -4
- package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js.map +1 -1
- package/lib/commonjs/components/WebrtcView.js +37 -2
- package/lib/commonjs/components/WebrtcView.js.map +1 -1
- package/lib/commonjs/hooks-sdk-selectors.js +16 -1
- package/lib/commonjs/hooks-sdk-selectors.js.map +1 -1
- package/lib/commonjs/hooks-sdk.js +27 -1
- package/lib/commonjs/hooks-sdk.js.map +1 -1
- package/lib/commonjs/hooks-util-selectors.js +3 -2
- package/lib/commonjs/hooks-util-selectors.js.map +1 -1
- package/lib/commonjs/hooks-util.js +466 -89
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +18 -3
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +51 -4
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/appState.js +49 -1
- 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/message.js +17 -4
- package/lib/commonjs/redux/reducers/message.js.map +1 -1
- package/lib/commonjs/types.js +1 -0
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/types.js +6 -3
- package/lib/commonjs/utils/types.js.map +1 -1
- package/lib/commonjs/utils.js +2 -2
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +5 -2
- package/lib/module/HMSRoomSetup.js.map +1 -1
- package/lib/module/Icons/Chat/assets/chat-on.png +0 -0
- package/lib/module/Icons/Chat/assets/chat-on@2x.png +0 -0
- package/lib/module/Icons/Chat/assets/chat-on@3x.png +0 -0
- package/lib/module/Icons/Chat/index.js +4 -3
- package/lib/module/Icons/Chat/index.js.map +1 -1
- package/lib/module/Icons/NoEntry/assets/no-entry.png +0 -0
- package/lib/module/Icons/NoEntry/assets/no-entry@2x.png +0 -0
- package/lib/module/Icons/NoEntry/assets/no-entry@3x.png +0 -0
- package/lib/module/Icons/NoEntry/index.js +25 -0
- package/lib/module/Icons/NoEntry/index.js.map +1 -0
- package/lib/module/Icons/PauseCircle/assets/pause-circle.png +0 -0
- package/lib/module/Icons/PauseCircle/assets/pause-circle@2x.png +0 -0
- package/lib/module/Icons/PauseCircle/assets/pause-circle@3x.png +0 -0
- package/lib/module/Icons/PauseCircle/index.js +21 -0
- package/lib/module/Icons/PauseCircle/index.js.map +1 -0
- package/lib/module/Icons/Pin/assets/unpin.png +0 -0
- package/lib/module/Icons/Pin/assets/unpin@2x.png +0 -0
- package/lib/module/Icons/Pin/assets/unpin@3x.png +0 -0
- package/lib/module/Icons/Pin/index.js +2 -1
- package/lib/module/Icons/Pin/index.js.map +1 -1
- package/lib/module/Icons/Recording/assets/recording-pause.png +0 -0
- package/lib/module/Icons/Recording/assets/recording-pause@2x.png +0 -0
- package/lib/module/Icons/Recording/assets/recording-pause@3x.png +0 -0
- package/lib/module/Icons/Recording/index.js +1 -1
- package/lib/module/Icons/Recording/index.js.map +1 -1
- package/lib/module/Icons/index.js +2 -0
- package/lib/module/Icons/index.js.map +1 -1
- package/lib/module/components/AnimatedFooter.js +5 -3
- package/lib/module/components/AnimatedFooter.js.map +1 -1
- package/lib/module/components/AnimatedHLSFooter.js +5 -10
- package/lib/module/components/AnimatedHLSFooter.js.map +1 -1
- package/lib/module/components/AnimatedHeader.js +18 -6
- package/lib/module/components/AnimatedHeader.js.map +1 -1
- package/lib/module/components/BottomSheet.js +12 -6
- package/lib/module/components/BottomSheet.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterBottomSheet.js +28 -0
- package/lib/module/components/Chat/ChatFilterBottomSheet.js.map +1 -0
- package/lib/module/components/Chat/ChatFilterBottomSheetOpener.js +93 -26
- package/lib/module/components/Chat/ChatFilterBottomSheetOpener.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterBottomSheetView.js +2 -1
- package/lib/module/components/Chat/ChatFilterBottomSheetView.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterItem.js +11 -8
- package/lib/module/components/Chat/ChatFilterItem.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterView.js +55 -46
- package/lib/module/components/Chat/ChatFilterView.js.map +1 -1
- package/lib/module/components/Chat/ChatList.js +14 -7
- package/lib/module/components/Chat/ChatList.js.map +1 -1
- package/lib/module/components/Chat/ChatMessage.js +81 -9
- package/lib/module/components/Chat/ChatMessage.js.map +1 -1
- package/lib/module/components/Chat/ChatMoreActionsModal.js +53 -0
- package/lib/module/components/Chat/ChatMoreActionsModal.js.map +1 -0
- package/lib/module/components/Chat/ChatMoreActionsSheetView.js +55 -0
- package/lib/module/components/Chat/ChatMoreActionsSheetView.js.map +1 -0
- package/lib/module/components/Chat/ChatMoreActionsView.js +75 -0
- package/lib/module/components/Chat/ChatMoreActionsView.js.map +1 -0
- package/lib/module/components/Chat/ChatPaused.js +77 -0
- package/lib/module/components/Chat/ChatPaused.js.map +1 -0
- package/lib/module/components/Chat/MessageOptionsBottomSheet.js +26 -0
- package/lib/module/components/Chat/MessageOptionsBottomSheet.js.map +1 -0
- package/lib/module/components/Chat/MessageOptionsBottomSheetView.js +58 -0
- package/lib/module/components/Chat/MessageOptionsBottomSheetView.js.map +1 -0
- package/lib/module/components/Chat/MessageOptionsView.js +180 -0
- package/lib/module/components/Chat/MessageOptionsView.js.map +1 -0
- package/lib/module/components/Chat/PeerBlockedFromChat.js +38 -0
- package/lib/module/components/Chat/PeerBlockedFromChat.js.map +1 -0
- package/lib/module/components/Chat/PinnedMessages.js +288 -0
- package/lib/module/components/Chat/PinnedMessages.js.map +1 -0
- package/lib/module/components/Chat/index.js +1 -1
- package/lib/module/components/Chat/index.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js +13 -12
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsHeader.js +24 -5
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsHeader.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js +9 -5
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatView.js +22 -3
- package/lib/module/components/ChatAndParticipants/ChatView.js.map +1 -1
- package/lib/module/components/DisplayView.js +5 -12
- package/lib/module/components/DisplayView.js.map +1 -1
- package/lib/module/components/EndRoomModal.js +1 -2
- package/lib/module/components/EndRoomModal.js.map +1 -1
- package/lib/module/components/EndRoomModalContent.js +6 -8
- package/lib/module/components/EndRoomModalContent.js.map +1 -1
- package/lib/module/components/Footer.js +12 -18
- package/lib/module/components/Footer.js.map +1 -1
- package/lib/module/components/GridView.js +32 -2
- package/lib/module/components/GridView.js.map +1 -1
- package/lib/module/components/HLSFooter.js +3 -1
- package/lib/module/components/HLSFooter.js.map +1 -1
- package/lib/module/components/HLSView.js +8 -6
- package/lib/module/components/HLSView.js.map +1 -1
- package/lib/module/components/HMSBaseButton.js +10 -2
- package/lib/module/components/HMSBaseButton.js.map +1 -1
- package/lib/module/components/HMSDangerButton.js +4 -2
- package/lib/module/components/HMSDangerButton.js.map +1 -1
- package/lib/module/components/HMSHLSMessage.js +88 -3
- package/lib/module/components/HMSHLSMessage.js.map +1 -1
- package/lib/module/components/HMSHLSMessageList.js +2 -2
- package/lib/module/components/HMSHLSMessageList.js.map +1 -1
- package/lib/module/components/HMSHandRaiseNotification.js +6 -3
- package/lib/module/components/HMSHandRaiseNotification.js.map +1 -1
- package/lib/module/components/HMSKeyboardAvoidingView.android.js +2 -3
- package/lib/module/components/HMSKeyboardAvoidingView.android.js.map +1 -1
- package/lib/module/components/HMSKeyboardAvoidingView.js +9 -3
- package/lib/module/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/module/components/HMSLiveIndicator.js +8 -63
- package/lib/module/components/HMSLiveIndicator.js.map +1 -1
- package/lib/module/components/HMSLiveViewerCount.js +71 -0
- package/lib/module/components/HMSLiveViewerCount.js.map +1 -0
- package/lib/module/components/HMSLocalScreenshareNotification.js +2 -1
- package/lib/module/components/HMSLocalScreenshareNotification.js.map +1 -1
- package/lib/module/components/HMSNotification.js +32 -5
- package/lib/module/components/HMSNotification.js.map +1 -1
- package/lib/module/components/HMSNotifications.js +9 -2
- package/lib/module/components/HMSNotifications.js.map +1 -1
- package/lib/module/components/HMSOverlayChatView.js +56 -5
- package/lib/module/components/HMSOverlayChatView.js.map +1 -1
- package/lib/module/components/HMSPreviewEditName.js +6 -1
- package/lib/module/components/HMSPreviewEditName.js.map +1 -1
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js +2 -5
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
- package/lib/module/components/HMSPrimaryButton.js +4 -2
- package/lib/module/components/HMSPrimaryButton.js.map +1 -1
- package/lib/module/components/HMSRecordingIndicator.js +12 -7
- package/lib/module/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/module/components/HMSRoomOptions.js +3 -6
- package/lib/module/components/HMSRoomOptions.js.map +1 -1
- package/lib/module/components/HMSTerminalErrorNotification.js +6 -2
- package/lib/module/components/HMSTerminalErrorNotification.js.map +1 -1
- package/lib/module/components/Header.js +10 -3
- package/lib/module/components/Header.js.map +1 -1
- package/lib/module/components/LeaveRoomBottomSheet.js +5 -11
- package/lib/module/components/LeaveRoomBottomSheet.js.map +1 -1
- package/lib/module/components/Meeting.js +6 -14
- package/lib/module/components/Meeting.js.map +1 -1
- package/lib/module/components/MeetingScreenContent.js +51 -53
- package/lib/module/components/MeetingScreenContent.js.map +1 -1
- package/lib/module/components/MiniView.js.map +1 -1
- package/lib/module/components/Modals.js +10 -13
- package/lib/module/components/Modals.js.map +1 -1
- package/lib/module/components/OverlayedViews.js +6 -2
- package/lib/module/components/OverlayedViews.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsItemOptions.js +5 -1
- package/lib/module/components/Participants/ParticipantsItemOptions.js.map +1 -1
- package/lib/module/components/PeerSettingsModalContent.js +2 -1
- package/lib/module/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js +2 -1
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/module/components/PressableIcon.js +6 -2
- package/lib/module/components/PressableIcon.js.map +1 -1
- package/lib/module/components/Preview.js +13 -2
- package/lib/module/components/Preview.js.map +1 -1
- package/lib/module/components/PreviewForRoleChangeModal.js +5 -4
- package/lib/module/components/PreviewForRoleChangeModal.js.map +1 -1
- package/lib/module/components/RoomSettingsModalContent.js +36 -11
- package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/module/components/RoomSettingsModalDebugModeContent.js +2 -4
- package/lib/module/components/RoomSettingsModalDebugModeContent.js.map +1 -1
- package/lib/module/components/WebrtcView.js +37 -2
- package/lib/module/components/WebrtcView.js.map +1 -1
- package/lib/module/hooks-sdk-selectors.js +12 -0
- package/lib/module/hooks-sdk-selectors.js.map +1 -1
- package/lib/module/hooks-sdk.js +23 -1
- package/lib/module/hooks-sdk.js.map +1 -1
- package/lib/module/hooks-util-selectors.js +3 -2
- package/lib/module/hooks-util-selectors.js.map +1 -1
- package/lib/module/hooks-util.js +455 -90
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +18 -3
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +42 -2
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/appState.js +49 -1
- package/lib/module/redux/reducers/appState.js.map +1 -1
- package/lib/module/redux/reducers/chatWindow.js +1 -2
- package/lib/module/redux/reducers/chatWindow.js.map +1 -1
- package/lib/module/redux/reducers/message.js +17 -4
- package/lib/module/redux/reducers/message.js.map +1 -1
- package/lib/module/types.js +1 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/types.js +5 -2
- package/lib/module/utils/types.js.map +1 -1
- package/lib/module/utils.js +2 -2
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
- package/lib/typescript/Icons/Chat/index.d.ts +1 -0
- package/lib/typescript/Icons/Chat/index.d.ts.map +1 -1
- package/lib/typescript/Icons/NoEntry/index.d.ts +7 -0
- package/lib/typescript/Icons/NoEntry/index.d.ts.map +1 -0
- package/lib/typescript/Icons/PauseCircle/index.d.ts +7 -0
- package/lib/typescript/Icons/PauseCircle/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Pin/index.d.ts +1 -0
- package/lib/typescript/Icons/Pin/index.d.ts.map +1 -1
- package/lib/typescript/Icons/Recording/index.d.ts +1 -1
- package/lib/typescript/Icons/Recording/index.d.ts.map +1 -1
- package/lib/typescript/Icons/index.d.ts +2 -0
- package/lib/typescript/Icons/index.d.ts.map +1 -1
- package/lib/typescript/components/AnimatedFooter.d.ts.map +1 -1
- package/lib/typescript/components/AnimatedHLSFooter.d.ts.map +1 -1
- package/lib/typescript/components/AnimatedHeader.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet.d.ts +1 -0
- package/lib/typescript/components/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatFilterBottomSheet.d.ts +3 -0
- package/lib/typescript/components/Chat/ChatFilterBottomSheet.d.ts.map +1 -0
- package/lib/typescript/components/Chat/ChatFilterBottomSheetOpener.d.ts +1 -0
- package/lib/typescript/components/Chat/ChatFilterBottomSheetOpener.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatFilterBottomSheetView.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatFilterItem.d.ts +1 -0
- package/lib/typescript/components/Chat/ChatFilterItem.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatFilterView.d.ts +1 -0
- package/lib/typescript/components/Chat/ChatFilterView.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatList.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatMessage.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatMoreActionsModal.d.ts +7 -0
- package/lib/typescript/components/Chat/ChatMoreActionsModal.d.ts.map +1 -0
- package/lib/typescript/components/Chat/ChatMoreActionsSheetView.d.ts +6 -0
- package/lib/typescript/components/Chat/ChatMoreActionsSheetView.d.ts.map +1 -0
- package/lib/typescript/components/Chat/ChatMoreActionsView.d.ts +7 -0
- package/lib/typescript/components/Chat/ChatMoreActionsView.d.ts.map +1 -0
- package/lib/typescript/components/Chat/ChatPaused.d.ts +10 -0
- package/lib/typescript/components/Chat/ChatPaused.d.ts.map +1 -0
- package/lib/typescript/components/Chat/MessageOptionsBottomSheet.d.ts +3 -0
- package/lib/typescript/components/Chat/MessageOptionsBottomSheet.d.ts.map +1 -0
- package/lib/typescript/components/Chat/MessageOptionsBottomSheetView.d.ts +6 -0
- package/lib/typescript/components/Chat/MessageOptionsBottomSheetView.d.ts.map +1 -0
- package/lib/typescript/components/Chat/MessageOptionsView.d.ts +7 -0
- package/lib/typescript/components/Chat/MessageOptionsView.d.ts.map +1 -0
- package/lib/typescript/components/Chat/PeerBlockedFromChat.d.ts +9 -0
- package/lib/typescript/components/Chat/PeerBlockedFromChat.d.ts.map +1 -0
- package/lib/typescript/components/Chat/PinnedMessages.d.ts +8 -0
- package/lib/typescript/components/Chat/PinnedMessages.d.ts.map +1 -0
- package/lib/typescript/components/Chat/index.d.ts +1 -1
- package/lib/typescript/components/Chat/index.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsHeader.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsView.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatView.d.ts.map +1 -1
- package/lib/typescript/components/DisplayView.d.ts.map +1 -1
- package/lib/typescript/components/EndRoomModal.d.ts.map +1 -1
- package/lib/typescript/components/EndRoomModalContent.d.ts.map +1 -1
- package/lib/typescript/components/Footer.d.ts +1 -1
- package/lib/typescript/components/Footer.d.ts.map +1 -1
- package/lib/typescript/components/GridView.d.ts.map +1 -1
- package/lib/typescript/components/HLSView.d.ts.map +1 -1
- package/lib/typescript/components/HMSBaseButton.d.ts +1 -0
- package/lib/typescript/components/HMSBaseButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSDangerButton.d.ts +1 -0
- package/lib/typescript/components/HMSDangerButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSHLSMessage.d.ts +1 -1
- package/lib/typescript/components/HMSHLSMessage.d.ts.map +1 -1
- package/lib/typescript/components/HMSHandRaiseNotification.d.ts.map +1 -1
- package/lib/typescript/components/HMSKeyboardAvoidingView.android.d.ts.map +1 -1
- package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts +2 -1
- package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts.map +1 -1
- package/lib/typescript/components/HMSLiveIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSLiveViewerCount.d.ts +3 -0
- package/lib/typescript/components/HMSLiveViewerCount.d.ts.map +1 -0
- package/lib/typescript/components/HMSLocalScreenshareNotification.d.ts.map +1 -1
- package/lib/typescript/components/HMSNotification.d.ts +2 -1
- package/lib/typescript/components/HMSNotification.d.ts.map +1 -1
- package/lib/typescript/components/HMSNotifications.d.ts.map +1 -1
- package/lib/typescript/components/HMSOverlayChatView.d.ts +5 -1
- package/lib/typescript/components/HMSOverlayChatView.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewEditName.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSPrimaryButton.d.ts +1 -0
- package/lib/typescript/components/HMSPrimaryButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSRecordingIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSTerminalErrorNotification.d.ts.map +1 -1
- package/lib/typescript/components/Header.d.ts +1 -0
- package/lib/typescript/components/Header.d.ts.map +1 -1
- package/lib/typescript/components/LeaveRoomBottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/Meeting.d.ts.map +1 -1
- package/lib/typescript/components/MeetingScreenContent.d.ts.map +1 -1
- package/lib/typescript/components/Modals.d.ts.map +1 -1
- package/lib/typescript/components/OverlayedViews.d.ts +4 -1
- package/lib/typescript/components/OverlayedViews.d.ts.map +1 -1
- package/lib/typescript/components/Participants/ParticipantsItemOptions.d.ts.map +1 -1
- package/lib/typescript/components/PeerSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/PeerVideoTile/PeerVideoTileView.d.ts.map +1 -1
- package/lib/typescript/components/PressableIcon.d.ts.map +1 -1
- package/lib/typescript/components/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/RoomSettingsModalDebugModeContent.d.ts.map +1 -1
- package/lib/typescript/components/WebrtcView.d.ts +2 -0
- package/lib/typescript/components/WebrtcView.d.ts.map +1 -1
- package/lib/typescript/hooks-sdk-selectors.d.ts +3 -0
- package/lib/typescript/hooks-sdk-selectors.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-selectors.d.ts.map +1 -1
- package/lib/typescript/hooks-util.d.ts +39 -3
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +10 -2
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +43 -3
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +8 -2
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/appState.d.ts +8 -2
- package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/chatWindow.d.ts +1 -1
- package/lib/typescript/redux/reducers/chatWindow.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +8 -2
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/message.d.ts +3 -2
- package/lib/typescript/redux/reducers/message.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +23 -3
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils/types.d.ts +4 -0
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/HMSRoomSetup.tsx +8 -3
- package/src/Icons/Chat/assets/chat-on.png +0 -0
- package/src/Icons/Chat/assets/chat-on@2x.png +0 -0
- package/src/Icons/Chat/assets/chat-on@3x.png +0 -0
- package/src/Icons/Chat/index.tsx +19 -6
- package/src/Icons/NoEntry/assets/no-entry.png +0 -0
- package/src/Icons/NoEntry/assets/no-entry@2x.png +0 -0
- package/src/Icons/NoEntry/assets/no-entry@3x.png +0 -0
- package/src/Icons/NoEntry/index.tsx +33 -0
- package/src/Icons/PauseCircle/assets/pause-circle.png +0 -0
- package/src/Icons/PauseCircle/assets/pause-circle@2x.png +0 -0
- package/src/Icons/PauseCircle/assets/pause-circle@3x.png +0 -0
- package/src/Icons/PauseCircle/index.tsx +27 -0
- package/src/Icons/Pin/assets/unpin.png +0 -0
- package/src/Icons/Pin/assets/unpin@2x.png +0 -0
- package/src/Icons/Pin/assets/unpin@3x.png +0 -0
- package/src/Icons/Pin/index.tsx +13 -3
- package/src/Icons/Recording/assets/recording-pause.png +0 -0
- package/src/Icons/Recording/assets/recording-pause@2x.png +0 -0
- package/src/Icons/Recording/assets/recording-pause@3x.png +0 -0
- package/src/Icons/Recording/index.tsx +4 -2
- package/src/Icons/index.ts +2 -0
- package/src/components/AnimatedFooter.tsx +9 -3
- package/src/components/AnimatedHLSFooter.tsx +8 -17
- package/src/components/AnimatedHeader.tsx +16 -5
- package/src/components/BottomSheet.tsx +21 -5
- package/src/components/Chat/ChatFilterBottomSheet.tsx +35 -0
- package/src/components/Chat/ChatFilterBottomSheetOpener.tsx +170 -42
- package/src/components/Chat/ChatFilterBottomSheetView.tsx +1 -0
- package/src/components/Chat/ChatFilterItem.tsx +8 -4
- package/src/components/Chat/ChatFilterView.tsx +102 -75
- package/src/components/Chat/ChatList.tsx +18 -6
- package/src/components/Chat/ChatMessage.tsx +111 -7
- package/src/components/Chat/ChatMoreActionsModal.tsx +75 -0
- package/src/components/Chat/ChatMoreActionsSheetView.tsx +77 -0
- package/src/components/Chat/ChatMoreActionsView.tsx +84 -0
- package/src/components/Chat/ChatPaused.tsx +103 -0
- package/src/components/Chat/MessageOptionsBottomSheet.tsx +33 -0
- package/src/components/Chat/MessageOptionsBottomSheetView.tsx +82 -0
- package/src/components/Chat/MessageOptionsView.tsx +248 -0
- package/src/components/Chat/PeerBlockedFromChat.tsx +49 -0
- package/src/components/Chat/PinnedMessages.tsx +422 -0
- package/src/components/Chat/index.ts +1 -1
- package/src/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.tsx +15 -7
- package/src/components/ChatAndParticipants/ChatAndParticipantsHeader.tsx +48 -12
- package/src/components/ChatAndParticipants/ChatAndParticipantsView.tsx +14 -5
- package/src/components/ChatAndParticipants/ChatView.tsx +37 -5
- package/src/components/DisplayView.tsx +4 -13
- package/src/components/EndRoomModal.tsx +0 -1
- package/src/components/EndRoomModalContent.tsx +11 -13
- package/src/components/Footer.tsx +20 -23
- package/src/components/GridView.tsx +44 -8
- package/src/components/HLSFooter.tsx +1 -1
- package/src/components/HLSView.tsx +45 -44
- package/src/components/HMSBaseButton.tsx +17 -2
- package/src/components/HMSDangerButton.tsx +3 -0
- package/src/components/HMSHLSMessage.tsx +130 -13
- package/src/components/HMSHLSMessageList.tsx +2 -2
- package/src/components/HMSHandRaiseNotification.tsx +17 -10
- package/src/components/HMSKeyboardAvoidingView.android.tsx +1 -5
- package/src/components/HMSKeyboardAvoidingView.tsx +12 -4
- package/src/components/HMSLiveIndicator.tsx +14 -83
- package/src/components/HMSLiveViewerCount.tsx +91 -0
- package/src/components/HMSLocalScreenshareNotification.tsx +1 -0
- package/src/components/HMSNotification.tsx +56 -13
- package/src/components/HMSNotifications.tsx +12 -2
- package/src/components/HMSOverlayChatView.tsx +91 -18
- package/src/components/HMSPreviewEditName.tsx +12 -1
- package/src/components/HMSPreviewHLSLiveIndicator.tsx +2 -5
- package/src/components/HMSPrimaryButton.tsx +3 -0
- package/src/components/HMSRecordingIndicator.tsx +10 -7
- package/src/components/HMSRoomOptions.tsx +4 -4
- package/src/components/HMSTerminalErrorNotification.tsx +15 -10
- package/src/components/Header.tsx +17 -3
- package/src/components/LeaveRoomBottomSheet.tsx +14 -15
- package/src/components/Meeting.tsx +6 -19
- package/src/components/MeetingScreenContent.tsx +70 -64
- package/src/components/MiniView.tsx +4 -4
- package/src/components/Modals.tsx +23 -25
- package/src/components/OverlayedViews.tsx +6 -3
- package/src/components/Participants/ParticipantsItemOptions.tsx +12 -7
- package/src/components/PeerSettingsModalContent.tsx +4 -1
- package/src/components/PeerVideoTile/PeerVideoTileView.tsx +4 -1
- package/src/components/PressableIcon.tsx +22 -17
- package/src/components/Preview.tsx +15 -2
- package/src/components/PreviewForRoleChangeModal.tsx +4 -3
- package/src/components/RoomSettingsModalContent.tsx +74 -14
- package/src/components/RoomSettingsModalDebugModeContent.tsx +2 -4
- package/src/components/WebrtcView.tsx +63 -22
- package/src/hooks-sdk-selectors.tsx +19 -0
- package/src/hooks-sdk.ts +37 -0
- package/src/hooks-util-selectors.tsx +2 -2
- package/src/hooks-util.ts +639 -131
- package/src/redux/actionTypes.ts +25 -2
- package/src/redux/actions/index.ts +46 -4
- package/src/redux/reducers/appState.ts +60 -3
- package/src/redux/reducers/chatWindow.ts +2 -2
- package/src/redux/reducers/message.ts +20 -6
- package/src/types.ts +35 -6
- package/src/utils/types.ts +15 -3
- package/src/utils.ts +2 -2
- package/lib/commonjs/components/Chat/PinnedMessage.js +0 -81
- package/lib/commonjs/components/Chat/PinnedMessage.js.map +0 -1
- package/lib/module/components/Chat/PinnedMessage.js +0 -72
- package/lib/module/components/Chat/PinnedMessage.js.map +0 -1
- package/lib/typescript/components/Chat/PinnedMessage.d.ts +0 -3
- package/lib/typescript/components/Chat/PinnedMessage.d.ts.map +0 -1
- package/src/components/Chat/PinnedMessage.tsx +0 -89
package/lib/module/hooks-util.js
CHANGED
|
@@ -5,9 +5,10 @@ import { SoftInputModes } from '@100mslive/react-native-hms';
|
|
|
5
5
|
import Toast from 'react-native-simple-toast';
|
|
6
6
|
import { useRef, useCallback, useEffect, useState, useMemo, useContext } from 'react';
|
|
7
7
|
import { MaxTilesInOnePage, ModalTypes, OnLeaveReason, PeerListRefreshInterval, PipModes } from './utils/types';
|
|
8
|
-
import {
|
|
8
|
+
import { ChatBroadcastFilter } from './utils/types';
|
|
9
|
+
import { createPeerTrackNode, parseMetadata } from './utils/functions';
|
|
9
10
|
import { batch, shallowEqual, useDispatch, useSelector, useStore } from 'react-redux';
|
|
10
|
-
import { addMessage, addNotification, addParticipant, addParticipants,
|
|
11
|
+
import { addMessage, addNotification, addParticipant, addParticipants, addPinnedMessages, addScreenshareTile, addUpdateParticipant, changeMeetingState, changePipModeStatus, changeStartingHLSStream, clearStore, filterOutMsgsFromBlockedPeers, removeNotification, removeParticipant, removeParticipants, removeScreenshareTile, replaceParticipantsList, saveUserData, setActiveChatBottomSheetTab, setActiveSpeakers, setAutoEnterPipMode, setChatPeerBlacklist, setChatState, setEditUsernameDisabled, setFullScreenPeerTrackNode, setHMSLocalPeerState, setHMSRoleState, setHMSRoomState, setHandleBackButton, setIsLocalAudioMutedState, setIsLocalVideoMutedState, setLayoutConfig, setLocalPeerTrackNode, setMiniViewPeerTrackNode, setModalType, setOnLeaveHandler, setPrebuiltData, setReconnecting, setRoleChangeRequest, setStartingOrStoppingRecording, updateFullScreenPeerTrackNode, updateLocalPeerTrackNode, updateMiniViewPeerTrackNode, updateScreenshareTile } from './redux/actions';
|
|
11
12
|
import { createPeerTrackNodeUniqueId, degradeOrRestorePeerTrackNodes, peerTrackNodeExistForPeer, peerTrackNodeExistForPeerAndTrack, removePeerTrackNodes, removePeerTrackNodesWithTrack, replacePeerTrackNodes, replacePeerTrackNodesWithTrack } from './peerTrackNodeUtils';
|
|
12
13
|
import { MeetingState } from './types';
|
|
13
14
|
import { BackHandler, InteractionManager, Keyboard, Platform } from 'react-native';
|
|
@@ -17,6 +18,8 @@ import { selectChatLayoutConfig, selectConferencingScreenConfig, selectIsHLSView
|
|
|
17
18
|
import { getRoomLayout } from './modules/HMSManager';
|
|
18
19
|
import { DEFAULT_THEME, DEFAULT_TYPOGRAPHY } from './utils/theme';
|
|
19
20
|
import { NotificationTypes } from './types';
|
|
21
|
+
import { KeyboardState, useSharedValue } from 'react-native-reanimated';
|
|
22
|
+
import { useHMSActions } from './hooks-sdk';
|
|
20
23
|
export const useHMSListeners = setPeerTrackNodes => {
|
|
21
24
|
const hmsInstance = useHMSInstance();
|
|
22
25
|
const updateLocalPeer = useUpdateHMSLocalPeer(hmsInstance);
|
|
@@ -42,30 +45,6 @@ const useHMSRoomUpdate = hmsInstance => {
|
|
|
42
45
|
}
|
|
43
46
|
} else if (type === HMSRoomUpdate.HLS_STREAMING_STATE_UPDATED) {
|
|
44
47
|
dispatch(changeStartingHLSStream(false));
|
|
45
|
-
} else if (type === HMSRoomUpdate.RTMP_STREAMING_STATE_UPDATED) {
|
|
46
|
-
var _room$rtmpHMSRtmpStre, _room$rtmpHMSRtmpStre2;
|
|
47
|
-
let streaming = room === null || room === void 0 || (_room$rtmpHMSRtmpStre = room.rtmpHMSRtmpStreamingState) === null || _room$rtmpHMSRtmpStre === void 0 ? void 0 : _room$rtmpHMSRtmpStre.running;
|
|
48
|
-
const startAtDate = room === null || room === void 0 || (_room$rtmpHMSRtmpStre2 = room.rtmpHMSRtmpStreamingState) === null || _room$rtmpHMSRtmpStre2 === void 0 ? void 0 : _room$rtmpHMSRtmpStre2.startedAt;
|
|
49
|
-
let startTime = null;
|
|
50
|
-
if (startAtDate) {
|
|
51
|
-
var _startAtDate$getMinut;
|
|
52
|
-
let hours = startAtDate.getHours().toString();
|
|
53
|
-
let minutes = (_startAtDate$getMinut = startAtDate.getMinutes()) === null || _startAtDate$getMinut === void 0 ? void 0 : _startAtDate$getMinut.toString();
|
|
54
|
-
startTime = hours + ':' + minutes;
|
|
55
|
-
}
|
|
56
|
-
Toast.showWithGravity(`RTMP Streaming ${streaming ? `Started ${startTime ? 'At ' + startTime : ''}` : 'Stopped'}`, Toast.LONG, Toast.TOP);
|
|
57
|
-
} else if (type === HMSRoomUpdate.SERVER_RECORDING_STATE_UPDATED) {
|
|
58
|
-
var _room$serverRecording, _room$serverRecording2;
|
|
59
|
-
let streaming = room === null || room === void 0 || (_room$serverRecording = room.serverRecordingState) === null || _room$serverRecording === void 0 ? void 0 : _room$serverRecording.running;
|
|
60
|
-
const startAtDate = room === null || room === void 0 || (_room$serverRecording2 = room.serverRecordingState) === null || _room$serverRecording2 === void 0 ? void 0 : _room$serverRecording2.startedAt;
|
|
61
|
-
let startTime = null;
|
|
62
|
-
if (startAtDate) {
|
|
63
|
-
var _startAtDate$getMinut2;
|
|
64
|
-
let hours = startAtDate.getHours().toString();
|
|
65
|
-
let minutes = (_startAtDate$getMinut2 = startAtDate.getMinutes()) === null || _startAtDate$getMinut2 === void 0 ? void 0 : _startAtDate$getMinut2.toString();
|
|
66
|
-
startTime = hours + ':' + minutes;
|
|
67
|
-
}
|
|
68
|
-
Toast.showWithGravity(`Server Recording ${streaming ? `Started ${startTime ? 'At ' + startTime : ''}` : 'Stopped'}`, Toast.LONG, Toast.TOP);
|
|
69
48
|
}
|
|
70
49
|
};
|
|
71
50
|
hmsInstance.addEventListener(HMSUpdateListenerActions.ON_ROOM_UPDATE, roomUpdateHandler);
|
|
@@ -80,7 +59,7 @@ const useHMSPeersUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
|
|
|
80
59
|
// const inMeeting = useSelector(
|
|
81
60
|
// (state: RootState) => state.app.meetingState === MeetingState.IN_MEETING
|
|
82
61
|
// );
|
|
83
|
-
|
|
62
|
+
const hmsActions = useHMSActions();
|
|
84
63
|
useEffect(() => {
|
|
85
64
|
const peerUpdateHandler = ({
|
|
86
65
|
peer,
|
|
@@ -128,6 +107,7 @@ const useHMSPeersUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
|
|
|
128
107
|
const fullScreenPeerTrackNode = reduxState.app.fullScreenPeerTrackNode;
|
|
129
108
|
const miniviewPeerTrackNode = reduxState.app.miniviewPeerTrackNode;
|
|
130
109
|
const localPeerTrackNode = reduxState.app.localPeerTrackNode;
|
|
110
|
+
const initialRole = reduxState.app.initialRole;
|
|
131
111
|
|
|
132
112
|
// Currently Applied Layout config
|
|
133
113
|
const currentLayoutConfig = selectLayoutConfigForRole(reduxState.hmsStates.layoutConfig, peer.role || null);
|
|
@@ -182,12 +162,36 @@ const useHMSPeersUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
|
|
|
182
162
|
// - TODO: update local localPeer state
|
|
183
163
|
// - Pass this updated data to Meeting component -> DisplayView component
|
|
184
164
|
updateLocalPeer();
|
|
165
|
+
if (type === HMSPeerUpdate.ROLE_CHANGED) {
|
|
166
|
+
const parsedLocalPeerMetadata = parseMetadata(peer.metadata);
|
|
167
|
+
if (parsedLocalPeerMetadata.prevRole !== initialRole) {
|
|
168
|
+
const newMetadata = {
|
|
169
|
+
...parsedLocalPeerMetadata,
|
|
170
|
+
prevRole: initialRole === null || initialRole === void 0 ? void 0 : initialRole.name
|
|
171
|
+
};
|
|
172
|
+
hmsActions.changeMetadata(newMetadata).then(r => {
|
|
173
|
+
console.log('Metadata changed successfully', r);
|
|
174
|
+
}).catch(e => {
|
|
175
|
+
console.log('Metadata change failed', e);
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
185
179
|
return;
|
|
186
180
|
}
|
|
187
181
|
if (type === HMSPeerUpdate.ROLE_CHANGED) {
|
|
188
182
|
var _peer$role2, _peer$role3, _peer$role4, _peer$role5, _peer$role6, _peer$role7, _peer$role8, _peer$role9, _peer$role10;
|
|
189
183
|
dispatch(addUpdateParticipant(peer));
|
|
190
184
|
|
|
185
|
+
// saving current role in peer metadata,
|
|
186
|
+
// so that when peer is removed from stage, we can assign previous role to it.
|
|
187
|
+
// if (localPeerRoleName) {
|
|
188
|
+
// const newMetadata = {
|
|
189
|
+
// ...localPeerMetadata,
|
|
190
|
+
// prevRole: localPeerRoleName,
|
|
191
|
+
// };
|
|
192
|
+
// await hmsActions.changeMetadata(newMetadata);
|
|
193
|
+
// }
|
|
194
|
+
|
|
191
195
|
// Handling regular tiles list
|
|
192
196
|
if (((_peer$role2 = peer.role) === null || _peer$role2 === void 0 || (_peer$role2 = _peer$role2.publishSettings) === null || _peer$role2 === void 0 ? void 0 : _peer$role2.allowed) === undefined || (_peer$role3 = peer.role) !== null && _peer$role3 !== void 0 && (_peer$role3 = _peer$role3.publishSettings) !== null && _peer$role3 !== void 0 && _peer$role3.allowed && ((_peer$role4 = peer.role) === null || _peer$role4 === void 0 || (_peer$role4 = _peer$role4.publishSettings) === null || _peer$role4 === void 0 ? void 0 : _peer$role4.allowed.length) < 1) {
|
|
193
197
|
setPeerTrackNodes(prevPeerTrackNodes => {
|
|
@@ -647,6 +651,7 @@ export const useHMSRoleChangeRequest = (callback, deps) => {
|
|
|
647
651
|
}, [...(deps || []), hmsInstance]);
|
|
648
652
|
};
|
|
649
653
|
export const useHMSSessionStoreListeners = gridViewRef => {
|
|
654
|
+
const store = useStore();
|
|
650
655
|
const dispatch = useDispatch();
|
|
651
656
|
const hmsSessionStore = useSelector(state => state.user.hmsSessionStore);
|
|
652
657
|
const sessionStoreListenersRef = useRef([]);
|
|
@@ -658,21 +663,79 @@ export const useHMSSessionStoreListeners = gridViewRef => {
|
|
|
658
663
|
const addSessionStoreListeners = () => {
|
|
659
664
|
// Handle 'spotlight' key values
|
|
660
665
|
const handleSpotlightIdChange = id => {
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
666
|
+
if (id === null || id === undefined || typeof id === 'string') {
|
|
667
|
+
var _gridViewRef$current;
|
|
668
|
+
// set value to the state to rerender the component to reflect changes
|
|
669
|
+
dispatch(saveUserData({
|
|
670
|
+
spotlightTrackId: id
|
|
671
|
+
}));
|
|
672
|
+
// Scroll to start of the list
|
|
673
|
+
(_gridViewRef$current = gridViewRef.current) === null || _gridViewRef$current === void 0 || (_gridViewRef$current = _gridViewRef$current.getRegularTilesFlatlistRef().current) === null || _gridViewRef$current === void 0 || _gridViewRef$current.scrollToOffset({
|
|
674
|
+
animated: true,
|
|
675
|
+
offset: 0
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
// Handle 'pinnedMessages' key values
|
|
681
|
+
const handlePinnedMessagesChange = data => {
|
|
682
|
+
if (Array.isArray(data)) {
|
|
683
|
+
dispatch(addPinnedMessages(data));
|
|
684
|
+
}
|
|
685
|
+
};
|
|
686
|
+
|
|
687
|
+
// Handle 'chatState' key values
|
|
688
|
+
const handleChatStateChange = data => {
|
|
689
|
+
try {
|
|
690
|
+
var _reduxState$hmsStates3;
|
|
691
|
+
if (typeof data !== 'object' || Array.isArray(data) || data === null) {
|
|
692
|
+
throw new Error('`data` is a falsy value');
|
|
693
|
+
}
|
|
694
|
+
if (!('enabled' in data)) {
|
|
695
|
+
throw new Error("`data` doesn't have `enabled` property");
|
|
696
|
+
}
|
|
697
|
+
const parsedData = data;
|
|
698
|
+
const reduxState = store.getState();
|
|
699
|
+
const currentChatState = reduxState.app.chatState;
|
|
700
|
+
if (parsedData.enabled === (currentChatState === null || currentChatState === void 0 ? void 0 : currentChatState.enabled)) {
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
703
|
+
const currentLayoutConfig = selectLayoutConfigForRole(reduxState.hmsStates.layoutConfig, ((_reduxState$hmsStates3 = reduxState.hmsStates.localPeer) === null || _reduxState$hmsStates3 === void 0 ? void 0 : _reduxState$hmsStates3.role) ?? null);
|
|
704
|
+
const chatLayoutConfig = selectChatLayoutConfig(currentLayoutConfig);
|
|
705
|
+
const isAllowedToSendMessage = ((chatLayoutConfig === null || chatLayoutConfig === void 0 ? void 0 : chatLayoutConfig.private_chat_enabled) || (chatLayoutConfig === null || chatLayoutConfig === void 0 ? void 0 : chatLayoutConfig.public_chat_enabled) || (chatLayoutConfig === null || chatLayoutConfig === void 0 ? void 0 : chatLayoutConfig.roles_whitelist) && (chatLayoutConfig === null || chatLayoutConfig === void 0 ? void 0 : chatLayoutConfig.roles_whitelist.length) > 0) ?? false;
|
|
706
|
+
batch(() => {
|
|
707
|
+
if (isAllowedToSendMessage && (
|
|
708
|
+
// Only show notification when allowed to send message, AND
|
|
709
|
+
!parsedData.enabled ||
|
|
710
|
+
// Chat is Paused, OR
|
|
711
|
+
currentChatState && parsedData.enabled !== currentChatState.enabled) // current Chat state is different from previous state
|
|
712
|
+
) {
|
|
713
|
+
dispatch(addNotification({
|
|
714
|
+
id: `chat-state-enabled-${Math.random().toString(16).slice(2)}`,
|
|
715
|
+
icon: parsedData.enabled ? 'chat-on' : 'chat-off',
|
|
716
|
+
type: NotificationTypes.INFO,
|
|
717
|
+
title: `Chat ${parsedData.enabled ? 'Resumed' : 'Paused'}`,
|
|
718
|
+
message: `Chat ${parsedData.enabled ? 'resumed' : 'paused'} ${parsedData.updatedBy ? `by ${parsedData.updatedBy.userName}` : ''}`
|
|
719
|
+
}));
|
|
720
|
+
}
|
|
721
|
+
dispatch(setChatState(parsedData));
|
|
722
|
+
});
|
|
723
|
+
} catch (error) {
|
|
724
|
+
dispatch(setChatState(null));
|
|
725
|
+
}
|
|
671
726
|
};
|
|
672
727
|
|
|
673
|
-
// Handle '
|
|
674
|
-
const
|
|
675
|
-
|
|
728
|
+
// Handle 'chatPeerBlacklist' key values
|
|
729
|
+
const handleChatPeerBlacklistChange = data => {
|
|
730
|
+
// Whenever list changes :
|
|
731
|
+
// - check if local peer is blocked or unblocked
|
|
732
|
+
// - filter out messages of blocked peers
|
|
733
|
+
if (Array.isArray(data)) {
|
|
734
|
+
batch(() => {
|
|
735
|
+
dispatch(setChatPeerBlacklist(data));
|
|
736
|
+
dispatch(filterOutMsgsFromBlockedPeers(data));
|
|
737
|
+
});
|
|
738
|
+
}
|
|
676
739
|
};
|
|
677
740
|
|
|
678
741
|
// Getting value for 'spotlight' key by using `get` method on HMSSessionStore instance
|
|
@@ -681,20 +744,32 @@ export const useHMSSessionStoreListeners = gridViewRef => {
|
|
|
681
744
|
handleSpotlightIdChange(data);
|
|
682
745
|
}).catch(error => console.log('Session Store get `spotlight` key value error: ', error));
|
|
683
746
|
|
|
684
|
-
// Getting value for '
|
|
685
|
-
hmsSessionStore.get('
|
|
686
|
-
console.log('Session Store get `
|
|
687
|
-
|
|
688
|
-
}).catch(error => console.log('Session Store get `
|
|
747
|
+
// Getting value for 'pinnedMessages' key by using `get` method on HMSSessionStore instance
|
|
748
|
+
hmsSessionStore.get('pinnedMessages').then(data => {
|
|
749
|
+
console.log('Session Store get `pinnedMessages` key value success: ', data);
|
|
750
|
+
handlePinnedMessagesChange(data);
|
|
751
|
+
}).catch(error => console.log('Session Store get `pinnedMessages` key value error: ', error));
|
|
752
|
+
|
|
753
|
+
// Getting value for 'chatState' key by using `get` method on HMSSessionStore instance
|
|
754
|
+
hmsSessionStore.get('chatState').then(data => {
|
|
755
|
+
console.log('Session Store get `chatState` key value success: ', data);
|
|
756
|
+
handleChatStateChange(data);
|
|
757
|
+
}).catch(error => console.log('Session Store get `chatState` key value error: ', error));
|
|
758
|
+
|
|
759
|
+
// Getting value for 'chatPeerBlacklist' key by using `get` method on HMSSessionStore instance
|
|
760
|
+
hmsSessionStore.get('chatPeerBlacklist').then(data => {
|
|
761
|
+
console.log('Session Store get `chatPeerBlacklist` key value success: ', data);
|
|
762
|
+
handleChatPeerBlacklistChange(data);
|
|
763
|
+
}).catch(error => console.log('Session Store get `chatPeerBlacklist` key value error: ', error));
|
|
689
764
|
|
|
690
765
|
// let lastSpotlightValue: HMSSessionStoreValue = null;
|
|
691
766
|
// let lastPinnedMessageValue: HMSSessionStoreValue = null;
|
|
692
767
|
|
|
693
|
-
// Add subscription for `spotlight` & `
|
|
694
|
-
const subscription = hmsSessionStore.addKeyChangeListener(['spotlight', '
|
|
768
|
+
// Add subscription for `spotlight`, `pinnedMessages`, `chatState` & `chatPeerBlacklist` keys updates on Session Store
|
|
769
|
+
const subscription = hmsSessionStore.addKeyChangeListener(['spotlight', 'pinnedMessages', 'chatState', 'chatPeerBlacklist'], (error, data) => {
|
|
695
770
|
// If error occurs, handle error and return early
|
|
696
771
|
if (error !== null) {
|
|
697
|
-
console.log('`spotlight` & `
|
|
772
|
+
console.log('`spotlight`, `pinnedMessages`, `chatState` & `chatPeerBlacklist` key listener Error -> ', error);
|
|
698
773
|
return;
|
|
699
774
|
}
|
|
700
775
|
|
|
@@ -704,44 +779,21 @@ export const useHMSSessionStoreListeners = gridViewRef => {
|
|
|
704
779
|
case 'spotlight':
|
|
705
780
|
{
|
|
706
781
|
handleSpotlightIdChange(data.value);
|
|
707
|
-
|
|
708
|
-
// Showing Toast message if value has actually changed
|
|
709
|
-
// if (
|
|
710
|
-
// data.value !== lastSpotlightValue &&
|
|
711
|
-
// (data.value || lastSpotlightValue)
|
|
712
|
-
// ) {
|
|
713
|
-
// Toast.showWithGravity(
|
|
714
|
-
// `SessionStore: \`spotlight\` key's value changed to ${data.value}`,
|
|
715
|
-
// Toast.LONG,
|
|
716
|
-
// Toast.TOP
|
|
717
|
-
// );
|
|
718
|
-
// }
|
|
719
|
-
|
|
720
|
-
// lastSpotlightValue = data.value;
|
|
721
782
|
break;
|
|
722
783
|
}
|
|
723
|
-
case '
|
|
784
|
+
case 'pinnedMessages':
|
|
724
785
|
{
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
// Toast.showWithGravity(
|
|
737
|
-
// `SessionStore: \`pinnedMessage\` key's value changed to ${data.value}`,
|
|
738
|
-
// Toast.LONG,
|
|
739
|
-
// Toast.TOP
|
|
740
|
-
// );
|
|
741
|
-
// }, 1500);
|
|
742
|
-
// }
|
|
743
|
-
|
|
744
|
-
// lastPinnedMessageValue = data.value;
|
|
786
|
+
handlePinnedMessagesChange(data.value);
|
|
787
|
+
break;
|
|
788
|
+
}
|
|
789
|
+
case 'chatState':
|
|
790
|
+
{
|
|
791
|
+
handleChatStateChange(data.value);
|
|
792
|
+
break;
|
|
793
|
+
}
|
|
794
|
+
case 'chatPeerBlacklist':
|
|
795
|
+
{
|
|
796
|
+
handleChatPeerBlacklistChange(data.value);
|
|
745
797
|
break;
|
|
746
798
|
}
|
|
747
799
|
}
|
|
@@ -759,7 +811,7 @@ export const useHMSSessionStoreListeners = gridViewRef => {
|
|
|
759
811
|
// if (toastTimeoutId !== null) clearTimeout(toastTimeoutId);
|
|
760
812
|
};
|
|
761
813
|
}
|
|
762
|
-
}, [hmsSessionStore]);
|
|
814
|
+
}, [store, hmsSessionStore]);
|
|
763
815
|
};
|
|
764
816
|
export const useHMSSessionStore = () => {
|
|
765
817
|
const hmsInstance = useHMSInstance();
|
|
@@ -1514,7 +1566,7 @@ export const useSendMessage = () => {
|
|
|
1514
1566
|
const chatWindowState = reduxStore.getState().chatWindow;
|
|
1515
1567
|
const message = chatWindowState.typedMessage;
|
|
1516
1568
|
const sendingTo = chatWindowState.sendTo;
|
|
1517
|
-
if (message.length <= 0) return;
|
|
1569
|
+
if (message.length <= 0 || !sendingTo) return;
|
|
1518
1570
|
const hmsMessageRecipient = new HMSMessageRecipient({
|
|
1519
1571
|
recipientType: 'publishSettings' in sendingTo ? HMSMessageRecipientType.ROLES : 'peerID' in sendingTo ? HMSMessageRecipientType.PEER : HMSMessageRecipientType.BROADCAST,
|
|
1520
1572
|
recipientPeer: 'peerID' in sendingTo ? sendingTo : undefined,
|
|
@@ -1566,6 +1618,42 @@ export const useSendMessage = () => {
|
|
|
1566
1618
|
sendMessage
|
|
1567
1619
|
};
|
|
1568
1620
|
};
|
|
1621
|
+
export const useHMSCanDisableChat = () => {
|
|
1622
|
+
return useHMSChatLayoutConfig(chatLayoutConfig => {
|
|
1623
|
+
var _chatLayoutConfig$rea;
|
|
1624
|
+
return (chatLayoutConfig === null || chatLayoutConfig === void 0 || (_chatLayoutConfig$rea = chatLayoutConfig.real_time_controls) === null || _chatLayoutConfig$rea === void 0 ? void 0 : _chatLayoutConfig$rea.can_disable_chat) ?? false;
|
|
1625
|
+
});
|
|
1626
|
+
};
|
|
1627
|
+
export const useHMSChatRecipientSelector = () => {
|
|
1628
|
+
const roles = useSelector(state => state.hmsStates.roles);
|
|
1629
|
+
const defaultChatRecipient = useMemo(() => ({
|
|
1630
|
+
privateChat: false,
|
|
1631
|
+
publicChat: false,
|
|
1632
|
+
roles: []
|
|
1633
|
+
}), []);
|
|
1634
|
+
const chatLayoutConfig = useHMSChatLayoutConfig(_chatLayoutConfig => _chatLayoutConfig);
|
|
1635
|
+
const rolesWhitelist = chatLayoutConfig === null || chatLayoutConfig === void 0 ? void 0 : chatLayoutConfig.roles_whitelist;
|
|
1636
|
+
const whitelistedRoles = useMemo(() => {
|
|
1637
|
+
if (!rolesWhitelist) {
|
|
1638
|
+
return defaultChatRecipient.roles;
|
|
1639
|
+
}
|
|
1640
|
+
return rolesWhitelist.map(roleStr => roles.find(role => role.name === roleStr)).filter(role => !!role);
|
|
1641
|
+
}, [roles, rolesWhitelist, defaultChatRecipient]);
|
|
1642
|
+
const privateChat = (chatLayoutConfig === null || chatLayoutConfig === void 0 ? void 0 : chatLayoutConfig.private_chat_enabled) ?? defaultChatRecipient.privateChat;
|
|
1643
|
+
const publicChat = (chatLayoutConfig === null || chatLayoutConfig === void 0 ? void 0 : chatLayoutConfig.public_chat_enabled) ?? defaultChatRecipient.publicChat;
|
|
1644
|
+
if (chatLayoutConfig) {
|
|
1645
|
+
return {
|
|
1646
|
+
privateChat,
|
|
1647
|
+
publicChat,
|
|
1648
|
+
roles: whitelistedRoles
|
|
1649
|
+
};
|
|
1650
|
+
}
|
|
1651
|
+
return defaultChatRecipient;
|
|
1652
|
+
};
|
|
1653
|
+
export const useIsAllowedToSendMessage = () => {
|
|
1654
|
+
const chatRecipients = useHMSChatRecipientSelector();
|
|
1655
|
+
return chatRecipients.privateChat || chatRecipients.publicChat || chatRecipients.roles.length > 0;
|
|
1656
|
+
};
|
|
1569
1657
|
export const useHMSChatLayoutConfig = (selector, equalityFn) => {
|
|
1570
1658
|
return useHMSLayoutConfig(layoutConfig => {
|
|
1571
1659
|
const chatConfig = selectChatLayoutConfig(layoutConfig);
|
|
@@ -1619,11 +1707,15 @@ export const useSavePropsToStore = (props, dispatch) => {
|
|
|
1619
1707
|
handleBackButton,
|
|
1620
1708
|
autoEnterPipMode
|
|
1621
1709
|
} = props;
|
|
1710
|
+
dispatch(setPrebuiltData({
|
|
1711
|
+
roomCode,
|
|
1712
|
+
options
|
|
1713
|
+
}));
|
|
1622
1714
|
useEffect(() => {
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
}
|
|
1715
|
+
const passedUserName = options === null || options === void 0 ? void 0 : options.userName;
|
|
1716
|
+
if (passedUserName && passedUserName.length > 0) {
|
|
1717
|
+
dispatch(setEditUsernameDisabled(true));
|
|
1718
|
+
}
|
|
1627
1719
|
}, [roomCode, options]);
|
|
1628
1720
|
useEffect(() => {
|
|
1629
1721
|
dispatch(setOnLeaveHandler(onLeave));
|
|
@@ -1652,7 +1744,7 @@ export const useStartRecording = () => {
|
|
|
1652
1744
|
dispatch(addNotification({
|
|
1653
1745
|
id: Math.random().toString(16).slice(2),
|
|
1654
1746
|
type: NotificationTypes.ERROR,
|
|
1655
|
-
|
|
1747
|
+
title: error.message
|
|
1656
1748
|
}));
|
|
1657
1749
|
});
|
|
1658
1750
|
});
|
|
@@ -1661,6 +1753,152 @@ export const useStartRecording = () => {
|
|
|
1661
1753
|
startRecording
|
|
1662
1754
|
};
|
|
1663
1755
|
};
|
|
1756
|
+
export const useHMSChatState = () => {
|
|
1757
|
+
const hmsSessionStore = useSelector(state => state.user.hmsSessionStore);
|
|
1758
|
+
const localPeerName = useSelector(state => {
|
|
1759
|
+
var _state$hmsStates$loca4;
|
|
1760
|
+
return (_state$hmsStates$loca4 = state.hmsStates.localPeer) === null || _state$hmsStates$loca4 === void 0 ? void 0 : _state$hmsStates$loca4.name;
|
|
1761
|
+
});
|
|
1762
|
+
const localPeerID = useSelector(state => {
|
|
1763
|
+
var _state$hmsStates$loca5;
|
|
1764
|
+
return (_state$hmsStates$loca5 = state.hmsStates.localPeer) === null || _state$hmsStates$loca5 === void 0 ? void 0 : _state$hmsStates$loca5.peerID;
|
|
1765
|
+
});
|
|
1766
|
+
const localPeerUserID = useSelector(state => {
|
|
1767
|
+
var _state$hmsStates$loca6;
|
|
1768
|
+
return (_state$hmsStates$loca6 = state.hmsStates.localPeer) === null || _state$hmsStates$loca6 === void 0 ? void 0 : _state$hmsStates$loca6.customerUserID;
|
|
1769
|
+
});
|
|
1770
|
+
const _chatState = useSelector(state => state.app.chatState);
|
|
1771
|
+
const chatState = useMemo(() => _chatState || {
|
|
1772
|
+
enabled: true
|
|
1773
|
+
}, [_chatState]);
|
|
1774
|
+
const setChatState = useCallback(async enabled => {
|
|
1775
|
+
// If instance of HMSSessionStore is available
|
|
1776
|
+
if (hmsSessionStore) {
|
|
1777
|
+
try {
|
|
1778
|
+
const value = {
|
|
1779
|
+
enabled,
|
|
1780
|
+
updatedBy: {
|
|
1781
|
+
peerID: localPeerID ?? null,
|
|
1782
|
+
userID: localPeerUserID ?? null,
|
|
1783
|
+
userName: localPeerName ?? ''
|
|
1784
|
+
},
|
|
1785
|
+
updatedAt: Date.now()
|
|
1786
|
+
};
|
|
1787
|
+
// set `value` on `session` with key 'chatState'
|
|
1788
|
+
const response = await hmsSessionStore.set(value, 'chatState');
|
|
1789
|
+
console.log('setSessionMetaData Response -> ', response);
|
|
1790
|
+
} catch (error) {
|
|
1791
|
+
console.log('setSessionMetaData Error -> ', error);
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
}, [localPeerName, hmsSessionStore, localPeerUserID, localPeerID]);
|
|
1795
|
+
return {
|
|
1796
|
+
chatState,
|
|
1797
|
+
setChatState
|
|
1798
|
+
};
|
|
1799
|
+
};
|
|
1800
|
+
export const useIsMessagePinned = message => {
|
|
1801
|
+
return useSelector(state => message ? state.messages.pinnedMessages.findIndex(pinnedMessage => pinnedMessage.id === message.messageId) >= 0 : false);
|
|
1802
|
+
};
|
|
1803
|
+
export const useHMSMessagePinningActions = () => {
|
|
1804
|
+
const store = useStore();
|
|
1805
|
+
const hmsSessionStore = useSelector(state => state.user.hmsSessionStore);
|
|
1806
|
+
const pinMessage = useCallback(async message => {
|
|
1807
|
+
let messages = message;
|
|
1808
|
+
if (!Array.isArray(messages)) {
|
|
1809
|
+
messages = [messages];
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
// If instance of HMSSessionStore is available
|
|
1813
|
+
if (hmsSessionStore) {
|
|
1814
|
+
try {
|
|
1815
|
+
var _reduxState$hmsStates4;
|
|
1816
|
+
const reduxState = store.getState();
|
|
1817
|
+
const localPeerName = (_reduxState$hmsStates4 = reduxState.hmsStates.localPeer) === null || _reduxState$hmsStates4 === void 0 ? void 0 : _reduxState$hmsStates4.name;
|
|
1818
|
+
const pinnedMessages = reduxState.messages.pinnedMessages;
|
|
1819
|
+
let payload = messages.map(message => {
|
|
1820
|
+
var _message$sender2, _message$sender3;
|
|
1821
|
+
return {
|
|
1822
|
+
authorId: ((_message$sender2 = message.sender) === null || _message$sender2 === void 0 ? void 0 : _message$sender2.customerUserID) ?? '',
|
|
1823
|
+
id: message.messageId,
|
|
1824
|
+
pinnedBy: localPeerName ?? '',
|
|
1825
|
+
text: `${(_message$sender3 = message.sender) === null || _message$sender3 === void 0 ? void 0 : _message$sender3.name}: ${message.message}`
|
|
1826
|
+
};
|
|
1827
|
+
});
|
|
1828
|
+
let updatedPinnedMessages = [...pinnedMessages, ...payload];
|
|
1829
|
+
if (updatedPinnedMessages.length > 3) {
|
|
1830
|
+
updatedPinnedMessages = updatedPinnedMessages.slice(updatedPinnedMessages.length - 3);
|
|
1831
|
+
}
|
|
1832
|
+
const response = await hmsSessionStore.set(updatedPinnedMessages, 'pinnedMessages');
|
|
1833
|
+
console.log('setSessionMetaData Response -> ', response);
|
|
1834
|
+
} catch (error) {
|
|
1835
|
+
console.log('setSessionMetaData Error -> ', error);
|
|
1836
|
+
return Promise.reject(error);
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
}, [hmsSessionStore]);
|
|
1840
|
+
const unpinMessage = useCallback(async message => {
|
|
1841
|
+
let messages = message;
|
|
1842
|
+
if (!Array.isArray(messages)) {
|
|
1843
|
+
messages = [messages];
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
// If instance of HMSSessionStore is available
|
|
1847
|
+
if (hmsSessionStore) {
|
|
1848
|
+
try {
|
|
1849
|
+
const pinnedMessages = store.getState().messages.pinnedMessages;
|
|
1850
|
+
const messageIdsToUnpin = messages.map(msg => 'messageId' in msg ? msg.messageId : msg.id);
|
|
1851
|
+
const updatedPinnedMessages = pinnedMessages.filter(pinnedMessage => !messageIdsToUnpin.includes(pinnedMessage.id));
|
|
1852
|
+
const response = await hmsSessionStore.set(updatedPinnedMessages, 'pinnedMessages');
|
|
1853
|
+
console.log('setSessionMetaData Response -> ', response);
|
|
1854
|
+
} catch (error) {
|
|
1855
|
+
console.log('setSessionMetaData Error -> ', error);
|
|
1856
|
+
return Promise.reject(error);
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
}, [hmsSessionStore]);
|
|
1860
|
+
return {
|
|
1861
|
+
pinMessage,
|
|
1862
|
+
unpinMessage
|
|
1863
|
+
};
|
|
1864
|
+
};
|
|
1865
|
+
export const useSetDefaultChatRecipient = () => {
|
|
1866
|
+
const dispatch = useDispatch();
|
|
1867
|
+
const localPeerRoleName = useSelector(state => {
|
|
1868
|
+
var _state$hmsStates$loca7;
|
|
1869
|
+
return (_state$hmsStates$loca7 = state.hmsStates.localPeer) === null || _state$hmsStates$loca7 === void 0 || (_state$hmsStates$loca7 = _state$hmsStates$loca7.role) === null || _state$hmsStates$loca7 === void 0 ? void 0 : _state$hmsStates$loca7.name;
|
|
1870
|
+
});
|
|
1871
|
+
const {
|
|
1872
|
+
privateChat,
|
|
1873
|
+
publicChat,
|
|
1874
|
+
roles: whitelistedRoles
|
|
1875
|
+
} = useHMSChatRecipientSelector();
|
|
1876
|
+
useEffect(() => {
|
|
1877
|
+
if (publicChat) {
|
|
1878
|
+
dispatch({
|
|
1879
|
+
type: 'SET_SENDTO',
|
|
1880
|
+
sendTo: ChatBroadcastFilter
|
|
1881
|
+
});
|
|
1882
|
+
}
|
|
1883
|
+
// If Role is enabled, Select a role
|
|
1884
|
+
else if (Array.isArray(whitelistedRoles) && whitelistedRoles.length > 0) {
|
|
1885
|
+
const roleObj = whitelistedRoles.length === 1 ? whitelistedRoles[0] : whitelistedRoles.filter(whitelistRole => whitelistRole.name !== localPeerRoleName)[0];
|
|
1886
|
+
if (roleObj) {
|
|
1887
|
+
dispatch({
|
|
1888
|
+
type: 'SET_SENDTO',
|
|
1889
|
+
sendTo: roleObj
|
|
1890
|
+
});
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
// If private is enabled, Select None
|
|
1894
|
+
else if (privateChat) {
|
|
1895
|
+
dispatch({
|
|
1896
|
+
type: 'SET_SENDTO',
|
|
1897
|
+
sendTo: null
|
|
1898
|
+
});
|
|
1899
|
+
}
|
|
1900
|
+
}, [privateChat, publicChat, whitelistedRoles, localPeerRoleName, dispatch]);
|
|
1901
|
+
};
|
|
1664
1902
|
export const useAndroidSoftInputAdjustResize = () => {
|
|
1665
1903
|
const currentSoftInputRef = useRef(null);
|
|
1666
1904
|
useEffect(() => {
|
|
@@ -1679,4 +1917,131 @@ export const useAndroidSoftInputAdjustResize = () => {
|
|
|
1679
1917
|
}
|
|
1680
1918
|
}, []);
|
|
1681
1919
|
};
|
|
1920
|
+
export const useKeyboardState = () => {
|
|
1921
|
+
const keyboardState = useSharedValue(KeyboardState.UNKNOWN);
|
|
1922
|
+
useEffect(() => {
|
|
1923
|
+
let didShowTimeoutId = null;
|
|
1924
|
+
let didHideTimeoutId = null;
|
|
1925
|
+
const didShowSubscription = Keyboard.addListener('keyboardDidShow', () => {
|
|
1926
|
+
keyboardState.value = KeyboardState.OPENING;
|
|
1927
|
+
if (didShowTimeoutId !== null) {
|
|
1928
|
+
clearTimeout(didShowTimeoutId);
|
|
1929
|
+
}
|
|
1930
|
+
didShowTimeoutId = setTimeout(() => {
|
|
1931
|
+
keyboardState.value = KeyboardState.OPEN;
|
|
1932
|
+
didShowTimeoutId = null;
|
|
1933
|
+
}, 400);
|
|
1934
|
+
});
|
|
1935
|
+
const didHideSubscription = Keyboard.addListener('keyboardDidHide', () => {
|
|
1936
|
+
keyboardState.value = KeyboardState.CLOSING;
|
|
1937
|
+
if (didHideTimeoutId !== null) {
|
|
1938
|
+
clearTimeout(didHideTimeoutId);
|
|
1939
|
+
}
|
|
1940
|
+
didHideTimeoutId = setTimeout(() => {
|
|
1941
|
+
keyboardState.value = KeyboardState.CLOSED;
|
|
1942
|
+
didHideTimeoutId = null;
|
|
1943
|
+
}, 400);
|
|
1944
|
+
});
|
|
1945
|
+
return () => {
|
|
1946
|
+
if (didShowTimeoutId !== null) {
|
|
1947
|
+
clearTimeout(didShowTimeoutId);
|
|
1948
|
+
}
|
|
1949
|
+
if (didHideTimeoutId !== null) {
|
|
1950
|
+
clearTimeout(didHideTimeoutId);
|
|
1951
|
+
}
|
|
1952
|
+
if ('remove' in didShowSubscription) {
|
|
1953
|
+
didShowSubscription.remove();
|
|
1954
|
+
} else {
|
|
1955
|
+
Keyboard.removeSubscription(didShowSubscription);
|
|
1956
|
+
}
|
|
1957
|
+
if ('remove' in didHideSubscription) {
|
|
1958
|
+
didHideSubscription.remove();
|
|
1959
|
+
} else {
|
|
1960
|
+
Keyboard.removeSubscription(didHideSubscription);
|
|
1961
|
+
}
|
|
1962
|
+
};
|
|
1963
|
+
}, []);
|
|
1964
|
+
return {
|
|
1965
|
+
keyboardState
|
|
1966
|
+
};
|
|
1967
|
+
};
|
|
1968
|
+
export const useAllowPinningMessage = () => {
|
|
1969
|
+
return useHMSChatLayoutConfig(config => (config === null || config === void 0 ? void 0 : config.allow_pinning_messages) ?? false);
|
|
1970
|
+
};
|
|
1971
|
+
export const useIsLocalPeerBlockedFromChat = () => {
|
|
1972
|
+
return useSelector(state => {
|
|
1973
|
+
var _state$hmsStates$loca8;
|
|
1974
|
+
const chatPeerBlacklist = state.app.chatPeerBlacklist;
|
|
1975
|
+
const localPeerUserId = (_state$hmsStates$loca8 = state.hmsStates.localPeer) === null || _state$hmsStates$loca8 === void 0 ? void 0 : _state$hmsStates$loca8.customerUserID;
|
|
1976
|
+
return localPeerUserId ? chatPeerBlacklist.includes(localPeerUserId) : false;
|
|
1977
|
+
});
|
|
1978
|
+
};
|
|
1979
|
+
export const useIsPeerBlocked = peer => {
|
|
1980
|
+
return useSelector(state => {
|
|
1981
|
+
const chatPeerBlacklist = state.app.chatPeerBlacklist;
|
|
1982
|
+
const localPeerUserId = peer === null || peer === void 0 ? void 0 : peer.customerUserID;
|
|
1983
|
+
return localPeerUserId ? chatPeerBlacklist.includes(localPeerUserId) : false;
|
|
1984
|
+
});
|
|
1985
|
+
};
|
|
1986
|
+
export const useBlockPeerActions = () => {
|
|
1987
|
+
const store = useStore();
|
|
1988
|
+
const hmsSessionStore = useSelector(state => state.user.hmsSessionStore);
|
|
1989
|
+
const {
|
|
1990
|
+
unpinMessage
|
|
1991
|
+
} = useHMSMessagePinningActions();
|
|
1992
|
+
const blockPeer = useCallback(async peer => {
|
|
1993
|
+
// If instance of HMSSessionStore is available
|
|
1994
|
+
if (hmsSessionStore) {
|
|
1995
|
+
try {
|
|
1996
|
+
const reduxState = store.getState();
|
|
1997
|
+
const chatPeerBlacklist = reduxState.app.chatPeerBlacklist;
|
|
1998
|
+
const pinnedMessages = reduxState.messages.pinnedMessages;
|
|
1999
|
+
if (peer.customerUserID && !chatPeerBlacklist.includes(peer.customerUserID)) {
|
|
2000
|
+
let updatedChatPeerBlacklist = [...chatPeerBlacklist, peer.customerUserID];
|
|
2001
|
+
const response = await hmsSessionStore.set(updatedChatPeerBlacklist, 'chatPeerBlacklist');
|
|
2002
|
+
console.log('setSessionMetaData Response -> ', response);
|
|
2003
|
+
|
|
2004
|
+
// Unpin messages from sent by the peer
|
|
2005
|
+
const msgsToUnpin = pinnedMessages.filter(pinnedMessage => pinnedMessage.authorId === peer.customerUserID);
|
|
2006
|
+
if (msgsToUnpin.length > 0) {
|
|
2007
|
+
await unpinMessage(msgsToUnpin);
|
|
2008
|
+
}
|
|
2009
|
+
return response;
|
|
2010
|
+
}
|
|
2011
|
+
return Promise.reject('Peer is already blocked!');
|
|
2012
|
+
} catch (error) {
|
|
2013
|
+
console.log('setSessionMetaData Error -> ', error);
|
|
2014
|
+
return Promise.reject(error);
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
}, [hmsSessionStore, unpinMessage]);
|
|
2018
|
+
const unblockPeer = useCallback(async peer => {
|
|
2019
|
+
// If instance of HMSSessionStore is available
|
|
2020
|
+
if (hmsSessionStore) {
|
|
2021
|
+
try {
|
|
2022
|
+
const chatPeerBlacklist = store.getState().app.chatPeerBlacklist;
|
|
2023
|
+
if (peer.customerUserID && chatPeerBlacklist.includes(peer.customerUserID)) {
|
|
2024
|
+
const updatedChatPeerBlacklist = chatPeerBlacklist.filter(peerUserId => peerUserId !== peer.customerUserID);
|
|
2025
|
+
const response = await hmsSessionStore.set(updatedChatPeerBlacklist, 'chatPeerBlacklist');
|
|
2026
|
+
console.log('setSessionMetaData Response -> ', response);
|
|
2027
|
+
return response;
|
|
2028
|
+
}
|
|
2029
|
+
return Promise.reject('Peer is already unblocked!');
|
|
2030
|
+
} catch (error) {
|
|
2031
|
+
console.log('setSessionMetaData Error -> ', error);
|
|
2032
|
+
return Promise.reject(error);
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
}, [hmsSessionStore]);
|
|
2036
|
+
return {
|
|
2037
|
+
blockPeer,
|
|
2038
|
+
unblockPeer
|
|
2039
|
+
};
|
|
2040
|
+
};
|
|
2041
|
+
export const useAllowBlockingPeerFromChat = () => {
|
|
2042
|
+
return useHMSChatLayoutConfig(config => {
|
|
2043
|
+
var _config$real_time_con;
|
|
2044
|
+
return (config === null || config === void 0 || (_config$real_time_con = config.real_time_controls) === null || _config$real_time_con === void 0 ? void 0 : _config$real_time_con.can_block_user) ?? false;
|
|
2045
|
+
});
|
|
2046
|
+
};
|
|
1682
2047
|
//# sourceMappingURL=hooks-util.js.map
|