@ethora/chat-component-rn 26.10.9 → 26.10.11
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/CHANGELOG.md +17 -0
- package/README.md +126 -1
- package/lib/commonjs/booking/index.js +44 -0
- package/lib/commonjs/booking/index.js.map +1 -0
- package/lib/commonjs/booking/pendingScheduledCall.js +275 -0
- package/lib/commonjs/booking/pendingScheduledCall.js.map +1 -0
- package/lib/commonjs/booking/scheduleForm.js +91 -0
- package/lib/commonjs/booking/scheduleForm.js.map +1 -0
- package/lib/commonjs/booking/scheduledCall.js +141 -0
- package/lib/commonjs/booking/scheduledCall.js.map +1 -0
- package/lib/commonjs/booking/scheduledCallActions.js +128 -0
- package/lib/commonjs/booking/scheduledCallActions.js.map +1 -0
- package/lib/commonjs/booking/scheduledCallLink.js +143 -0
- package/lib/commonjs/booking/scheduledCallLink.js.map +1 -0
- package/lib/commonjs/booking/scheduledCallStore.js +64 -0
- package/lib/commonjs/booking/scheduledCallStore.js.map +1 -0
- package/lib/commonjs/booking/startRoomCall.js +84 -0
- package/lib/commonjs/booking/startRoomCall.js.map +1 -0
- package/lib/commonjs/calls/callBusy.js +18 -0
- package/lib/commonjs/calls/callBusy.js.map +1 -0
- package/lib/commonjs/calls/callDisplay.js +73 -0
- package/lib/commonjs/calls/callDisplay.js.map +1 -0
- package/lib/commonjs/calls/callMode.js +175 -0
- package/lib/commonjs/calls/callMode.js.map +1 -0
- package/lib/commonjs/calls/declineReport.js +20 -0
- package/lib/commonjs/calls/declineReport.js.map +1 -0
- package/lib/commonjs/calls/p2p/P2PCallController.js +724 -0
- package/lib/commonjs/calls/p2p/P2PCallController.js.map +1 -0
- package/lib/commonjs/calls/p2p/icePolicy.js +107 -0
- package/lib/commonjs/calls/p2p/icePolicy.js.map +1 -0
- package/lib/commonjs/calls/p2p/negotiator.js +202 -0
- package/lib/commonjs/calls/p2p/negotiator.js.map +1 -0
- package/lib/commonjs/calls/p2p/p2pRuntime.js +147 -0
- package/lib/commonjs/calls/p2p/p2pRuntime.js.map +1 -0
- package/lib/commonjs/calls/p2p/signalInbox.js +98 -0
- package/lib/commonjs/calls/p2p/signalInbox.js.map +1 -0
- package/lib/commonjs/calls/p2p/signalStanza.js +141 -0
- package/lib/commonjs/calls/p2p/signalStanza.js.map +1 -0
- package/lib/commonjs/calls/p2p/webrtcRuntime.js +53 -0
- package/lib/commonjs/calls/p2p/webrtcRuntime.js.map +1 -0
- package/lib/commonjs/calls/senderTrust.js +43 -0
- package/lib/commonjs/calls/senderTrust.js.map +1 -0
- package/lib/commonjs/calls/startCall.js +51 -0
- package/lib/commonjs/calls/startCall.js.map +1 -0
- package/lib/commonjs/components/Booking/BookingIcons.js +55 -0
- package/lib/commonjs/components/Booking/BookingIcons.js.map +1 -0
- package/lib/commonjs/components/Booking/ScheduleCallButton.js +64 -0
- package/lib/commonjs/components/Booking/ScheduleCallButton.js.map +1 -0
- package/lib/commonjs/components/Booking/ScheduleCallSheet.js +351 -0
- package/lib/commonjs/components/Booking/ScheduleCallSheet.js.map +1 -0
- package/lib/commonjs/components/Booking/ScheduledCallCard.js +203 -0
- package/lib/commonjs/components/Booking/ScheduledCallCard.js.map +1 -0
- package/lib/commonjs/components/Booking/ScheduledCallHost.js +23 -0
- package/lib/commonjs/components/Booking/ScheduledCallHost.js.map +1 -0
- package/lib/commonjs/components/Booking/ScheduledCallMessage.js +55 -0
- package/lib/commonjs/components/Booking/ScheduledCallMessage.js.map +1 -0
- package/lib/commonjs/components/Booking/ScheduledCallPreJoin.js +235 -0
- package/lib/commonjs/components/Booking/ScheduledCallPreJoin.js.map +1 -0
- package/lib/commonjs/components/Booking/bookingShared.js +305 -0
- package/lib/commonjs/components/Booking/bookingShared.js.map +1 -0
- package/lib/commonjs/components/MainComponents/AlbumGrid.js +6 -2
- package/lib/commonjs/components/MainComponents/AlbumGrid.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatHeader.js +18 -12
- package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/commonjs/components/MainComponents/LanguageSelectorButton.js +5 -2
- package/lib/commonjs/components/MainComponents/LanguageSelectorButton.js.map +1 -1
- package/lib/commonjs/components/MainComponents/LanguageSelectorModal.js +6 -3
- package/lib/commonjs/components/MainComponents/LanguageSelectorModal.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MediaMessage.js +13 -0
- package/lib/commonjs/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageContainer.js +13 -0
- package/lib/commonjs/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ReduxWrapper.js +10 -0
- package/lib/commonjs/components/MainComponents/ReduxWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/RoomList.js +7 -16
- package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/Message.js +27 -1
- package/lib/commonjs/components/MessageBubble/Message.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatMediaGrid.js +159 -0
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatMediaGrid.js.map +1 -0
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +203 -134
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/LeaveChatModal.js +180 -0
- package/lib/commonjs/components/Modals/ChatProfileModal/LeaveChatModal.js.map +1 -0
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js +19 -15
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -1
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +100 -162
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/commonjs/components/Modals/FilePreviewModal/MediaViewer.js +824 -0
- package/lib/commonjs/components/Modals/FilePreviewModal/MediaViewer.js.map +1 -0
- package/lib/commonjs/components/Modals/FilePreviewModal/useSaveFile.js +179 -0
- package/lib/commonjs/components/Modals/FilePreviewModal/useSaveFile.js.map +1 -0
- package/lib/commonjs/components/Modals/MessageSearchModal/MessageSearchModal.js +22 -5
- package/lib/commonjs/components/Modals/MessageSearchModal/MessageSearchModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +15 -8
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserSettingsModal/LanguageCard.js +1 -1
- package/lib/commonjs/components/Modals/UserSettingsModal/LanguageCard.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/ActiveCallBar.js +3 -2
- package/lib/commonjs/components/VideoCalls/ActiveCallBar.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/CallButtons.js +19 -11
- package/lib/commonjs/components/VideoCalls/CallButtons.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/CallControlBar.js +119 -0
- package/lib/commonjs/components/VideoCalls/CallControlBar.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/CallVideo.js +49 -0
- package/lib/commonjs/components/VideoCalls/CallVideo.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/GroupCallView.js +281 -0
- package/lib/commonjs/components/VideoCalls/GroupCallView.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/P2PCallRunner.js +151 -0
- package/lib/commonjs/components/VideoCalls/P2PCallRunner.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js +38 -14
- package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/VideoCallSession.js +57 -128
- package/lib/commonjs/components/VideoCalls/VideoCallSession.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/callActions.js +3 -0
- package/lib/commonjs/components/VideoCalls/callActions.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/callElapsed.js +38 -0
- package/lib/commonjs/components/VideoCalls/callElapsed.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/callLive.js +15 -0
- package/lib/commonjs/components/VideoCalls/callLive.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/callSessionController.js +81 -24
- package/lib/commonjs/components/VideoCalls/callSessionController.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/callSessionTypes.js +41 -0
- package/lib/commonjs/components/VideoCalls/callSessionTypes.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/groupLayout.js +43 -0
- package/lib/commonjs/components/VideoCalls/groupLayout.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/p2pCallSession.js +272 -0
- package/lib/commonjs/components/VideoCalls/p2pCallSession.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/useCallKeep.js +7 -2
- package/lib/commonjs/components/VideoCalls/useCallKeep.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/useOngoingCallNotification.js +2 -1
- package/lib/commonjs/components/VideoCalls/useOngoingCallNotification.js.map +1 -1
- package/lib/commonjs/components/styled/MessageImage.js +4 -1
- package/lib/commonjs/components/styled/MessageImage.js.map +1 -1
- package/lib/commonjs/components/styled/VideoMessage.js +5 -1
- package/lib/commonjs/components/styled/VideoMessage.js.map +1 -1
- package/lib/commonjs/context/MediaSourceContext.js +18 -0
- package/lib/commonjs/context/MediaSourceContext.js.map +1 -0
- package/lib/commonjs/context/xmppProvider.js +2 -1
- package/lib/commonjs/context/xmppProvider.js.map +1 -1
- package/lib/commonjs/helpers/callPush.js +3 -1
- package/lib/commonjs/helpers/callPush.js.map +1 -1
- package/lib/commonjs/helpers/constants/MODAL_COMPONENTS.js +3 -1
- package/lib/commonjs/helpers/constants/MODAL_COMPONENTS.js.map +1 -1
- package/lib/commonjs/helpers/constants/MODAL_TYPES.js +2 -0
- package/lib/commonjs/helpers/constants/MODAL_TYPES.js.map +1 -1
- package/lib/commonjs/helpers/incomingCallFromPush.js +63 -7
- package/lib/commonjs/helpers/incomingCallFromPush.js.map +1 -1
- package/lib/commonjs/helpers/publicChatsEntry.js +8 -6
- package/lib/commonjs/helpers/publicChatsEntry.js.map +1 -1
- package/lib/commonjs/helpers/pushPayload.js +5 -0
- package/lib/commonjs/helpers/pushPayload.js.map +1 -1
- package/lib/commonjs/helpers/reportRoom.js +76 -0
- package/lib/commonjs/helpers/reportRoom.js.map +1 -0
- package/lib/commonjs/helpers/roomMedia.js +118 -0
- package/lib/commonjs/helpers/roomMedia.js.map +1 -0
- package/lib/commonjs/i18n/strings.js +480 -0
- package/lib/commonjs/i18n/strings.js.map +1 -1
- package/lib/commonjs/main.js +93 -0
- package/lib/commonjs/main.js.map +1 -1
- package/lib/commonjs/networking/api-requests/callState.api.js +75 -0
- package/lib/commonjs/networking/api-requests/callState.api.js.map +1 -0
- package/lib/commonjs/networking/api-requests/push.api.js +29 -6
- package/lib/commonjs/networking/api-requests/push.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/rooms.api.js +17 -15
- package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/scheduledCalls.api.js +141 -0
- package/lib/commonjs/networking/api-requests/scheduledCalls.api.js.map +1 -0
- package/lib/commonjs/networking/callTokenStanza.js +210 -50
- package/lib/commonjs/networking/callTokenStanza.js.map +1 -1
- package/lib/commonjs/roomStore/callSlice.js +59 -4
- package/lib/commonjs/roomStore/callSlice.js.map +1 -1
- package/lib/commonjs/services/appBadge.js +80 -0
- package/lib/commonjs/services/appBadge.js.map +1 -0
- package/lib/commonjs/services/languageSettings.js +47 -15
- package/lib/commonjs/services/languageSettings.js.map +1 -1
- package/lib/commonjs/services/pushRegistration.js +21 -5
- package/lib/commonjs/services/pushRegistration.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/booking/index.js +5 -0
- package/lib/module/booking/index.js.map +1 -0
- package/lib/module/booking/pendingScheduledCall.js +261 -0
- package/lib/module/booking/pendingScheduledCall.js.map +1 -0
- package/lib/module/booking/scheduleForm.js +79 -0
- package/lib/module/booking/scheduleForm.js.map +1 -0
- package/lib/module/booking/scheduledCall.js +129 -0
- package/lib/module/booking/scheduledCall.js.map +1 -0
- package/lib/module/booking/scheduledCallActions.js +118 -0
- package/lib/module/booking/scheduledCallActions.js.map +1 -0
- package/lib/module/booking/scheduledCallLink.js +136 -0
- package/lib/module/booking/scheduledCallLink.js.map +1 -0
- package/lib/module/booking/scheduledCallStore.js +60 -0
- package/lib/module/booking/scheduledCallStore.js.map +1 -0
- package/lib/module/booking/startRoomCall.js +80 -0
- package/lib/module/booking/startRoomCall.js.map +1 -0
- package/lib/module/calls/callBusy.js +13 -0
- package/lib/module/calls/callBusy.js.map +1 -0
- package/lib/module/calls/callDisplay.js +65 -0
- package/lib/module/calls/callDisplay.js.map +1 -0
- package/lib/module/calls/callMode.js +168 -0
- package/lib/module/calls/callMode.js.map +1 -0
- package/lib/module/calls/declineReport.js +16 -0
- package/lib/module/calls/declineReport.js.map +1 -0
- package/lib/module/calls/p2p/P2PCallController.js +718 -0
- package/lib/module/calls/p2p/P2PCallController.js.map +1 -0
- package/lib/module/calls/p2p/icePolicy.js +102 -0
- package/lib/module/calls/p2p/icePolicy.js.map +1 -0
- package/lib/module/calls/p2p/negotiator.js +197 -0
- package/lib/module/calls/p2p/negotiator.js.map +1 -0
- package/lib/module/calls/p2p/p2pRuntime.js +137 -0
- package/lib/module/calls/p2p/p2pRuntime.js.map +1 -0
- package/lib/module/calls/p2p/signalInbox.js +93 -0
- package/lib/module/calls/p2p/signalInbox.js.map +1 -0
- package/lib/module/calls/p2p/signalStanza.js +135 -0
- package/lib/module/calls/p2p/signalStanza.js.map +1 -0
- package/lib/module/calls/p2p/webrtcRuntime.js +46 -0
- package/lib/module/calls/p2p/webrtcRuntime.js.map +1 -0
- package/lib/module/calls/senderTrust.js +38 -0
- package/lib/module/calls/senderTrust.js.map +1 -0
- package/lib/module/calls/startCall.js +47 -0
- package/lib/module/calls/startCall.js.map +1 -0
- package/lib/module/components/Booking/BookingIcons.js +48 -0
- package/lib/module/components/Booking/BookingIcons.js.map +1 -0
- package/lib/module/components/Booking/ScheduleCallButton.js +59 -0
- package/lib/module/components/Booking/ScheduleCallButton.js.map +1 -0
- package/lib/module/components/Booking/ScheduleCallSheet.js +345 -0
- package/lib/module/components/Booking/ScheduleCallSheet.js.map +1 -0
- package/lib/module/components/Booking/ScheduledCallCard.js +197 -0
- package/lib/module/components/Booking/ScheduledCallCard.js.map +1 -0
- package/lib/module/components/Booking/ScheduledCallHost.js +18 -0
- package/lib/module/components/Booking/ScheduledCallHost.js.map +1 -0
- package/lib/module/components/Booking/ScheduledCallMessage.js +48 -0
- package/lib/module/components/Booking/ScheduledCallMessage.js.map +1 -0
- package/lib/module/components/Booking/ScheduledCallPreJoin.js +229 -0
- package/lib/module/components/Booking/ScheduledCallPreJoin.js.map +1 -0
- package/lib/module/components/Booking/bookingShared.js +291 -0
- package/lib/module/components/Booking/bookingShared.js.map +1 -0
- package/lib/module/components/MainComponents/AlbumGrid.js +6 -2
- package/lib/module/components/MainComponents/AlbumGrid.js.map +1 -1
- package/lib/module/components/MainComponents/ChatHeader.js +20 -14
- package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/module/components/MainComponents/LanguageSelectorButton.js +5 -2
- package/lib/module/components/MainComponents/LanguageSelectorButton.js.map +1 -1
- package/lib/module/components/MainComponents/LanguageSelectorModal.js +7 -4
- package/lib/module/components/MainComponents/LanguageSelectorModal.js.map +1 -1
- package/lib/module/components/MainComponents/MediaMessage.js +13 -0
- package/lib/module/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/module/components/MainComponents/MessageContainer.js +13 -0
- package/lib/module/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/module/components/MainComponents/ReduxWrapper.js +10 -0
- package/lib/module/components/MainComponents/ReduxWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/RoomList.js +7 -16
- package/lib/module/components/MainComponents/RoomList.js.map +1 -1
- package/lib/module/components/MessageBubble/Message.js +27 -1
- package/lib/module/components/MessageBubble/Message.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ChatMediaGrid.js +154 -0
- package/lib/module/components/Modals/ChatProfileModal/ChatMediaGrid.js.map +1 -0
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +204 -136
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/LeaveChatModal.js +175 -0
- package/lib/module/components/Modals/ChatProfileModal/LeaveChatModal.js.map +1 -0
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js +21 -15
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -1
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +100 -163
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/module/components/Modals/FilePreviewModal/MediaViewer.js +819 -0
- package/lib/module/components/Modals/FilePreviewModal/MediaViewer.js.map +1 -0
- package/lib/module/components/Modals/FilePreviewModal/useSaveFile.js +172 -0
- package/lib/module/components/Modals/FilePreviewModal/useSaveFile.js.map +1 -0
- package/lib/module/components/Modals/MessageSearchModal/MessageSearchModal.js +20 -4
- package/lib/module/components/Modals/MessageSearchModal/MessageSearchModal.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +17 -10
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/module/components/Modals/UserSettingsModal/LanguageCard.js +1 -1
- package/lib/module/components/Modals/UserSettingsModal/LanguageCard.js.map +1 -1
- package/lib/module/components/VideoCalls/ActiveCallBar.js +3 -2
- package/lib/module/components/VideoCalls/ActiveCallBar.js.map +1 -1
- package/lib/module/components/VideoCalls/CallButtons.js +19 -11
- package/lib/module/components/VideoCalls/CallButtons.js.map +1 -1
- package/lib/module/components/VideoCalls/CallControlBar.js +113 -0
- package/lib/module/components/VideoCalls/CallControlBar.js.map +1 -0
- package/lib/module/components/VideoCalls/CallVideo.js +43 -0
- package/lib/module/components/VideoCalls/CallVideo.js.map +1 -0
- package/lib/module/components/VideoCalls/GroupCallView.js +275 -0
- package/lib/module/components/VideoCalls/GroupCallView.js.map +1 -0
- package/lib/module/components/VideoCalls/P2PCallRunner.js +147 -0
- package/lib/module/components/VideoCalls/P2PCallRunner.js.map +1 -0
- package/lib/module/components/VideoCalls/VideoCallOverlay.js +38 -14
- package/lib/module/components/VideoCalls/VideoCallOverlay.js.map +1 -1
- package/lib/module/components/VideoCalls/VideoCallSession.js +46 -127
- package/lib/module/components/VideoCalls/VideoCallSession.js.map +1 -1
- package/lib/module/components/VideoCalls/callActions.js +3 -0
- package/lib/module/components/VideoCalls/callActions.js.map +1 -1
- package/lib/module/components/VideoCalls/callElapsed.js +33 -0
- package/lib/module/components/VideoCalls/callElapsed.js.map +1 -0
- package/lib/module/components/VideoCalls/callLive.js +10 -0
- package/lib/module/components/VideoCalls/callLive.js.map +1 -0
- package/lib/module/components/VideoCalls/callSessionController.js +80 -24
- package/lib/module/components/VideoCalls/callSessionController.js.map +1 -1
- package/lib/module/components/VideoCalls/callSessionTypes.js +37 -0
- package/lib/module/components/VideoCalls/callSessionTypes.js.map +1 -0
- package/lib/module/components/VideoCalls/groupLayout.js +36 -0
- package/lib/module/components/VideoCalls/groupLayout.js.map +1 -0
- package/lib/module/components/VideoCalls/p2pCallSession.js +256 -0
- package/lib/module/components/VideoCalls/p2pCallSession.js.map +1 -0
- package/lib/module/components/VideoCalls/useCallKeep.js +8 -2
- package/lib/module/components/VideoCalls/useCallKeep.js.map +1 -1
- package/lib/module/components/VideoCalls/useOngoingCallNotification.js +2 -1
- package/lib/module/components/VideoCalls/useOngoingCallNotification.js.map +1 -1
- package/lib/module/components/styled/MessageImage.js +4 -1
- package/lib/module/components/styled/MessageImage.js.map +1 -1
- package/lib/module/components/styled/VideoMessage.js +5 -1
- package/lib/module/components/styled/VideoMessage.js.map +1 -1
- package/lib/module/context/MediaSourceContext.js +13 -0
- package/lib/module/context/MediaSourceContext.js.map +1 -0
- package/lib/module/context/xmppProvider.js +2 -1
- package/lib/module/context/xmppProvider.js.map +1 -1
- package/lib/module/helpers/callPush.js +3 -1
- package/lib/module/helpers/callPush.js.map +1 -1
- package/lib/module/helpers/constants/MODAL_COMPONENTS.js +2 -1
- package/lib/module/helpers/constants/MODAL_COMPONENTS.js.map +1 -1
- package/lib/module/helpers/constants/MODAL_TYPES.js +2 -0
- package/lib/module/helpers/constants/MODAL_TYPES.js.map +1 -1
- package/lib/module/helpers/incomingCallFromPush.js +63 -7
- package/lib/module/helpers/incomingCallFromPush.js.map +1 -1
- package/lib/module/helpers/publicChatsEntry.js +8 -6
- package/lib/module/helpers/publicChatsEntry.js.map +1 -1
- package/lib/module/helpers/pushPayload.js +5 -0
- package/lib/module/helpers/pushPayload.js.map +1 -1
- package/lib/module/helpers/reportRoom.js +70 -0
- package/lib/module/helpers/reportRoom.js.map +1 -0
- package/lib/module/helpers/roomMedia.js +112 -0
- package/lib/module/helpers/roomMedia.js.map +1 -0
- package/lib/module/i18n/strings.js +480 -0
- package/lib/module/i18n/strings.js.map +1 -1
- package/lib/module/main.js +5 -0
- package/lib/module/main.js.map +1 -1
- package/lib/module/networking/api-requests/callState.api.js +66 -0
- package/lib/module/networking/api-requests/callState.api.js.map +1 -0
- package/lib/module/networking/api-requests/push.api.js +29 -6
- package/lib/module/networking/api-requests/push.api.js.map +1 -1
- package/lib/module/networking/api-requests/rooms.api.js +17 -15
- package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/module/networking/api-requests/scheduledCalls.api.js +130 -0
- package/lib/module/networking/api-requests/scheduledCalls.api.js.map +1 -0
- package/lib/module/networking/callTokenStanza.js +210 -50
- package/lib/module/networking/callTokenStanza.js.map +1 -1
- package/lib/module/roomStore/callSlice.js +57 -3
- package/lib/module/roomStore/callSlice.js.map +1 -1
- package/lib/module/services/appBadge.js +74 -0
- package/lib/module/services/appBadge.js.map +1 -0
- package/lib/module/services/languageSettings.js +44 -13
- package/lib/module/services/languageSettings.js.map +1 -1
- package/lib/module/services/pushRegistration.js +21 -5
- package/lib/module/services/pushRegistration.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/booking/index.d.ts +3 -0
- package/lib/typescript/booking/index.d.ts.map +1 -0
- package/lib/typescript/booking/pendingScheduledCall.d.ts +80 -0
- package/lib/typescript/booking/pendingScheduledCall.d.ts.map +1 -0
- package/lib/typescript/booking/scheduleForm.d.ts +28 -0
- package/lib/typescript/booking/scheduleForm.d.ts.map +1 -0
- package/lib/typescript/booking/scheduledCall.d.ts +52 -0
- package/lib/typescript/booking/scheduledCall.d.ts.map +1 -0
- package/lib/typescript/booking/scheduledCallActions.d.ts +22 -0
- package/lib/typescript/booking/scheduledCallActions.d.ts.map +1 -0
- package/lib/typescript/booking/scheduledCallLink.d.ts +37 -0
- package/lib/typescript/booking/scheduledCallLink.d.ts.map +1 -0
- package/lib/typescript/booking/scheduledCallStore.d.ts +47 -0
- package/lib/typescript/booking/scheduledCallStore.d.ts.map +1 -0
- package/lib/typescript/booking/startRoomCall.d.ts +12 -0
- package/lib/typescript/booking/startRoomCall.d.ts.map +1 -0
- package/lib/typescript/calls/callBusy.d.ts +9 -0
- package/lib/typescript/calls/callBusy.d.ts.map +1 -0
- package/lib/typescript/calls/callDisplay.d.ts +23 -0
- package/lib/typescript/calls/callDisplay.d.ts.map +1 -0
- package/lib/typescript/calls/callMode.d.ts +106 -0
- package/lib/typescript/calls/callMode.d.ts.map +1 -0
- package/lib/typescript/calls/declineReport.d.ts +11 -0
- package/lib/typescript/calls/declineReport.d.ts.map +1 -0
- package/lib/typescript/calls/p2p/P2PCallController.d.ts +150 -0
- package/lib/typescript/calls/p2p/P2PCallController.d.ts.map +1 -0
- package/lib/typescript/calls/p2p/icePolicy.d.ts +37 -0
- package/lib/typescript/calls/p2p/icePolicy.d.ts.map +1 -0
- package/lib/typescript/calls/p2p/negotiator.d.ts +57 -0
- package/lib/typescript/calls/p2p/negotiator.d.ts.map +1 -0
- package/lib/typescript/calls/p2p/p2pRuntime.d.ts +41 -0
- package/lib/typescript/calls/p2p/p2pRuntime.d.ts.map +1 -0
- package/lib/typescript/calls/p2p/signalInbox.d.ts +35 -0
- package/lib/typescript/calls/p2p/signalInbox.d.ts.map +1 -0
- package/lib/typescript/calls/p2p/signalStanza.d.ts +52 -0
- package/lib/typescript/calls/p2p/signalStanza.d.ts.map +1 -0
- package/lib/typescript/calls/p2p/webrtcRuntime.d.ts +32 -0
- package/lib/typescript/calls/p2p/webrtcRuntime.d.ts.map +1 -0
- package/lib/typescript/calls/senderTrust.d.ts +8 -0
- package/lib/typescript/calls/senderTrust.d.ts.map +1 -0
- package/lib/typescript/calls/startCall.d.ts +17 -0
- package/lib/typescript/calls/startCall.d.ts.map +1 -0
- package/lib/typescript/components/Booking/BookingIcons.d.ts +9 -0
- package/lib/typescript/components/Booking/BookingIcons.d.ts.map +1 -0
- package/lib/typescript/components/Booking/ScheduleCallButton.d.ts +11 -0
- package/lib/typescript/components/Booking/ScheduleCallButton.d.ts.map +1 -0
- package/lib/typescript/components/Booking/ScheduleCallSheet.d.ts +4 -0
- package/lib/typescript/components/Booking/ScheduleCallSheet.d.ts.map +1 -0
- package/lib/typescript/components/Booking/ScheduledCallCard.d.ts +14 -0
- package/lib/typescript/components/Booking/ScheduledCallCard.d.ts.map +1 -0
- package/lib/typescript/components/Booking/ScheduledCallHost.d.ts +10 -0
- package/lib/typescript/components/Booking/ScheduledCallHost.d.ts.map +1 -0
- package/lib/typescript/components/Booking/ScheduledCallMessage.d.ts +20 -0
- package/lib/typescript/components/Booking/ScheduledCallMessage.d.ts.map +1 -0
- package/lib/typescript/components/Booking/ScheduledCallPreJoin.d.ts +8 -0
- package/lib/typescript/components/Booking/ScheduledCallPreJoin.d.ts.map +1 -0
- package/lib/typescript/components/Booking/bookingShared.d.ts +199 -0
- package/lib/typescript/components/Booking/bookingShared.d.ts.map +1 -0
- package/lib/typescript/components/MainComponents/AlbumGrid.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/LanguageSelectorButton.d.ts +3 -1
- package/lib/typescript/components/MainComponents/LanguageSelectorButton.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/LanguageSelectorModal.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MediaMessage.d.ts +3 -1
- package/lib/typescript/components/MainComponents/MediaMessage.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MessageContainer.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ReduxWrapper.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/Message.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ChatMediaGrid.d.ts +16 -0
- package/lib/typescript/components/Modals/ChatProfileModal/ChatMediaGrid.d.ts.map +1 -0
- package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/LeaveChatModal.d.ts +18 -0
- package/lib/typescript/components/Modals/ChatProfileModal/LeaveChatModal.d.ts.map +1 -0
- package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts +16 -0
- package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/FilePreviewModal/MediaViewer.d.ts +27 -0
- package/lib/typescript/components/Modals/FilePreviewModal/MediaViewer.d.ts.map +1 -0
- package/lib/typescript/components/Modals/FilePreviewModal/useSaveFile.d.ts +9 -0
- package/lib/typescript/components/Modals/FilePreviewModal/useSaveFile.d.ts.map +1 -0
- package/lib/typescript/components/Modals/MessageSearchModal/MessageSearchModal.d.ts +8 -0
- package/lib/typescript/components/Modals/MessageSearchModal/MessageSearchModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserSettingsModal/LanguageCard.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/ActiveCallBar.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/CallButtons.d.ts +2 -1
- package/lib/typescript/components/VideoCalls/CallButtons.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/CallControlBar.d.ts +17 -0
- package/lib/typescript/components/VideoCalls/CallControlBar.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/CallVideo.d.ts +23 -0
- package/lib/typescript/components/VideoCalls/CallVideo.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/GroupCallView.d.ts +22 -0
- package/lib/typescript/components/VideoCalls/GroupCallView.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/P2PCallRunner.d.ts +2 -0
- package/lib/typescript/components/VideoCalls/P2PCallRunner.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/VideoCallOverlay.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts +10 -12
- package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/callActions.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/callElapsed.d.ts +8 -0
- package/lib/typescript/components/VideoCalls/callElapsed.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/callLive.d.ts +9 -0
- package/lib/typescript/components/VideoCalls/callLive.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/callSessionController.d.ts +10 -31
- package/lib/typescript/components/VideoCalls/callSessionController.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/callSessionTypes.d.ts +60 -0
- package/lib/typescript/components/VideoCalls/callSessionTypes.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/groupLayout.d.ts +23 -0
- package/lib/typescript/components/VideoCalls/groupLayout.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/p2pCallSession.d.ts +31 -0
- package/lib/typescript/components/VideoCalls/p2pCallSession.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/useCallKeep.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/useOngoingCallNotification.d.ts.map +1 -1
- package/lib/typescript/components/styled/MessageImage.d.ts.map +1 -1
- package/lib/typescript/components/styled/VideoMessage.d.ts.map +1 -1
- package/lib/typescript/context/MediaSourceContext.d.ts +4 -0
- package/lib/typescript/context/MediaSourceContext.d.ts.map +1 -0
- package/lib/typescript/context/xmppProvider.d.ts.map +1 -1
- package/lib/typescript/helpers/callPush.d.ts +11 -1
- package/lib/typescript/helpers/callPush.d.ts.map +1 -1
- package/lib/typescript/helpers/constants/MODAL_COMPONENTS.d.ts.map +1 -1
- package/lib/typescript/helpers/constants/MODAL_TYPES.d.ts +2 -0
- package/lib/typescript/helpers/constants/MODAL_TYPES.d.ts.map +1 -1
- package/lib/typescript/helpers/incomingCallFromPush.d.ts.map +1 -1
- package/lib/typescript/helpers/publicChatsEntry.d.ts +7 -5
- package/lib/typescript/helpers/publicChatsEntry.d.ts.map +1 -1
- package/lib/typescript/helpers/pushPayload.d.ts +1 -1
- package/lib/typescript/helpers/pushPayload.d.ts.map +1 -1
- package/lib/typescript/helpers/reportRoom.d.ts +19 -0
- package/lib/typescript/helpers/reportRoom.d.ts.map +1 -0
- package/lib/typescript/helpers/roomMedia.d.ts +26 -0
- package/lib/typescript/helpers/roomMedia.d.ts.map +1 -0
- package/lib/typescript/i18n/strings.d.ts.map +1 -1
- package/lib/typescript/main.d.ts +6 -1
- package/lib/typescript/main.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/callState.api.d.ts +25 -0
- package/lib/typescript/networking/api-requests/callState.api.d.ts.map +1 -0
- package/lib/typescript/networking/api-requests/push.api.d.ts +9 -2
- package/lib/typescript/networking/api-requests/push.api.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/rooms.api.d.ts +8 -6
- package/lib/typescript/networking/api-requests/rooms.api.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/scheduledCalls.api.d.ts +86 -0
- package/lib/typescript/networking/api-requests/scheduledCalls.api.d.ts.map +1 -0
- package/lib/typescript/networking/callTokenStanza.d.ts.map +1 -1
- package/lib/typescript/roomStore/callSlice.d.ts +23 -1
- package/lib/typescript/roomStore/callSlice.d.ts.map +1 -1
- package/lib/typescript/services/appBadge.d.ts +3 -0
- package/lib/typescript/services/appBadge.d.ts.map +1 -0
- package/lib/typescript/services/languageSettings.d.ts +7 -0
- package/lib/typescript/services/languageSettings.d.ts.map +1 -1
- package/lib/typescript/services/pushRegistration.d.ts.map +1 -1
- package/lib/typescript/types/models/modal.model.d.ts +18 -0
- package/lib/typescript/types/models/modal.model.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +85 -4
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/lib/typescript/version.d.ts.map +1 -1
- package/package.json +9 -2
- package/src/booking/index.ts +10 -0
- package/src/booking/pendingScheduledCall.ts +272 -0
- package/src/booking/scheduleForm.ts +84 -0
- package/src/booking/scheduledCall.ts +163 -0
- package/src/booking/scheduledCallActions.ts +141 -0
- package/src/booking/scheduledCallLink.ts +145 -0
- package/src/booking/scheduledCallStore.ts +69 -0
- package/src/booking/startRoomCall.ts +103 -0
- package/src/calls/callBusy.ts +10 -0
- package/src/calls/callDisplay.ts +74 -0
- package/src/calls/callMode.ts +286 -0
- package/src/calls/declineReport.ts +16 -0
- package/src/calls/p2p/P2PCallController.ts +813 -0
- package/src/calls/p2p/icePolicy.ts +99 -0
- package/src/calls/p2p/negotiator.ts +186 -0
- package/src/calls/p2p/p2pRuntime.ts +164 -0
- package/src/calls/p2p/signalInbox.ts +117 -0
- package/src/calls/p2p/signalStanza.ts +205 -0
- package/src/calls/p2p/webrtcRuntime.ts +60 -0
- package/src/calls/senderTrust.ts +40 -0
- package/src/calls/startCall.ts +56 -0
- package/src/components/Booking/BookingIcons.tsx +44 -0
- package/src/components/Booking/ScheduleCallButton.tsx +66 -0
- package/src/components/Booking/ScheduleCallSheet.tsx +380 -0
- package/src/components/Booking/ScheduledCallCard.tsx +216 -0
- package/src/components/Booking/ScheduledCallHost.tsx +18 -0
- package/src/components/Booking/ScheduledCallMessage.tsx +62 -0
- package/src/components/Booking/ScheduledCallPreJoin.tsx +230 -0
- package/src/components/Booking/bookingShared.tsx +295 -0
- package/src/components/MainComponents/AlbumGrid.tsx +5 -1
- package/src/components/MainComponents/ChatHeader.tsx +18 -11
- package/src/components/MainComponents/LanguageSelectorButton.tsx +9 -2
- package/src/components/MainComponents/LanguageSelectorModal.tsx +10 -6
- package/src/components/MainComponents/MediaMessage.tsx +13 -2
- package/src/components/MainComponents/MessageContainer.tsx +15 -0
- package/src/components/MainComponents/ReduxWrapper.tsx +10 -0
- package/src/components/MainComponents/RoomList.tsx +8 -19
- package/src/components/MessageBubble/Message.tsx +24 -1
- package/src/components/Modals/ChatProfileModal/ChatMediaGrid.tsx +174 -0
- package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +119 -48
- package/src/components/Modals/ChatProfileModal/LeaveChatModal.tsx +191 -0
- package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +22 -22
- package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +115 -185
- package/src/components/Modals/FilePreviewModal/MediaViewer.tsx +880 -0
- package/src/components/Modals/FilePreviewModal/useSaveFile.ts +207 -0
- package/src/components/Modals/MessageSearchModal/MessageSearchModal.tsx +56 -30
- package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +28 -9
- package/src/components/Modals/UserSettingsModal/LanguageCard.tsx +9 -7
- package/src/components/VideoCalls/ActiveCallBar.tsx +6 -5
- package/src/components/VideoCalls/CallButtons.tsx +23 -12
- package/src/components/VideoCalls/CallControlBar.tsx +131 -0
- package/src/components/VideoCalls/CallVideo.tsx +59 -0
- package/src/components/VideoCalls/GroupCallView.tsx +324 -0
- package/src/components/VideoCalls/P2PCallRunner.tsx +192 -0
- package/src/components/VideoCalls/VideoCallOverlay.tsx +62 -17
- package/src/components/VideoCalls/VideoCallSession.tsx +55 -133
- package/src/components/VideoCalls/callActions.ts +3 -0
- package/src/components/VideoCalls/callElapsed.ts +27 -0
- package/src/components/VideoCalls/callLive.ts +13 -0
- package/src/components/VideoCalls/callSessionController.ts +130 -55
- package/src/components/VideoCalls/callSessionTypes.ts +80 -0
- package/src/components/VideoCalls/groupLayout.ts +48 -0
- package/src/components/VideoCalls/p2pCallSession.ts +291 -0
- package/src/components/VideoCalls/useCallKeep.ts +9 -2
- package/src/components/VideoCalls/useOngoingCallNotification.ts +2 -2
- package/src/components/styled/MessageImage.tsx +3 -1
- package/src/components/styled/VideoMessage.tsx +5 -1
- package/src/context/MediaSourceContext.tsx +14 -0
- package/src/context/xmppProvider.tsx +3 -0
- package/src/helpers/callPush.ts +13 -1
- package/src/helpers/constants/MODAL_COMPONENTS.tsx +4 -1
- package/src/helpers/constants/MODAL_TYPES.ts +2 -0
- package/src/helpers/incomingCallFromPush.ts +65 -7
- package/src/helpers/publicChatsEntry.ts +8 -7
- package/src/helpers/pushPayload.ts +9 -1
- package/src/helpers/reportRoom.ts +93 -0
- package/src/helpers/roomMedia.ts +126 -0
- package/src/i18n/strings.ts +480 -0
- package/src/main.ts +33 -0
- package/src/networking/api-requests/callState.api.ts +83 -0
- package/src/networking/api-requests/push.api.ts +28 -3
- package/src/networking/api-requests/rooms.api.ts +25 -15
- package/src/networking/api-requests/scheduledCalls.api.ts +232 -0
- package/src/networking/callTokenStanza.ts +247 -50
- package/src/roomStore/callSlice.ts +86 -2
- package/src/services/appBadge.ts +85 -0
- package/src/services/languageSettings.ts +43 -8
- package/src/services/pushRegistration.ts +34 -3
- package/src/types/models/modal.model.ts +16 -0
- package/src/types/types.ts +86 -4
- package/src/version.ts +1 -1
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.GroupCallView = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
10
|
+
var _ProfileImagePlaceholder = require("../MainComponents/ProfileImagePlaceholder");
|
|
11
|
+
var _CallVideo = require("./CallVideo");
|
|
12
|
+
var _CallControlBar = require("./CallControlBar");
|
|
13
|
+
var _CallIcons = require("./CallIcons");
|
|
14
|
+
var _callSessionController = require("./callSessionController");
|
|
15
|
+
var _groupLayout = require("./groupLayout");
|
|
16
|
+
var _callElapsed = require("./callElapsed");
|
|
17
|
+
var _useT = require("../../i18n/useT");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
|
+
const SURFACE_DARK = '#0B1220';
|
|
21
|
+
const TILE_DARK = '#111827';
|
|
22
|
+
const TEXT_ON_DARK = '#FFFFFF';
|
|
23
|
+
const TEXT_MUTED = 'rgba(255, 255, 255, 0.7)';
|
|
24
|
+
const DANGER = '#E53935';
|
|
25
|
+
const GAP = 8;
|
|
26
|
+
const PAD = 12;
|
|
27
|
+
const ParticipantTile = ({
|
|
28
|
+
participant,
|
|
29
|
+
width,
|
|
30
|
+
height,
|
|
31
|
+
showVideo,
|
|
32
|
+
primaryColor,
|
|
33
|
+
youLabel,
|
|
34
|
+
fallbackName,
|
|
35
|
+
micOffLabel
|
|
36
|
+
}) => {
|
|
37
|
+
const name = participant.isLocal ? youLabel : participant.name || fallbackName;
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
39
|
+
testID: "group-call-tile",
|
|
40
|
+
accessibilityLabel: name,
|
|
41
|
+
style: [styles.tile, {
|
|
42
|
+
width,
|
|
43
|
+
height
|
|
44
|
+
}, participant.speaking ? [styles.tileSpeaking, {
|
|
45
|
+
borderColor: primaryColor
|
|
46
|
+
}] : styles.tileIdle],
|
|
47
|
+
children: [showVideo && participant.video ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CallVideo.CallVideo, {
|
|
48
|
+
source: participant.video,
|
|
49
|
+
style: _reactNative.StyleSheet.absoluteFill,
|
|
50
|
+
objectFit: "cover"
|
|
51
|
+
// Mirror our own camera like every call app.
|
|
52
|
+
,
|
|
53
|
+
mirror: participant.isLocal,
|
|
54
|
+
zOrder: 0
|
|
55
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProfileImagePlaceholder.ProfileImagePlaceholder, {
|
|
56
|
+
name: name,
|
|
57
|
+
size: Math.max(48, Math.min(96, Math.round(width * 0.4)))
|
|
58
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
59
|
+
style: styles.nameTag,
|
|
60
|
+
children: [participant.micMuted && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
61
|
+
accessibilityLabel: micOffLabel,
|
|
62
|
+
style: styles.micOffBadge,
|
|
63
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CallIcons.MicOffIcon, {
|
|
64
|
+
color: TEXT_ON_DARK,
|
|
65
|
+
size: 11
|
|
66
|
+
})
|
|
67
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
68
|
+
style: styles.nameText,
|
|
69
|
+
numberOfLines: 1,
|
|
70
|
+
children: name
|
|
71
|
+
})]
|
|
72
|
+
})]
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The group call screen: everyone in the room as a grid of tiles, the person
|
|
78
|
+
* who is speaking outlined, a mic-off badge on anyone muted. Cameras are drawn
|
|
79
|
+
* for at most MAX_VIDEO_TILES people (speakers first). Nothing here assumes
|
|
80
|
+
* two people; the 1:1 layout stays in VideoCallSession.
|
|
81
|
+
*/
|
|
82
|
+
const GroupCallView = ({
|
|
83
|
+
session,
|
|
84
|
+
kind,
|
|
85
|
+
title,
|
|
86
|
+
primaryColor,
|
|
87
|
+
icons,
|
|
88
|
+
onToggleMinimize,
|
|
89
|
+
onHangup
|
|
90
|
+
}) => {
|
|
91
|
+
const t = (0, _useT.useT)();
|
|
92
|
+
const insets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
|
|
93
|
+
const {
|
|
94
|
+
width,
|
|
95
|
+
height
|
|
96
|
+
} = (0, _reactNative.useWindowDimensions)();
|
|
97
|
+
const elapsed = (0, _callElapsed.useSharedCallElapsed)(session.anchorAt);
|
|
98
|
+
const {
|
|
99
|
+
participants,
|
|
100
|
+
deviceError,
|
|
101
|
+
connected
|
|
102
|
+
} = session;
|
|
103
|
+
const isVideo = kind === 'video';
|
|
104
|
+
const columns = (0, _groupLayout.gridColumns)(participants.length, width > height);
|
|
105
|
+
const tileWidth = Math.floor((width - PAD * 2 - GAP * (columns - 1)) / columns);
|
|
106
|
+
const tileHeight = columns === 1 ? Math.round(tileWidth * 0.75) : Math.round(tileWidth * (isVideo ? 1.15 : 0.85));
|
|
107
|
+
const videoIds = isVideo ? (0, _groupLayout.pickVideoTiles)(participants) : new Set();
|
|
108
|
+
const speaking = (0, _groupLayout.speakingNames)(participants, t('call.participant.you'));
|
|
109
|
+
const countLabel = t('call.status.participants', {
|
|
110
|
+
count: participants.length
|
|
111
|
+
});
|
|
112
|
+
const status = elapsed !== null ? `${countLabel} · ${(0, _callElapsed.formatCallDuration)(elapsed)}` : !connected ? t('call.status.connecting') : t('call.status.waitingForOthers');
|
|
113
|
+
const heading = title || (isVideo ? t('call.groupVideoCall') : t('call.groupAudioCall'));
|
|
114
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
115
|
+
style: styles.canvas,
|
|
116
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
117
|
+
style: [styles.header, {
|
|
118
|
+
paddingTop: 14 + insets.top
|
|
119
|
+
}],
|
|
120
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
121
|
+
style: styles.headerTitle,
|
|
122
|
+
numberOfLines: 1,
|
|
123
|
+
children: heading
|
|
124
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
125
|
+
style: styles.headerStatus,
|
|
126
|
+
numberOfLines: 1,
|
|
127
|
+
children: status
|
|
128
|
+
}), speaking.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
129
|
+
style: styles.headerSpeaking,
|
|
130
|
+
numberOfLines: 1,
|
|
131
|
+
children: t('call.status.speaking', {
|
|
132
|
+
names: speaking.join(', ')
|
|
133
|
+
})
|
|
134
|
+
})]
|
|
135
|
+
}), onToggleMinimize && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
136
|
+
accessibilityRole: "button",
|
|
137
|
+
accessibilityLabel: t('call.action.minimize'),
|
|
138
|
+
onPress: onToggleMinimize,
|
|
139
|
+
style: [styles.minimizeButton, {
|
|
140
|
+
top: 12 + insets.top
|
|
141
|
+
}],
|
|
142
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CallIcons.MinimizeIcon, {
|
|
143
|
+
color: TEXT_ON_DARK,
|
|
144
|
+
size: 20
|
|
145
|
+
})
|
|
146
|
+
}), !!deviceError && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
147
|
+
style: styles.deviceErrorBanner,
|
|
148
|
+
onPress: _callSessionController.dismissCallDeviceError,
|
|
149
|
+
accessibilityRole: "button",
|
|
150
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
151
|
+
style: styles.deviceErrorText,
|
|
152
|
+
numberOfLines: 2,
|
|
153
|
+
children: deviceError
|
|
154
|
+
})
|
|
155
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
156
|
+
testID: "group-call-grid",
|
|
157
|
+
style: styles.scroll,
|
|
158
|
+
contentContainerStyle: styles.grid,
|
|
159
|
+
children: participants.map(participant => /*#__PURE__*/(0, _jsxRuntime.jsx)(ParticipantTile, {
|
|
160
|
+
participant: participant,
|
|
161
|
+
width: tileWidth,
|
|
162
|
+
height: tileHeight,
|
|
163
|
+
showVideo: videoIds.has(participant.identity),
|
|
164
|
+
primaryColor: primaryColor,
|
|
165
|
+
youLabel: t('call.participant.you'),
|
|
166
|
+
fallbackName: t('call.participant.default'),
|
|
167
|
+
micOffLabel: t('call.participant.micOff')
|
|
168
|
+
}, participant.identity || (participant.isLocal ? 'local' : participant.name)))
|
|
169
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CallControlBar.CallControlBar, {
|
|
170
|
+
session: session,
|
|
171
|
+
isVideo: isVideo,
|
|
172
|
+
icons: icons,
|
|
173
|
+
onHangup: onHangup
|
|
174
|
+
})]
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
exports.GroupCallView = GroupCallView;
|
|
178
|
+
const styles = _reactNative.StyleSheet.create({
|
|
179
|
+
canvas: {
|
|
180
|
+
flex: 1,
|
|
181
|
+
backgroundColor: SURFACE_DARK
|
|
182
|
+
},
|
|
183
|
+
header: {
|
|
184
|
+
paddingHorizontal: 64,
|
|
185
|
+
paddingBottom: 10,
|
|
186
|
+
alignItems: 'center',
|
|
187
|
+
gap: 2
|
|
188
|
+
},
|
|
189
|
+
headerTitle: {
|
|
190
|
+
color: TEXT_ON_DARK,
|
|
191
|
+
fontSize: 16,
|
|
192
|
+
fontWeight: '600'
|
|
193
|
+
},
|
|
194
|
+
headerStatus: {
|
|
195
|
+
color: TEXT_MUTED,
|
|
196
|
+
fontSize: 13,
|
|
197
|
+
fontVariant: ['tabular-nums']
|
|
198
|
+
},
|
|
199
|
+
headerSpeaking: {
|
|
200
|
+
color: TEXT_MUTED,
|
|
201
|
+
fontSize: 12
|
|
202
|
+
},
|
|
203
|
+
minimizeButton: {
|
|
204
|
+
position: 'absolute',
|
|
205
|
+
left: 16,
|
|
206
|
+
width: 36,
|
|
207
|
+
height: 36,
|
|
208
|
+
borderRadius: 18,
|
|
209
|
+
alignItems: 'center',
|
|
210
|
+
justifyContent: 'center',
|
|
211
|
+
backgroundColor: 'rgba(255, 255, 255, 0.14)',
|
|
212
|
+
zIndex: 6
|
|
213
|
+
},
|
|
214
|
+
scroll: {
|
|
215
|
+
flex: 1
|
|
216
|
+
},
|
|
217
|
+
grid: {
|
|
218
|
+
flexDirection: 'row',
|
|
219
|
+
flexWrap: 'wrap',
|
|
220
|
+
justifyContent: 'center',
|
|
221
|
+
alignContent: 'flex-start',
|
|
222
|
+
gap: GAP,
|
|
223
|
+
paddingHorizontal: PAD,
|
|
224
|
+
paddingBottom: PAD
|
|
225
|
+
},
|
|
226
|
+
tile: {
|
|
227
|
+
borderRadius: 16,
|
|
228
|
+
overflow: 'hidden',
|
|
229
|
+
backgroundColor: TILE_DARK,
|
|
230
|
+
alignItems: 'center',
|
|
231
|
+
justifyContent: 'center'
|
|
232
|
+
},
|
|
233
|
+
tileSpeaking: {
|
|
234
|
+
borderWidth: 3
|
|
235
|
+
},
|
|
236
|
+
tileIdle: {
|
|
237
|
+
borderWidth: 1,
|
|
238
|
+
borderColor: 'rgba(255, 255, 255, 0.12)'
|
|
239
|
+
},
|
|
240
|
+
nameTag: {
|
|
241
|
+
position: 'absolute',
|
|
242
|
+
left: 8,
|
|
243
|
+
bottom: 8,
|
|
244
|
+
maxWidth: '90%',
|
|
245
|
+
flexDirection: 'row',
|
|
246
|
+
alignItems: 'center',
|
|
247
|
+
gap: 6,
|
|
248
|
+
paddingVertical: 3,
|
|
249
|
+
paddingHorizontal: 8,
|
|
250
|
+
borderRadius: 999,
|
|
251
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)'
|
|
252
|
+
},
|
|
253
|
+
nameText: {
|
|
254
|
+
color: TEXT_ON_DARK,
|
|
255
|
+
fontSize: 13,
|
|
256
|
+
flexShrink: 1
|
|
257
|
+
},
|
|
258
|
+
micOffBadge: {
|
|
259
|
+
width: 18,
|
|
260
|
+
height: 18,
|
|
261
|
+
borderRadius: 9,
|
|
262
|
+
backgroundColor: DANGER,
|
|
263
|
+
alignItems: 'center',
|
|
264
|
+
justifyContent: 'center'
|
|
265
|
+
},
|
|
266
|
+
deviceErrorBanner: {
|
|
267
|
+
marginHorizontal: 16,
|
|
268
|
+
marginBottom: 8,
|
|
269
|
+
backgroundColor: 'rgba(229, 57, 53, 0.92)',
|
|
270
|
+
borderRadius: 12,
|
|
271
|
+
paddingVertical: 10,
|
|
272
|
+
paddingHorizontal: 14
|
|
273
|
+
},
|
|
274
|
+
deviceErrorText: {
|
|
275
|
+
color: TEXT_ON_DARK,
|
|
276
|
+
fontSize: 13,
|
|
277
|
+
textAlign: 'center'
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
var _default = exports.default = GroupCallView;
|
|
281
|
+
//# sourceMappingURL=GroupCallView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeSafeAreaContext","_ProfileImagePlaceholder","_CallVideo","_CallControlBar","_CallIcons","_callSessionController","_groupLayout","_callElapsed","_useT","_jsxRuntime","e","__esModule","default","SURFACE_DARK","TILE_DARK","TEXT_ON_DARK","TEXT_MUTED","DANGER","GAP","PAD","ParticipantTile","participant","width","height","showVideo","primaryColor","youLabel","fallbackName","micOffLabel","name","isLocal","jsxs","View","testID","accessibilityLabel","style","styles","tile","speaking","tileSpeaking","borderColor","tileIdle","children","video","jsx","CallVideo","source","StyleSheet","absoluteFill","objectFit","mirror","zOrder","ProfileImagePlaceholder","size","Math","max","min","round","nameTag","micMuted","micOffBadge","MicOffIcon","color","Text","nameText","numberOfLines","GroupCallView","session","kind","title","icons","onToggleMinimize","onHangup","t","useT","insets","useSafeAreaInsets","useWindowDimensions","elapsed","useSharedCallElapsed","anchorAt","participants","deviceError","connected","isVideo","columns","gridColumns","length","tileWidth","floor","tileHeight","videoIds","pickVideoTiles","Set","speakingNames","countLabel","count","status","formatCallDuration","heading","canvas","header","paddingTop","top","headerTitle","headerStatus","headerSpeaking","names","join","TouchableOpacity","accessibilityRole","onPress","minimizeButton","MinimizeIcon","deviceErrorBanner","dismissCallDeviceError","deviceErrorText","ScrollView","scroll","contentContainerStyle","grid","map","has","identity","CallControlBar","exports","create","flex","backgroundColor","paddingHorizontal","paddingBottom","alignItems","gap","fontSize","fontWeight","fontVariant","position","left","borderRadius","justifyContent","zIndex","flexDirection","flexWrap","alignContent","overflow","borderWidth","bottom","maxWidth","paddingVertical","flexShrink","marginHorizontal","marginBottom","textAlign","_default"],"sourceRoot":"../../../../src","sources":["components/VideoCalls/GroupCallView.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,2BAAA,GAAAF,OAAA;AAEA,IAAAG,wBAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,sBAAA,GAAAP,OAAA;AAEA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAV,OAAA;AAAuC,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAD,uBAAAa,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvC,MAAMG,YAAY,GAAG,SAAS;AAC9B,MAAMC,SAAS,GAAG,SAAS;AAC3B,MAAMC,YAAY,GAAG,SAAS;AAC9B,MAAMC,UAAU,GAAG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C,CAAC;AAAC,IAAAC,QAAA,GAAA5B,OAAA,CAAAjH,OAAA,GAEYsD,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.P2PCallRunner = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactRedux = require("react-redux");
|
|
9
|
+
var _roomStore = require("../../roomStore");
|
|
10
|
+
var _callSlice = require("../../roomStore/callSlice");
|
|
11
|
+
var _useChatSettingState = require("../../hooks/useChatSettingState");
|
|
12
|
+
var _P2PCallController = require("../../calls/p2p/P2PCallController");
|
|
13
|
+
var _p2pRuntime = require("../../calls/p2p/p2pRuntime");
|
|
14
|
+
var _webrtcRuntime = require("../../calls/p2p/webrtcRuntime");
|
|
15
|
+
var _callState = require("../../networking/api-requests/callState.api");
|
|
16
|
+
var _callActions = require("./callActions");
|
|
17
|
+
var _p2pCallSession = require("./p2pCallSession");
|
|
18
|
+
// Headless owner of the p2p controller for the call in the redux call slice.
|
|
19
|
+
// It builds the controller when a p2p call needs one, wires its events back
|
|
20
|
+
// into the slice, and releases it on EVERY way a call can stop (the phase goes
|
|
21
|
+
// idle or error, the call changes, the overlay unmounts), which is what keeps
|
|
22
|
+
// camera, microphone and the peer connection from leaking.
|
|
23
|
+
//
|
|
24
|
+
// caller: the controller exists from the moment the create response says
|
|
25
|
+
// `p2p` and starts at once (media, offer);
|
|
26
|
+
// callee: the controller exists while the incoming call rings, so the
|
|
27
|
+
// caller's offer / candidates / cancel are caught, but it only
|
|
28
|
+
// starts (media, answer) after the user accepts.
|
|
29
|
+
//
|
|
30
|
+
// RN specific: the call also rings from a VoIP push, with the app still
|
|
31
|
+
// starting. The caller keeps re-sending its offer for the whole ring window
|
|
32
|
+
// (longer than on web) because a cold-started callee may need several seconds
|
|
33
|
+
// to bring the XMPP socket up.
|
|
34
|
+
|
|
35
|
+
const RN_OFFER_RESEND_MS = [4_000, 10_000, 18_000, 26_000];
|
|
36
|
+
const isCurrentCall = callId => {
|
|
37
|
+
const current = _roomStore.store.getState().call;
|
|
38
|
+
return current.phase !== 'idle' && current.callId === callId;
|
|
39
|
+
};
|
|
40
|
+
const P2PCallRunner = () => {
|
|
41
|
+
const dispatch = (0, _reactRedux.useDispatch)();
|
|
42
|
+
const call = (0, _reactRedux.useSelector)(state => state.call);
|
|
43
|
+
const {
|
|
44
|
+
config
|
|
45
|
+
} = (0, _useChatSettingState.useChatSettingState)();
|
|
46
|
+
const videoCalls = config?.videoCalls;
|
|
47
|
+
const enabled = videoCalls?.enabled === true;
|
|
48
|
+
const callId = call.callId;
|
|
49
|
+
const isIncoming = call.direction === 'incoming';
|
|
50
|
+
const wantsController = enabled && call.mode === 'p2p' && !!callId && (isIncoming ? call.phase === 'ringing-incoming' || call.phase === 'connecting' || call.phase === 'in-call' : call.direction === 'outgoing' && call.iceServers !== null && (call.phase === 'requesting' || call.phase === 'connecting' || call.phase === 'in-call'));
|
|
51
|
+
// The callee waits on the ring screen; everyone else starts right away.
|
|
52
|
+
const shouldStart = wantsController && !(isIncoming && call.phase === 'ringing-incoming');
|
|
53
|
+
|
|
54
|
+
// Latest config values for the controller without re-running the effect.
|
|
55
|
+
const optionsRef = (0, _react.useRef)({
|
|
56
|
+
startWithMicOn: videoCalls?.startWithMicOn,
|
|
57
|
+
startWithCameraOn: videoCalls?.startWithCameraOn
|
|
58
|
+
});
|
|
59
|
+
optionsRef.current = {
|
|
60
|
+
startWithMicOn: videoCalls?.startWithMicOn,
|
|
61
|
+
startWithCameraOn: videoCalls?.startWithCameraOn
|
|
62
|
+
};
|
|
63
|
+
(0, _react.useEffect)(() => {
|
|
64
|
+
if (!wantsController || !callId) return;
|
|
65
|
+
if (!(0, _webrtcRuntime.isP2PAvailable)()) {
|
|
66
|
+
// The WebRTC package is not in this build: nothing can carry the call.
|
|
67
|
+
// A callee also tells the caller instead of letting them ring on.
|
|
68
|
+
if (_roomStore.store.getState().call.direction === 'incoming') {
|
|
69
|
+
(0, _callState.reportCallDeclined)(callId);
|
|
70
|
+
}
|
|
71
|
+
dispatch((0, _callSlice.setCallError)((0, _callActions.translateCallString)('call.error.sdkMissing')));
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const snapshot = _roomStore.store.getState().call;
|
|
75
|
+
const peer = String(snapshot.peerXmppUsername || '').trim();
|
|
76
|
+
const role = snapshot.direction === 'incoming' ? 'callee' : 'caller';
|
|
77
|
+
if (!peer) {
|
|
78
|
+
// Without the peer's address there is nobody to signal.
|
|
79
|
+
dispatch((0, _callSlice.setCallError)((0, _callActions.translateCallString)('call.error.p2pNoPeer')));
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const controller = (0, _p2pRuntime.acquireP2PController)(callId, () => {
|
|
83
|
+
const peerLocal = peer.split('@')[0];
|
|
84
|
+
return new _P2PCallController.P2PCallController({
|
|
85
|
+
callId,
|
|
86
|
+
role,
|
|
87
|
+
kind: snapshot.kind,
|
|
88
|
+
peerLocal,
|
|
89
|
+
iceServers: snapshot.iceServers || [],
|
|
90
|
+
startWithMicOn: optionsRef.current.startWithMicOn,
|
|
91
|
+
startWithCameraOn: optionsRef.current.startWithCameraOn
|
|
92
|
+
}, (0, _p2pRuntime.createNativeP2PDeps)({
|
|
93
|
+
callId,
|
|
94
|
+
peerXmppUsername: peer
|
|
95
|
+
}), {
|
|
96
|
+
onNegotiated: () => {
|
|
97
|
+
if (role === 'caller' && isCurrentCall(callId) && _roomStore.store.getState().call.phase === 'requesting') {
|
|
98
|
+
dispatch((0, _callSlice.setCallPhase)('connecting'));
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
onConnected: () => {
|
|
102
|
+
if (!isCurrentCall(callId)) return;
|
|
103
|
+
dispatch((0, _callSlice.setCallPhase)('in-call'));
|
|
104
|
+
// One side is enough to start the server-side call timer.
|
|
105
|
+
if (role === 'caller') (0, _callState.reportCallConnected)(callId);
|
|
106
|
+
},
|
|
107
|
+
onRemoteEnd: reason => {
|
|
108
|
+
if (!isCurrentCall(callId)) return;
|
|
109
|
+
const notice = (0, _P2PCallController.remoteEndNotice)(reason);
|
|
110
|
+
dispatch(notice ? (0, _callSlice.setCallError)((0, _p2pCallSession.localizeP2PMessage)(notice)) : (0, _callSlice.endCall)());
|
|
111
|
+
},
|
|
112
|
+
onFailed: message => {
|
|
113
|
+
if (isCurrentCall(callId)) {
|
|
114
|
+
dispatch((0, _callSlice.setCallError)((0, _p2pCallSession.localizeP2PMessage)(message)));
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
// Whatever ended it, tell the server the call is over (idempotent, so
|
|
118
|
+
// it does not matter that the peer reports it too). A callee that
|
|
119
|
+
// never accepted ends through the decline report instead.
|
|
120
|
+
onDisposed: ({
|
|
121
|
+
started
|
|
122
|
+
}) => {
|
|
123
|
+
if (started) (0, _callState.reportCallEnded)(callId);
|
|
124
|
+
}
|
|
125
|
+
}, {
|
|
126
|
+
offerResendMs: RN_OFFER_RESEND_MS
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
const unbind = (0, _p2pCallSession.bindP2PSession)(controller, snapshot.kind);
|
|
130
|
+
const detach = _p2pRuntime.p2pInbox.attach(callId, signal => controller.receive(signal));
|
|
131
|
+
if (shouldStart) void (0, _p2pCallSession.startP2PController)(controller, snapshot.kind);
|
|
132
|
+
return () => {
|
|
133
|
+
detach();
|
|
134
|
+
unbind();
|
|
135
|
+
(0, _p2pRuntime.releaseP2PController)(callId);
|
|
136
|
+
};
|
|
137
|
+
}, [wantsController, shouldStart, callId, dispatch]);
|
|
138
|
+
|
|
139
|
+
// Callee: the incoming UI is on screen, let the server (and so the caller)
|
|
140
|
+
// know the phone is ringing. Once per call.
|
|
141
|
+
const ringingReportedRef = (0, _react.useRef)(null);
|
|
142
|
+
(0, _react.useEffect)(() => {
|
|
143
|
+
if (enabled && call.mode === 'p2p' && isIncoming && call.phase === 'ringing-incoming' && callId && ringingReportedRef.current !== callId) {
|
|
144
|
+
ringingReportedRef.current = callId;
|
|
145
|
+
(0, _callState.reportCallRinging)(callId);
|
|
146
|
+
}
|
|
147
|
+
}, [enabled, call.mode, isIncoming, call.phase, callId]);
|
|
148
|
+
return null;
|
|
149
|
+
};
|
|
150
|
+
exports.P2PCallRunner = P2PCallRunner;
|
|
151
|
+
//# sourceMappingURL=P2PCallRunner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactRedux","_roomStore","_callSlice","_useChatSettingState","_P2PCallController","_p2pRuntime","_webrtcRuntime","_callState","_callActions","_p2pCallSession","RN_OFFER_RESEND_MS","isCurrentCall","callId","current","store","getState","call","phase","P2PCallRunner","dispatch","useDispatch","useSelector","state","config","useChatSettingState","videoCalls","enabled","isIncoming","direction","wantsController","mode","iceServers","shouldStart","optionsRef","useRef","startWithMicOn","startWithCameraOn","useEffect","isP2PAvailable","reportCallDeclined","setCallError","translateCallString","snapshot","peer","String","peerXmppUsername","trim","role","controller","acquireP2PController","peerLocal","split","P2PCallController","kind","createNativeP2PDeps","onNegotiated","setCallPhase","onConnected","reportCallConnected","onRemoteEnd","reason","notice","remoteEndNotice","localizeP2PMessage","endCall","onFailed","message","onDisposed","started","reportCallEnded","offerResendMs","unbind","bindP2PSession","detach","p2pInbox","attach","signal","receive","startP2PController","releaseP2PController","ringingReportedRef","reportCallRinging","exports"],"sourceRoot":"../../../../src","sources":["components/VideoCalls/P2PCallRunner.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AAIA,IAAAM,WAAA,GAAAN,OAAA;AAMA,IAAAO,cAAA,GAAAP,OAAA;A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E,kBAAkB,CAACnE,OAAO,KAAKD,MAAM,EACrC;MACAoE,kBAAkB,CAACnE,OAAO,GAAGD,MAAM;MACnC,IAAAqE,4BAAiB,EAACrE,MAAM,CAAC;IAC3B;EACF,CAAC,EAAE,CAACc,OAAO,EAAEV,IAAI,CAACc,IAAI,EAAEH,UAAU,EAAEX,IAAI,CAACC,KAAK,EAAEL,MAAM,CAAC,CAAC;EAExD,OAAO,IAAI;AACb,CAAC;AAACsE,OAAA,CAAAhE,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -13,7 +13,9 @@ var _useChatSettingState = require("../../hooks/useChatSettingState");
|
|
|
13
13
|
var _callTokenStanza = require("../../networking/callTokenStanza");
|
|
14
14
|
var _useTheme = require("../../hooks/useTheme");
|
|
15
15
|
var _VideoCallSession = require("./VideoCallSession");
|
|
16
|
+
var _P2PCallRunner = require("./P2PCallRunner");
|
|
16
17
|
var _callSessionController = require("./callSessionController");
|
|
18
|
+
var _callLive = require("./callLive");
|
|
17
19
|
var _callActions = require("./callActions");
|
|
18
20
|
var _ActiveCallBar = require("./ActiveCallBar");
|
|
19
21
|
var _callUiStore = require("./callUiStore");
|
|
@@ -147,7 +149,7 @@ const RingingCard = ({
|
|
|
147
149
|
style: [styles.ringingName, {
|
|
148
150
|
color: theme.text
|
|
149
151
|
}],
|
|
150
|
-
children: roomName || (variant === 'incoming' ? t('call.
|
|
152
|
+
children: roomName || (variant === 'incoming' ? t('call.incomingNeutral') : t('call.title'))
|
|
151
153
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
152
154
|
style: styles.ringingSubtitleRow,
|
|
153
155
|
children: [kind === 'audio' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CallIcons.AudioCallIcon, {
|
|
@@ -411,7 +413,10 @@ const VideoCallOverlayInner = () => {
|
|
|
411
413
|
const t = (0, _useT.useT)();
|
|
412
414
|
const videoCallsConfig = config?.videoCalls;
|
|
413
415
|
const enabled = videoCallsConfig?.enabled === true;
|
|
414
|
-
|
|
416
|
+
// The server's own LiveKit URL (call-token or create response) wins over
|
|
417
|
+
// the host config.
|
|
418
|
+
const livekitUrl = (call.livekitUrl || videoCallsConfig?.livekitUrl || '').trim();
|
|
419
|
+
const isP2P = call.mode === 'p2p';
|
|
415
420
|
const primaryColor = theme.primary || config?.colors?.primary || DEFAULT_PRIMARY;
|
|
416
421
|
const isOpen = enabled && call.phase !== 'idle';
|
|
417
422
|
|
|
@@ -428,7 +433,10 @@ const VideoCallOverlayInner = () => {
|
|
|
428
433
|
minimized,
|
|
429
434
|
systemRinging
|
|
430
435
|
} = (0, _callUiStore.useCallUi)();
|
|
431
|
-
|
|
436
|
+
|
|
437
|
+
// A p2p call has no LiveKit token or URL: the media is the peer connection
|
|
438
|
+
// owned by P2PCallRunner.
|
|
439
|
+
const canRenderSession = isP2P ? (0, _callLive.callCanRenderSession)(call) : (0, _callLive.callCanRenderSession)(call) && !!livekitUrl;
|
|
432
440
|
const isMinimized = minimized && canRenderSession;
|
|
433
441
|
// Expanding from the header strip slides the call down from the top
|
|
434
442
|
// instead of fading it in.
|
|
@@ -441,18 +449,19 @@ const VideoCallOverlayInner = () => {
|
|
|
441
449
|
// Join the LiveKit room once the call has a token. Idempotent, and the
|
|
442
450
|
// controller tears itself down when the call slice leaves these phases.
|
|
443
451
|
(0, _react.useEffect)(() => {
|
|
444
|
-
if (!enabled || !canRenderSession || !call.token) {
|
|
452
|
+
if (!enabled || isP2P || !canRenderSession || !call.token) {
|
|
445
453
|
return;
|
|
446
454
|
}
|
|
447
455
|
(0, _callSessionController.startCallSession)({
|
|
448
456
|
token: call.token,
|
|
449
457
|
livekitUrl,
|
|
450
458
|
kind: call.kind,
|
|
459
|
+
isGroup: call.isGroup,
|
|
451
460
|
startWithMicOn: videoCallsConfig?.startWithMicOn,
|
|
452
461
|
startWithCameraOn: videoCallsConfig?.startWithCameraOn
|
|
453
462
|
});
|
|
454
463
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
455
|
-
}, [enabled, canRenderSession, call.token, livekitUrl, call.kind]);
|
|
464
|
+
}, [enabled, isP2P, canRenderSession, call.token, livekitUrl, call.kind, call.isGroup]);
|
|
456
465
|
|
|
457
466
|
// Give up on an unanswered outgoing dial. Unlike web (which only shows
|
|
458
467
|
(0, _react.useEffect)(() => {
|
|
@@ -513,6 +522,9 @@ const VideoCallOverlayInner = () => {
|
|
|
513
522
|
}, [isOpen, isMinimized, hangupCurrent]);
|
|
514
523
|
const ringingHeader = (0, _react.useMemo)(() => {
|
|
515
524
|
if (call.direction === 'incoming') {
|
|
525
|
+
if (call.isGroup) {
|
|
526
|
+
return call.kind === 'audio' ? t('call.incomingGroupAudio') : t('call.incomingGroupVideo');
|
|
527
|
+
}
|
|
516
528
|
return call.kind === 'audio' ? t('call.incomingAudio') : t('call.incomingVideo');
|
|
517
529
|
}
|
|
518
530
|
if (call.phase === 'requesting') {
|
|
@@ -525,19 +537,25 @@ const VideoCallOverlayInner = () => {
|
|
|
525
537
|
return t('call.failed');
|
|
526
538
|
}
|
|
527
539
|
return t('call.title');
|
|
528
|
-
}, [call.direction, call.phase, call.kind, t]);
|
|
540
|
+
}, [call.direction, call.phase, call.kind, call.isGroup, t]);
|
|
529
541
|
const ringingSubtitle = (0, _react.useMemo)(() => {
|
|
542
|
+
// The card title is the room's name; make it clear it is a group ring.
|
|
543
|
+
const label = call.isGroup ? call.kind === 'audio' ? t('call.groupAudioCall') : t('call.groupVideoCall') : call.kind === 'audio' ? t('call.audioCall') : t('call.videoCall');
|
|
530
544
|
if (call.direction === 'incoming') {
|
|
531
|
-
|
|
545
|
+
// "<person> is calling in <room>" once both are known.
|
|
546
|
+
return call.isGroup && call.callerName && call.roomName ? t('call.callingIn', {
|
|
547
|
+
caller: call.callerName,
|
|
548
|
+
room: call.roomName
|
|
549
|
+
}) : label;
|
|
532
550
|
}
|
|
533
551
|
if (call.phase === 'connecting') {
|
|
534
|
-
return t('call.connectingToRoom');
|
|
552
|
+
return isP2P ? t('call.connecting') : t('call.connectingToRoom');
|
|
535
553
|
}
|
|
536
554
|
if (call.phase === 'error') {
|
|
537
555
|
return t('call.tryAgainLater');
|
|
538
556
|
}
|
|
539
|
-
return
|
|
540
|
-
}, [call.direction, call.kind, call.phase, t]);
|
|
557
|
+
return label;
|
|
558
|
+
}, [call.direction, call.kind, call.phase, call.isGroup, call.callerName, call.roomName, isP2P, t]);
|
|
541
559
|
if (!isOpen) {
|
|
542
560
|
return null;
|
|
543
561
|
}
|
|
@@ -550,6 +568,7 @@ const VideoCallOverlayInner = () => {
|
|
|
550
568
|
}
|
|
551
569
|
const renderSession = collapse => /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoCallSession.VideoCallSession, {
|
|
552
570
|
kind: call.kind,
|
|
571
|
+
isGroup: call.isGroup,
|
|
553
572
|
peerName: call.roomName,
|
|
554
573
|
primaryColor: primaryColor,
|
|
555
574
|
icons: videoCallsConfig?.icons,
|
|
@@ -602,7 +621,7 @@ const VideoCallOverlayInner = () => {
|
|
|
602
621
|
variant: "error",
|
|
603
622
|
primaryColor: primaryColor,
|
|
604
623
|
theme: theme,
|
|
605
|
-
errorMessage: call.error || (!livekitUrl ? t('call.error.missingLivekitUrl') : null),
|
|
624
|
+
errorMessage: call.error || (!livekitUrl && !isP2P ? t('call.error.missingLivekitUrl') : null),
|
|
606
625
|
onDismiss: () => dispatch((0, _callSlice.resetCall)())
|
|
607
626
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(RingingCard, {
|
|
608
627
|
title: ringingHeader,
|
|
@@ -620,9 +639,14 @@ const VideoCallOverlayInner = () => {
|
|
|
620
639
|
};
|
|
621
640
|
const VideoCallOverlay = () => {
|
|
622
641
|
const callId = (0, _reactRedux.useSelector)(state => state.call.callId || String(state.call.startedAt || ''));
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
642
|
+
// The runner is headless and owns the p2p controller. It sits beside the
|
|
643
|
+
// boundary, not inside it: a crash in the call UI blanks the screen, it
|
|
644
|
+
// must not tear the call down.
|
|
645
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
646
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_P2PCallRunner.P2PCallRunner, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(CallErrorBoundary, {
|
|
647
|
+
resetKey: callId,
|
|
648
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(VideoCallOverlayInner, {})
|
|
649
|
+
})]
|
|
626
650
|
});
|
|
627
651
|
};
|
|
628
652
|
exports.VideoCallOverlay = VideoCallOverlay;
|