@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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
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.useAndroidSoftInputAdjustResize = exports.isPublishingAllowed = exports.clearPendingModalTasks = exports.clearConfig = void 0;
|
|
6
|
+
exports.useStartRecording = exports.useShowLandscapeLayout = exports.useShowChatAndParticipants = exports.useShouldGoLive = exports.useSetDefaultChatRecipient = exports.useSendMessage = exports.useSavePropsToStore = exports.usePortraitChatViewVisible = exports.usePipAspectRatio = exports.usePIPListener = exports.useOffStageParticipants = exports.useModalType = exports.useLeaveMethods = exports.useLandscapeChatViewVisible = exports.useKeyboardState = exports.useIsPeerBlocked = exports.useIsMessagePinned = exports.useIsLocalPeerBlockedFromChat = exports.useIsHLSViewer = exports.useIsAllowedToSendMessage = 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.useHMSMessagePinningActions = exports.useHMSListeners = exports.useHMSLayoutConfig = exports.useHMSInstance = exports.useHMSConfig = exports.useHMSConferencingScreenConfig = exports.useHMSChatState = exports.useHMSChatRecipientSelector = exports.useHMSChatLayoutConfig = exports.useHMSChangeTrackStateRequest = exports.useHMSCanDisableChat = exports.useHMSActiveSpeakerUpdates = exports.useFilteredParticipants = exports.useFetchHMSRoles = exports.useEnableAutoPip = exports.useDisableAutoPip = exports.useBlockPeerActions = exports.useBackButtonPress = exports.useAutoPip = exports.useAndroidSoftInputAdjustResize = exports.useAllowPinningMessage = exports.useAllowBlockingPeerFromChat = 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,6 +19,8 @@ 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 _reactNativeReanimated = require("react-native-reanimated");
|
|
23
|
+
var _hooksSdk = require("./hooks-sdk");
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
const useHMSListeners = setPeerTrackNodes => {
|
|
24
26
|
const hmsInstance = useHMSInstance();
|
|
@@ -46,30 +48,6 @@ const useHMSRoomUpdate = hmsInstance => {
|
|
|
46
48
|
}
|
|
47
49
|
} else if (type === _reactNativeHms.HMSRoomUpdate.HLS_STREAMING_STATE_UPDATED) {
|
|
48
50
|
dispatch((0, _actions.changeStartingHLSStream)(false));
|
|
49
|
-
} else if (type === _reactNativeHms.HMSRoomUpdate.RTMP_STREAMING_STATE_UPDATED) {
|
|
50
|
-
var _room$rtmpHMSRtmpStre, _room$rtmpHMSRtmpStre2;
|
|
51
|
-
let streaming = room === null || room === void 0 || (_room$rtmpHMSRtmpStre = room.rtmpHMSRtmpStreamingState) === null || _room$rtmpHMSRtmpStre === void 0 ? void 0 : _room$rtmpHMSRtmpStre.running;
|
|
52
|
-
const startAtDate = room === null || room === void 0 || (_room$rtmpHMSRtmpStre2 = room.rtmpHMSRtmpStreamingState) === null || _room$rtmpHMSRtmpStre2 === void 0 ? void 0 : _room$rtmpHMSRtmpStre2.startedAt;
|
|
53
|
-
let startTime = null;
|
|
54
|
-
if (startAtDate) {
|
|
55
|
-
var _startAtDate$getMinut;
|
|
56
|
-
let hours = startAtDate.getHours().toString();
|
|
57
|
-
let minutes = (_startAtDate$getMinut = startAtDate.getMinutes()) === null || _startAtDate$getMinut === void 0 ? void 0 : _startAtDate$getMinut.toString();
|
|
58
|
-
startTime = hours + ':' + minutes;
|
|
59
|
-
}
|
|
60
|
-
_reactNativeSimpleToast.default.showWithGravity(`RTMP Streaming ${streaming ? `Started ${startTime ? 'At ' + startTime : ''}` : 'Stopped'}`, _reactNativeSimpleToast.default.LONG, _reactNativeSimpleToast.default.TOP);
|
|
61
|
-
} else if (type === _reactNativeHms.HMSRoomUpdate.SERVER_RECORDING_STATE_UPDATED) {
|
|
62
|
-
var _room$serverRecording, _room$serverRecording2;
|
|
63
|
-
let streaming = room === null || room === void 0 || (_room$serverRecording = room.serverRecordingState) === null || _room$serverRecording === void 0 ? void 0 : _room$serverRecording.running;
|
|
64
|
-
const startAtDate = room === null || room === void 0 || (_room$serverRecording2 = room.serverRecordingState) === null || _room$serverRecording2 === void 0 ? void 0 : _room$serverRecording2.startedAt;
|
|
65
|
-
let startTime = null;
|
|
66
|
-
if (startAtDate) {
|
|
67
|
-
var _startAtDate$getMinut2;
|
|
68
|
-
let hours = startAtDate.getHours().toString();
|
|
69
|
-
let minutes = (_startAtDate$getMinut2 = startAtDate.getMinutes()) === null || _startAtDate$getMinut2 === void 0 ? void 0 : _startAtDate$getMinut2.toString();
|
|
70
|
-
startTime = hours + ':' + minutes;
|
|
71
|
-
}
|
|
72
|
-
_reactNativeSimpleToast.default.showWithGravity(`Server Recording ${streaming ? `Started ${startTime ? 'At ' + startTime : ''}` : 'Stopped'}`, _reactNativeSimpleToast.default.LONG, _reactNativeSimpleToast.default.TOP);
|
|
73
51
|
}
|
|
74
52
|
};
|
|
75
53
|
hmsInstance.addEventListener(_reactNativeHms.HMSUpdateListenerActions.ON_ROOM_UPDATE, roomUpdateHandler);
|
|
@@ -84,7 +62,7 @@ const useHMSPeersUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
|
|
|
84
62
|
// const inMeeting = useSelector(
|
|
85
63
|
// (state: RootState) => state.app.meetingState === MeetingState.IN_MEETING
|
|
86
64
|
// );
|
|
87
|
-
|
|
65
|
+
const hmsActions = (0, _hooksSdk.useHMSActions)();
|
|
88
66
|
(0, _react.useEffect)(() => {
|
|
89
67
|
const peerUpdateHandler = ({
|
|
90
68
|
peer,
|
|
@@ -132,6 +110,7 @@ const useHMSPeersUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
|
|
|
132
110
|
const fullScreenPeerTrackNode = reduxState.app.fullScreenPeerTrackNode;
|
|
133
111
|
const miniviewPeerTrackNode = reduxState.app.miniviewPeerTrackNode;
|
|
134
112
|
const localPeerTrackNode = reduxState.app.localPeerTrackNode;
|
|
113
|
+
const initialRole = reduxState.app.initialRole;
|
|
135
114
|
|
|
136
115
|
// Currently Applied Layout config
|
|
137
116
|
const currentLayoutConfig = (0, _hooksUtilSelectors.selectLayoutConfigForRole)(reduxState.hmsStates.layoutConfig, peer.role || null);
|
|
@@ -186,12 +165,36 @@ const useHMSPeersUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
|
|
|
186
165
|
// - TODO: update local localPeer state
|
|
187
166
|
// - Pass this updated data to Meeting component -> DisplayView component
|
|
188
167
|
updateLocalPeer();
|
|
168
|
+
if (type === _reactNativeHms.HMSPeerUpdate.ROLE_CHANGED) {
|
|
169
|
+
const parsedLocalPeerMetadata = (0, _functions.parseMetadata)(peer.metadata);
|
|
170
|
+
if (parsedLocalPeerMetadata.prevRole !== initialRole) {
|
|
171
|
+
const newMetadata = {
|
|
172
|
+
...parsedLocalPeerMetadata,
|
|
173
|
+
prevRole: initialRole === null || initialRole === void 0 ? void 0 : initialRole.name
|
|
174
|
+
};
|
|
175
|
+
hmsActions.changeMetadata(newMetadata).then(r => {
|
|
176
|
+
console.log('Metadata changed successfully', r);
|
|
177
|
+
}).catch(e => {
|
|
178
|
+
console.log('Metadata change failed', e);
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
189
182
|
return;
|
|
190
183
|
}
|
|
191
184
|
if (type === _reactNativeHms.HMSPeerUpdate.ROLE_CHANGED) {
|
|
192
185
|
var _peer$role2, _peer$role3, _peer$role4, _peer$role5, _peer$role6, _peer$role7, _peer$role8, _peer$role9, _peer$role10;
|
|
193
186
|
dispatch((0, _actions.addUpdateParticipant)(peer));
|
|
194
187
|
|
|
188
|
+
// saving current role in peer metadata,
|
|
189
|
+
// so that when peer is removed from stage, we can assign previous role to it.
|
|
190
|
+
// if (localPeerRoleName) {
|
|
191
|
+
// const newMetadata = {
|
|
192
|
+
// ...localPeerMetadata,
|
|
193
|
+
// prevRole: localPeerRoleName,
|
|
194
|
+
// };
|
|
195
|
+
// await hmsActions.changeMetadata(newMetadata);
|
|
196
|
+
// }
|
|
197
|
+
|
|
195
198
|
// Handling regular tiles list
|
|
196
199
|
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) {
|
|
197
200
|
setPeerTrackNodes(prevPeerTrackNodes => {
|
|
@@ -656,6 +659,7 @@ const useHMSRoleChangeRequest = (callback, deps) => {
|
|
|
656
659
|
};
|
|
657
660
|
exports.useHMSRoleChangeRequest = useHMSRoleChangeRequest;
|
|
658
661
|
const useHMSSessionStoreListeners = gridViewRef => {
|
|
662
|
+
const store = (0, _reactRedux.useStore)();
|
|
659
663
|
const dispatch = (0, _reactRedux.useDispatch)();
|
|
660
664
|
const hmsSessionStore = (0, _reactRedux.useSelector)(state => state.user.hmsSessionStore);
|
|
661
665
|
const sessionStoreListenersRef = (0, _react.useRef)([]);
|
|
@@ -667,21 +671,79 @@ const useHMSSessionStoreListeners = gridViewRef => {
|
|
|
667
671
|
const addSessionStoreListeners = () => {
|
|
668
672
|
// Handle 'spotlight' key values
|
|
669
673
|
const handleSpotlightIdChange = id => {
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
674
|
+
if (id === null || id === undefined || typeof id === 'string') {
|
|
675
|
+
var _gridViewRef$current;
|
|
676
|
+
// set value to the state to rerender the component to reflect changes
|
|
677
|
+
dispatch((0, _actions.saveUserData)({
|
|
678
|
+
spotlightTrackId: id
|
|
679
|
+
}));
|
|
680
|
+
// Scroll to start of the list
|
|
681
|
+
(_gridViewRef$current = gridViewRef.current) === null || _gridViewRef$current === void 0 || (_gridViewRef$current = _gridViewRef$current.getRegularTilesFlatlistRef().current) === null || _gridViewRef$current === void 0 || _gridViewRef$current.scrollToOffset({
|
|
682
|
+
animated: true,
|
|
683
|
+
offset: 0
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
|
|
688
|
+
// Handle 'pinnedMessages' key values
|
|
689
|
+
const handlePinnedMessagesChange = data => {
|
|
690
|
+
if (Array.isArray(data)) {
|
|
691
|
+
dispatch((0, _actions.addPinnedMessages)(data));
|
|
692
|
+
}
|
|
693
|
+
};
|
|
694
|
+
|
|
695
|
+
// Handle 'chatState' key values
|
|
696
|
+
const handleChatStateChange = data => {
|
|
697
|
+
try {
|
|
698
|
+
var _reduxState$hmsStates3;
|
|
699
|
+
if (typeof data !== 'object' || Array.isArray(data) || data === null) {
|
|
700
|
+
throw new Error('`data` is a falsy value');
|
|
701
|
+
}
|
|
702
|
+
if (!('enabled' in data)) {
|
|
703
|
+
throw new Error("`data` doesn't have `enabled` property");
|
|
704
|
+
}
|
|
705
|
+
const parsedData = data;
|
|
706
|
+
const reduxState = store.getState();
|
|
707
|
+
const currentChatState = reduxState.app.chatState;
|
|
708
|
+
if (parsedData.enabled === (currentChatState === null || currentChatState === void 0 ? void 0 : currentChatState.enabled)) {
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
const currentLayoutConfig = (0, _hooksUtilSelectors.selectLayoutConfigForRole)(reduxState.hmsStates.layoutConfig, ((_reduxState$hmsStates3 = reduxState.hmsStates.localPeer) === null || _reduxState$hmsStates3 === void 0 ? void 0 : _reduxState$hmsStates3.role) ?? null);
|
|
712
|
+
const chatLayoutConfig = (0, _hooksUtilSelectors.selectChatLayoutConfig)(currentLayoutConfig);
|
|
713
|
+
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;
|
|
714
|
+
(0, _reactRedux.batch)(() => {
|
|
715
|
+
if (isAllowedToSendMessage && (
|
|
716
|
+
// Only show notification when allowed to send message, AND
|
|
717
|
+
!parsedData.enabled ||
|
|
718
|
+
// Chat is Paused, OR
|
|
719
|
+
currentChatState && parsedData.enabled !== currentChatState.enabled) // current Chat state is different from previous state
|
|
720
|
+
) {
|
|
721
|
+
dispatch((0, _actions.addNotification)({
|
|
722
|
+
id: `chat-state-enabled-${Math.random().toString(16).slice(2)}`,
|
|
723
|
+
icon: parsedData.enabled ? 'chat-on' : 'chat-off',
|
|
724
|
+
type: _types2.NotificationTypes.INFO,
|
|
725
|
+
title: `Chat ${parsedData.enabled ? 'Resumed' : 'Paused'}`,
|
|
726
|
+
message: `Chat ${parsedData.enabled ? 'resumed' : 'paused'} ${parsedData.updatedBy ? `by ${parsedData.updatedBy.userName}` : ''}`
|
|
727
|
+
}));
|
|
728
|
+
}
|
|
729
|
+
dispatch((0, _actions.setChatState)(parsedData));
|
|
730
|
+
});
|
|
731
|
+
} catch (error) {
|
|
732
|
+
dispatch((0, _actions.setChatState)(null));
|
|
733
|
+
}
|
|
680
734
|
};
|
|
681
735
|
|
|
682
|
-
// Handle '
|
|
683
|
-
const
|
|
684
|
-
|
|
736
|
+
// Handle 'chatPeerBlacklist' key values
|
|
737
|
+
const handleChatPeerBlacklistChange = data => {
|
|
738
|
+
// Whenever list changes :
|
|
739
|
+
// - check if local peer is blocked or unblocked
|
|
740
|
+
// - filter out messages of blocked peers
|
|
741
|
+
if (Array.isArray(data)) {
|
|
742
|
+
(0, _reactRedux.batch)(() => {
|
|
743
|
+
dispatch((0, _actions.setChatPeerBlacklist)(data));
|
|
744
|
+
dispatch((0, _actions.filterOutMsgsFromBlockedPeers)(data));
|
|
745
|
+
});
|
|
746
|
+
}
|
|
685
747
|
};
|
|
686
748
|
|
|
687
749
|
// Getting value for 'spotlight' key by using `get` method on HMSSessionStore instance
|
|
@@ -690,20 +752,32 @@ const useHMSSessionStoreListeners = gridViewRef => {
|
|
|
690
752
|
handleSpotlightIdChange(data);
|
|
691
753
|
}).catch(error => console.log('Session Store get `spotlight` key value error: ', error));
|
|
692
754
|
|
|
693
|
-
// Getting value for '
|
|
694
|
-
hmsSessionStore.get('
|
|
695
|
-
console.log('Session Store get `
|
|
696
|
-
|
|
697
|
-
}).catch(error => console.log('Session Store get `
|
|
755
|
+
// Getting value for 'pinnedMessages' key by using `get` method on HMSSessionStore instance
|
|
756
|
+
hmsSessionStore.get('pinnedMessages').then(data => {
|
|
757
|
+
console.log('Session Store get `pinnedMessages` key value success: ', data);
|
|
758
|
+
handlePinnedMessagesChange(data);
|
|
759
|
+
}).catch(error => console.log('Session Store get `pinnedMessages` key value error: ', error));
|
|
760
|
+
|
|
761
|
+
// Getting value for 'chatState' key by using `get` method on HMSSessionStore instance
|
|
762
|
+
hmsSessionStore.get('chatState').then(data => {
|
|
763
|
+
console.log('Session Store get `chatState` key value success: ', data);
|
|
764
|
+
handleChatStateChange(data);
|
|
765
|
+
}).catch(error => console.log('Session Store get `chatState` key value error: ', error));
|
|
766
|
+
|
|
767
|
+
// Getting value for 'chatPeerBlacklist' key by using `get` method on HMSSessionStore instance
|
|
768
|
+
hmsSessionStore.get('chatPeerBlacklist').then(data => {
|
|
769
|
+
console.log('Session Store get `chatPeerBlacklist` key value success: ', data);
|
|
770
|
+
handleChatPeerBlacklistChange(data);
|
|
771
|
+
}).catch(error => console.log('Session Store get `chatPeerBlacklist` key value error: ', error));
|
|
698
772
|
|
|
699
773
|
// let lastSpotlightValue: HMSSessionStoreValue = null;
|
|
700
774
|
// let lastPinnedMessageValue: HMSSessionStoreValue = null;
|
|
701
775
|
|
|
702
|
-
// Add subscription for `spotlight` & `
|
|
703
|
-
const subscription = hmsSessionStore.addKeyChangeListener(['spotlight', '
|
|
776
|
+
// Add subscription for `spotlight`, `pinnedMessages`, `chatState` & `chatPeerBlacklist` keys updates on Session Store
|
|
777
|
+
const subscription = hmsSessionStore.addKeyChangeListener(['spotlight', 'pinnedMessages', 'chatState', 'chatPeerBlacklist'], (error, data) => {
|
|
704
778
|
// If error occurs, handle error and return early
|
|
705
779
|
if (error !== null) {
|
|
706
|
-
console.log('`spotlight` & `
|
|
780
|
+
console.log('`spotlight`, `pinnedMessages`, `chatState` & `chatPeerBlacklist` key listener Error -> ', error);
|
|
707
781
|
return;
|
|
708
782
|
}
|
|
709
783
|
|
|
@@ -713,44 +787,21 @@ const useHMSSessionStoreListeners = gridViewRef => {
|
|
|
713
787
|
case 'spotlight':
|
|
714
788
|
{
|
|
715
789
|
handleSpotlightIdChange(data.value);
|
|
716
|
-
|
|
717
|
-
// Showing Toast message if value has actually changed
|
|
718
|
-
// if (
|
|
719
|
-
// data.value !== lastSpotlightValue &&
|
|
720
|
-
// (data.value || lastSpotlightValue)
|
|
721
|
-
// ) {
|
|
722
|
-
// Toast.showWithGravity(
|
|
723
|
-
// `SessionStore: \`spotlight\` key's value changed to ${data.value}`,
|
|
724
|
-
// Toast.LONG,
|
|
725
|
-
// Toast.TOP
|
|
726
|
-
// );
|
|
727
|
-
// }
|
|
728
|
-
|
|
729
|
-
// lastSpotlightValue = data.value;
|
|
730
790
|
break;
|
|
731
791
|
}
|
|
732
|
-
case '
|
|
792
|
+
case 'pinnedMessages':
|
|
733
793
|
{
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
// Toast.showWithGravity(
|
|
746
|
-
// `SessionStore: \`pinnedMessage\` key's value changed to ${data.value}`,
|
|
747
|
-
// Toast.LONG,
|
|
748
|
-
// Toast.TOP
|
|
749
|
-
// );
|
|
750
|
-
// }, 1500);
|
|
751
|
-
// }
|
|
752
|
-
|
|
753
|
-
// lastPinnedMessageValue = data.value;
|
|
794
|
+
handlePinnedMessagesChange(data.value);
|
|
795
|
+
break;
|
|
796
|
+
}
|
|
797
|
+
case 'chatState':
|
|
798
|
+
{
|
|
799
|
+
handleChatStateChange(data.value);
|
|
800
|
+
break;
|
|
801
|
+
}
|
|
802
|
+
case 'chatPeerBlacklist':
|
|
803
|
+
{
|
|
804
|
+
handleChatPeerBlacklistChange(data.value);
|
|
754
805
|
break;
|
|
755
806
|
}
|
|
756
807
|
}
|
|
@@ -768,7 +819,7 @@ const useHMSSessionStoreListeners = gridViewRef => {
|
|
|
768
819
|
// if (toastTimeoutId !== null) clearTimeout(toastTimeoutId);
|
|
769
820
|
};
|
|
770
821
|
}
|
|
771
|
-
}, [hmsSessionStore]);
|
|
822
|
+
}, [store, hmsSessionStore]);
|
|
772
823
|
};
|
|
773
824
|
exports.useHMSSessionStoreListeners = useHMSSessionStoreListeners;
|
|
774
825
|
const useHMSSessionStore = () => {
|
|
@@ -1555,7 +1606,7 @@ const useSendMessage = () => {
|
|
|
1555
1606
|
const chatWindowState = reduxStore.getState().chatWindow;
|
|
1556
1607
|
const message = chatWindowState.typedMessage;
|
|
1557
1608
|
const sendingTo = chatWindowState.sendTo;
|
|
1558
|
-
if (message.length <= 0) return;
|
|
1609
|
+
if (message.length <= 0 || !sendingTo) return;
|
|
1559
1610
|
const hmsMessageRecipient = new _reactNativeHms.HMSMessageRecipient({
|
|
1560
1611
|
recipientType: 'publishSettings' in sendingTo ? _reactNativeHms.HMSMessageRecipientType.ROLES : 'peerID' in sendingTo ? _reactNativeHms.HMSMessageRecipientType.PEER : _reactNativeHms.HMSMessageRecipientType.BROADCAST,
|
|
1561
1612
|
recipientPeer: 'peerID' in sendingTo ? sendingTo : undefined,
|
|
@@ -1608,6 +1659,45 @@ const useSendMessage = () => {
|
|
|
1608
1659
|
};
|
|
1609
1660
|
};
|
|
1610
1661
|
exports.useSendMessage = useSendMessage;
|
|
1662
|
+
const useHMSCanDisableChat = () => {
|
|
1663
|
+
return useHMSChatLayoutConfig(chatLayoutConfig => {
|
|
1664
|
+
var _chatLayoutConfig$rea;
|
|
1665
|
+
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;
|
|
1666
|
+
});
|
|
1667
|
+
};
|
|
1668
|
+
exports.useHMSCanDisableChat = useHMSCanDisableChat;
|
|
1669
|
+
const useHMSChatRecipientSelector = () => {
|
|
1670
|
+
const roles = (0, _reactRedux.useSelector)(state => state.hmsStates.roles);
|
|
1671
|
+
const defaultChatRecipient = (0, _react.useMemo)(() => ({
|
|
1672
|
+
privateChat: false,
|
|
1673
|
+
publicChat: false,
|
|
1674
|
+
roles: []
|
|
1675
|
+
}), []);
|
|
1676
|
+
const chatLayoutConfig = useHMSChatLayoutConfig(_chatLayoutConfig => _chatLayoutConfig);
|
|
1677
|
+
const rolesWhitelist = chatLayoutConfig === null || chatLayoutConfig === void 0 ? void 0 : chatLayoutConfig.roles_whitelist;
|
|
1678
|
+
const whitelistedRoles = (0, _react.useMemo)(() => {
|
|
1679
|
+
if (!rolesWhitelist) {
|
|
1680
|
+
return defaultChatRecipient.roles;
|
|
1681
|
+
}
|
|
1682
|
+
return rolesWhitelist.map(roleStr => roles.find(role => role.name === roleStr)).filter(role => !!role);
|
|
1683
|
+
}, [roles, rolesWhitelist, defaultChatRecipient]);
|
|
1684
|
+
const privateChat = (chatLayoutConfig === null || chatLayoutConfig === void 0 ? void 0 : chatLayoutConfig.private_chat_enabled) ?? defaultChatRecipient.privateChat;
|
|
1685
|
+
const publicChat = (chatLayoutConfig === null || chatLayoutConfig === void 0 ? void 0 : chatLayoutConfig.public_chat_enabled) ?? defaultChatRecipient.publicChat;
|
|
1686
|
+
if (chatLayoutConfig) {
|
|
1687
|
+
return {
|
|
1688
|
+
privateChat,
|
|
1689
|
+
publicChat,
|
|
1690
|
+
roles: whitelistedRoles
|
|
1691
|
+
};
|
|
1692
|
+
}
|
|
1693
|
+
return defaultChatRecipient;
|
|
1694
|
+
};
|
|
1695
|
+
exports.useHMSChatRecipientSelector = useHMSChatRecipientSelector;
|
|
1696
|
+
const useIsAllowedToSendMessage = () => {
|
|
1697
|
+
const chatRecipients = useHMSChatRecipientSelector();
|
|
1698
|
+
return chatRecipients.privateChat || chatRecipients.publicChat || chatRecipients.roles.length > 0;
|
|
1699
|
+
};
|
|
1700
|
+
exports.useIsAllowedToSendMessage = useIsAllowedToSendMessage;
|
|
1611
1701
|
const useHMSChatLayoutConfig = (selector, equalityFn) => {
|
|
1612
1702
|
return useHMSLayoutConfig(layoutConfig => {
|
|
1613
1703
|
const chatConfig = (0, _hooksUtilSelectors.selectChatLayoutConfig)(layoutConfig);
|
|
@@ -1664,11 +1754,15 @@ const useSavePropsToStore = (props, dispatch) => {
|
|
|
1664
1754
|
handleBackButton,
|
|
1665
1755
|
autoEnterPipMode
|
|
1666
1756
|
} = props;
|
|
1757
|
+
dispatch((0, _actions.setPrebuiltData)({
|
|
1758
|
+
roomCode,
|
|
1759
|
+
options
|
|
1760
|
+
}));
|
|
1667
1761
|
(0, _react.useEffect)(() => {
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
}
|
|
1762
|
+
const passedUserName = options === null || options === void 0 ? void 0 : options.userName;
|
|
1763
|
+
if (passedUserName && passedUserName.length > 0) {
|
|
1764
|
+
dispatch((0, _actions.setEditUsernameDisabled)(true));
|
|
1765
|
+
}
|
|
1672
1766
|
}, [roomCode, options]);
|
|
1673
1767
|
(0, _react.useEffect)(() => {
|
|
1674
1768
|
dispatch((0, _actions.setOnLeaveHandler)(onLeave));
|
|
@@ -1698,7 +1792,7 @@ const useStartRecording = () => {
|
|
|
1698
1792
|
dispatch((0, _actions.addNotification)({
|
|
1699
1793
|
id: Math.random().toString(16).slice(2),
|
|
1700
1794
|
type: _types2.NotificationTypes.ERROR,
|
|
1701
|
-
|
|
1795
|
+
title: error.message
|
|
1702
1796
|
}));
|
|
1703
1797
|
});
|
|
1704
1798
|
});
|
|
@@ -1708,6 +1802,156 @@ const useStartRecording = () => {
|
|
|
1708
1802
|
};
|
|
1709
1803
|
};
|
|
1710
1804
|
exports.useStartRecording = useStartRecording;
|
|
1805
|
+
const useHMSChatState = () => {
|
|
1806
|
+
const hmsSessionStore = (0, _reactRedux.useSelector)(state => state.user.hmsSessionStore);
|
|
1807
|
+
const localPeerName = (0, _reactRedux.useSelector)(state => {
|
|
1808
|
+
var _state$hmsStates$loca4;
|
|
1809
|
+
return (_state$hmsStates$loca4 = state.hmsStates.localPeer) === null || _state$hmsStates$loca4 === void 0 ? void 0 : _state$hmsStates$loca4.name;
|
|
1810
|
+
});
|
|
1811
|
+
const localPeerID = (0, _reactRedux.useSelector)(state => {
|
|
1812
|
+
var _state$hmsStates$loca5;
|
|
1813
|
+
return (_state$hmsStates$loca5 = state.hmsStates.localPeer) === null || _state$hmsStates$loca5 === void 0 ? void 0 : _state$hmsStates$loca5.peerID;
|
|
1814
|
+
});
|
|
1815
|
+
const localPeerUserID = (0, _reactRedux.useSelector)(state => {
|
|
1816
|
+
var _state$hmsStates$loca6;
|
|
1817
|
+
return (_state$hmsStates$loca6 = state.hmsStates.localPeer) === null || _state$hmsStates$loca6 === void 0 ? void 0 : _state$hmsStates$loca6.customerUserID;
|
|
1818
|
+
});
|
|
1819
|
+
const _chatState = (0, _reactRedux.useSelector)(state => state.app.chatState);
|
|
1820
|
+
const chatState = (0, _react.useMemo)(() => _chatState || {
|
|
1821
|
+
enabled: true
|
|
1822
|
+
}, [_chatState]);
|
|
1823
|
+
const setChatState = (0, _react.useCallback)(async enabled => {
|
|
1824
|
+
// If instance of HMSSessionStore is available
|
|
1825
|
+
if (hmsSessionStore) {
|
|
1826
|
+
try {
|
|
1827
|
+
const value = {
|
|
1828
|
+
enabled,
|
|
1829
|
+
updatedBy: {
|
|
1830
|
+
peerID: localPeerID ?? null,
|
|
1831
|
+
userID: localPeerUserID ?? null,
|
|
1832
|
+
userName: localPeerName ?? ''
|
|
1833
|
+
},
|
|
1834
|
+
updatedAt: Date.now()
|
|
1835
|
+
};
|
|
1836
|
+
// set `value` on `session` with key 'chatState'
|
|
1837
|
+
const response = await hmsSessionStore.set(value, 'chatState');
|
|
1838
|
+
console.log('setSessionMetaData Response -> ', response);
|
|
1839
|
+
} catch (error) {
|
|
1840
|
+
console.log('setSessionMetaData Error -> ', error);
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
}, [localPeerName, hmsSessionStore, localPeerUserID, localPeerID]);
|
|
1844
|
+
return {
|
|
1845
|
+
chatState,
|
|
1846
|
+
setChatState
|
|
1847
|
+
};
|
|
1848
|
+
};
|
|
1849
|
+
exports.useHMSChatState = useHMSChatState;
|
|
1850
|
+
const useIsMessagePinned = message => {
|
|
1851
|
+
return (0, _reactRedux.useSelector)(state => message ? state.messages.pinnedMessages.findIndex(pinnedMessage => pinnedMessage.id === message.messageId) >= 0 : false);
|
|
1852
|
+
};
|
|
1853
|
+
exports.useIsMessagePinned = useIsMessagePinned;
|
|
1854
|
+
const useHMSMessagePinningActions = () => {
|
|
1855
|
+
const store = (0, _reactRedux.useStore)();
|
|
1856
|
+
const hmsSessionStore = (0, _reactRedux.useSelector)(state => state.user.hmsSessionStore);
|
|
1857
|
+
const pinMessage = (0, _react.useCallback)(async message => {
|
|
1858
|
+
let messages = message;
|
|
1859
|
+
if (!Array.isArray(messages)) {
|
|
1860
|
+
messages = [messages];
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
// If instance of HMSSessionStore is available
|
|
1864
|
+
if (hmsSessionStore) {
|
|
1865
|
+
try {
|
|
1866
|
+
var _reduxState$hmsStates4;
|
|
1867
|
+
const reduxState = store.getState();
|
|
1868
|
+
const localPeerName = (_reduxState$hmsStates4 = reduxState.hmsStates.localPeer) === null || _reduxState$hmsStates4 === void 0 ? void 0 : _reduxState$hmsStates4.name;
|
|
1869
|
+
const pinnedMessages = reduxState.messages.pinnedMessages;
|
|
1870
|
+
let payload = messages.map(message => {
|
|
1871
|
+
var _message$sender2, _message$sender3;
|
|
1872
|
+
return {
|
|
1873
|
+
authorId: ((_message$sender2 = message.sender) === null || _message$sender2 === void 0 ? void 0 : _message$sender2.customerUserID) ?? '',
|
|
1874
|
+
id: message.messageId,
|
|
1875
|
+
pinnedBy: localPeerName ?? '',
|
|
1876
|
+
text: `${(_message$sender3 = message.sender) === null || _message$sender3 === void 0 ? void 0 : _message$sender3.name}: ${message.message}`
|
|
1877
|
+
};
|
|
1878
|
+
});
|
|
1879
|
+
let updatedPinnedMessages = [...pinnedMessages, ...payload];
|
|
1880
|
+
if (updatedPinnedMessages.length > 3) {
|
|
1881
|
+
updatedPinnedMessages = updatedPinnedMessages.slice(updatedPinnedMessages.length - 3);
|
|
1882
|
+
}
|
|
1883
|
+
const response = await hmsSessionStore.set(updatedPinnedMessages, 'pinnedMessages');
|
|
1884
|
+
console.log('setSessionMetaData Response -> ', response);
|
|
1885
|
+
} catch (error) {
|
|
1886
|
+
console.log('setSessionMetaData Error -> ', error);
|
|
1887
|
+
return Promise.reject(error);
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
}, [hmsSessionStore]);
|
|
1891
|
+
const unpinMessage = (0, _react.useCallback)(async message => {
|
|
1892
|
+
let messages = message;
|
|
1893
|
+
if (!Array.isArray(messages)) {
|
|
1894
|
+
messages = [messages];
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
// If instance of HMSSessionStore is available
|
|
1898
|
+
if (hmsSessionStore) {
|
|
1899
|
+
try {
|
|
1900
|
+
const pinnedMessages = store.getState().messages.pinnedMessages;
|
|
1901
|
+
const messageIdsToUnpin = messages.map(msg => 'messageId' in msg ? msg.messageId : msg.id);
|
|
1902
|
+
const updatedPinnedMessages = pinnedMessages.filter(pinnedMessage => !messageIdsToUnpin.includes(pinnedMessage.id));
|
|
1903
|
+
const response = await hmsSessionStore.set(updatedPinnedMessages, 'pinnedMessages');
|
|
1904
|
+
console.log('setSessionMetaData Response -> ', response);
|
|
1905
|
+
} catch (error) {
|
|
1906
|
+
console.log('setSessionMetaData Error -> ', error);
|
|
1907
|
+
return Promise.reject(error);
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
}, [hmsSessionStore]);
|
|
1911
|
+
return {
|
|
1912
|
+
pinMessage,
|
|
1913
|
+
unpinMessage
|
|
1914
|
+
};
|
|
1915
|
+
};
|
|
1916
|
+
exports.useHMSMessagePinningActions = useHMSMessagePinningActions;
|
|
1917
|
+
const useSetDefaultChatRecipient = () => {
|
|
1918
|
+
const dispatch = (0, _reactRedux.useDispatch)();
|
|
1919
|
+
const localPeerRoleName = (0, _reactRedux.useSelector)(state => {
|
|
1920
|
+
var _state$hmsStates$loca7;
|
|
1921
|
+
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;
|
|
1922
|
+
});
|
|
1923
|
+
const {
|
|
1924
|
+
privateChat,
|
|
1925
|
+
publicChat,
|
|
1926
|
+
roles: whitelistedRoles
|
|
1927
|
+
} = useHMSChatRecipientSelector();
|
|
1928
|
+
(0, _react.useEffect)(() => {
|
|
1929
|
+
if (publicChat) {
|
|
1930
|
+
dispatch({
|
|
1931
|
+
type: 'SET_SENDTO',
|
|
1932
|
+
sendTo: _types.ChatBroadcastFilter
|
|
1933
|
+
});
|
|
1934
|
+
}
|
|
1935
|
+
// If Role is enabled, Select a role
|
|
1936
|
+
else if (Array.isArray(whitelistedRoles) && whitelistedRoles.length > 0) {
|
|
1937
|
+
const roleObj = whitelistedRoles.length === 1 ? whitelistedRoles[0] : whitelistedRoles.filter(whitelistRole => whitelistRole.name !== localPeerRoleName)[0];
|
|
1938
|
+
if (roleObj) {
|
|
1939
|
+
dispatch({
|
|
1940
|
+
type: 'SET_SENDTO',
|
|
1941
|
+
sendTo: roleObj
|
|
1942
|
+
});
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
// If private is enabled, Select None
|
|
1946
|
+
else if (privateChat) {
|
|
1947
|
+
dispatch({
|
|
1948
|
+
type: 'SET_SENDTO',
|
|
1949
|
+
sendTo: null
|
|
1950
|
+
});
|
|
1951
|
+
}
|
|
1952
|
+
}, [privateChat, publicChat, whitelistedRoles, localPeerRoleName, dispatch]);
|
|
1953
|
+
};
|
|
1954
|
+
exports.useSetDefaultChatRecipient = useSetDefaultChatRecipient;
|
|
1711
1955
|
const useAndroidSoftInputAdjustResize = () => {
|
|
1712
1956
|
const currentSoftInputRef = (0, _react.useRef)(null);
|
|
1713
1957
|
(0, _react.useEffect)(() => {
|
|
@@ -1727,4 +1971,137 @@ const useAndroidSoftInputAdjustResize = () => {
|
|
|
1727
1971
|
}, []);
|
|
1728
1972
|
};
|
|
1729
1973
|
exports.useAndroidSoftInputAdjustResize = useAndroidSoftInputAdjustResize;
|
|
1974
|
+
const useKeyboardState = () => {
|
|
1975
|
+
const keyboardState = (0, _reactNativeReanimated.useSharedValue)(_reactNativeReanimated.KeyboardState.UNKNOWN);
|
|
1976
|
+
(0, _react.useEffect)(() => {
|
|
1977
|
+
let didShowTimeoutId = null;
|
|
1978
|
+
let didHideTimeoutId = null;
|
|
1979
|
+
const didShowSubscription = _reactNative.Keyboard.addListener('keyboardDidShow', () => {
|
|
1980
|
+
keyboardState.value = _reactNativeReanimated.KeyboardState.OPENING;
|
|
1981
|
+
if (didShowTimeoutId !== null) {
|
|
1982
|
+
clearTimeout(didShowTimeoutId);
|
|
1983
|
+
}
|
|
1984
|
+
didShowTimeoutId = setTimeout(() => {
|
|
1985
|
+
keyboardState.value = _reactNativeReanimated.KeyboardState.OPEN;
|
|
1986
|
+
didShowTimeoutId = null;
|
|
1987
|
+
}, 400);
|
|
1988
|
+
});
|
|
1989
|
+
const didHideSubscription = _reactNative.Keyboard.addListener('keyboardDidHide', () => {
|
|
1990
|
+
keyboardState.value = _reactNativeReanimated.KeyboardState.CLOSING;
|
|
1991
|
+
if (didHideTimeoutId !== null) {
|
|
1992
|
+
clearTimeout(didHideTimeoutId);
|
|
1993
|
+
}
|
|
1994
|
+
didHideTimeoutId = setTimeout(() => {
|
|
1995
|
+
keyboardState.value = _reactNativeReanimated.KeyboardState.CLOSED;
|
|
1996
|
+
didHideTimeoutId = null;
|
|
1997
|
+
}, 400);
|
|
1998
|
+
});
|
|
1999
|
+
return () => {
|
|
2000
|
+
if (didShowTimeoutId !== null) {
|
|
2001
|
+
clearTimeout(didShowTimeoutId);
|
|
2002
|
+
}
|
|
2003
|
+
if (didHideTimeoutId !== null) {
|
|
2004
|
+
clearTimeout(didHideTimeoutId);
|
|
2005
|
+
}
|
|
2006
|
+
if ('remove' in didShowSubscription) {
|
|
2007
|
+
didShowSubscription.remove();
|
|
2008
|
+
} else {
|
|
2009
|
+
_reactNative.Keyboard.removeSubscription(didShowSubscription);
|
|
2010
|
+
}
|
|
2011
|
+
if ('remove' in didHideSubscription) {
|
|
2012
|
+
didHideSubscription.remove();
|
|
2013
|
+
} else {
|
|
2014
|
+
_reactNative.Keyboard.removeSubscription(didHideSubscription);
|
|
2015
|
+
}
|
|
2016
|
+
};
|
|
2017
|
+
}, []);
|
|
2018
|
+
return {
|
|
2019
|
+
keyboardState
|
|
2020
|
+
};
|
|
2021
|
+
};
|
|
2022
|
+
exports.useKeyboardState = useKeyboardState;
|
|
2023
|
+
const useAllowPinningMessage = () => {
|
|
2024
|
+
return useHMSChatLayoutConfig(config => (config === null || config === void 0 ? void 0 : config.allow_pinning_messages) ?? false);
|
|
2025
|
+
};
|
|
2026
|
+
exports.useAllowPinningMessage = useAllowPinningMessage;
|
|
2027
|
+
const useIsLocalPeerBlockedFromChat = () => {
|
|
2028
|
+
return (0, _reactRedux.useSelector)(state => {
|
|
2029
|
+
var _state$hmsStates$loca8;
|
|
2030
|
+
const chatPeerBlacklist = state.app.chatPeerBlacklist;
|
|
2031
|
+
const localPeerUserId = (_state$hmsStates$loca8 = state.hmsStates.localPeer) === null || _state$hmsStates$loca8 === void 0 ? void 0 : _state$hmsStates$loca8.customerUserID;
|
|
2032
|
+
return localPeerUserId ? chatPeerBlacklist.includes(localPeerUserId) : false;
|
|
2033
|
+
});
|
|
2034
|
+
};
|
|
2035
|
+
exports.useIsLocalPeerBlockedFromChat = useIsLocalPeerBlockedFromChat;
|
|
2036
|
+
const useIsPeerBlocked = peer => {
|
|
2037
|
+
return (0, _reactRedux.useSelector)(state => {
|
|
2038
|
+
const chatPeerBlacklist = state.app.chatPeerBlacklist;
|
|
2039
|
+
const localPeerUserId = peer === null || peer === void 0 ? void 0 : peer.customerUserID;
|
|
2040
|
+
return localPeerUserId ? chatPeerBlacklist.includes(localPeerUserId) : false;
|
|
2041
|
+
});
|
|
2042
|
+
};
|
|
2043
|
+
exports.useIsPeerBlocked = useIsPeerBlocked;
|
|
2044
|
+
const useBlockPeerActions = () => {
|
|
2045
|
+
const store = (0, _reactRedux.useStore)();
|
|
2046
|
+
const hmsSessionStore = (0, _reactRedux.useSelector)(state => state.user.hmsSessionStore);
|
|
2047
|
+
const {
|
|
2048
|
+
unpinMessage
|
|
2049
|
+
} = useHMSMessagePinningActions();
|
|
2050
|
+
const blockPeer = (0, _react.useCallback)(async peer => {
|
|
2051
|
+
// If instance of HMSSessionStore is available
|
|
2052
|
+
if (hmsSessionStore) {
|
|
2053
|
+
try {
|
|
2054
|
+
const reduxState = store.getState();
|
|
2055
|
+
const chatPeerBlacklist = reduxState.app.chatPeerBlacklist;
|
|
2056
|
+
const pinnedMessages = reduxState.messages.pinnedMessages;
|
|
2057
|
+
if (peer.customerUserID && !chatPeerBlacklist.includes(peer.customerUserID)) {
|
|
2058
|
+
let updatedChatPeerBlacklist = [...chatPeerBlacklist, peer.customerUserID];
|
|
2059
|
+
const response = await hmsSessionStore.set(updatedChatPeerBlacklist, 'chatPeerBlacklist');
|
|
2060
|
+
console.log('setSessionMetaData Response -> ', response);
|
|
2061
|
+
|
|
2062
|
+
// Unpin messages from sent by the peer
|
|
2063
|
+
const msgsToUnpin = pinnedMessages.filter(pinnedMessage => pinnedMessage.authorId === peer.customerUserID);
|
|
2064
|
+
if (msgsToUnpin.length > 0) {
|
|
2065
|
+
await unpinMessage(msgsToUnpin);
|
|
2066
|
+
}
|
|
2067
|
+
return response;
|
|
2068
|
+
}
|
|
2069
|
+
return Promise.reject('Peer is already blocked!');
|
|
2070
|
+
} catch (error) {
|
|
2071
|
+
console.log('setSessionMetaData Error -> ', error);
|
|
2072
|
+
return Promise.reject(error);
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
}, [hmsSessionStore, unpinMessage]);
|
|
2076
|
+
const unblockPeer = (0, _react.useCallback)(async peer => {
|
|
2077
|
+
// If instance of HMSSessionStore is available
|
|
2078
|
+
if (hmsSessionStore) {
|
|
2079
|
+
try {
|
|
2080
|
+
const chatPeerBlacklist = store.getState().app.chatPeerBlacklist;
|
|
2081
|
+
if (peer.customerUserID && chatPeerBlacklist.includes(peer.customerUserID)) {
|
|
2082
|
+
const updatedChatPeerBlacklist = chatPeerBlacklist.filter(peerUserId => peerUserId !== peer.customerUserID);
|
|
2083
|
+
const response = await hmsSessionStore.set(updatedChatPeerBlacklist, 'chatPeerBlacklist');
|
|
2084
|
+
console.log('setSessionMetaData Response -> ', response);
|
|
2085
|
+
return response;
|
|
2086
|
+
}
|
|
2087
|
+
return Promise.reject('Peer is already unblocked!');
|
|
2088
|
+
} catch (error) {
|
|
2089
|
+
console.log('setSessionMetaData Error -> ', error);
|
|
2090
|
+
return Promise.reject(error);
|
|
2091
|
+
}
|
|
2092
|
+
}
|
|
2093
|
+
}, [hmsSessionStore]);
|
|
2094
|
+
return {
|
|
2095
|
+
blockPeer,
|
|
2096
|
+
unblockPeer
|
|
2097
|
+
};
|
|
2098
|
+
};
|
|
2099
|
+
exports.useBlockPeerActions = useBlockPeerActions;
|
|
2100
|
+
const useAllowBlockingPeerFromChat = () => {
|
|
2101
|
+
return useHMSChatLayoutConfig(config => {
|
|
2102
|
+
var _config$real_time_con;
|
|
2103
|
+
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;
|
|
2104
|
+
});
|
|
2105
|
+
};
|
|
2106
|
+
exports.useAllowBlockingPeerFromChat = useAllowBlockingPeerFromChat;
|
|
1730
2107
|
//# sourceMappingURL=hooks-util.js.map
|