@ethora/chat-component-rn 26.10.10 → 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 +16 -0
- package/README.md +125 -0
- 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/ChatHeader.js +2 -1
- 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/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/Modals/ChatProfileModal/ReportChatModal.js +19 -15
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.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/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/incomingCallFromPush.js +63 -7
- package/lib/commonjs/helpers/incomingCallFromPush.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/i18n/strings.js +444 -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 +8 -2
- 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/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/ChatHeader.js +2 -1
- 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/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/Modals/ChatProfileModal/ReportChatModal.js +21 -15
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.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/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/incomingCallFromPush.js +63 -7
- package/lib/module/helpers/incomingCallFromPush.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/i18n/strings.js +444 -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 +8 -2
- 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/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/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/MessageContainer.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ReduxWrapper.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.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/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/incomingCallFromPush.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/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 +2 -1
- 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/types.d.ts +67 -4
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +1 -1
- 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/ChatHeader.tsx +2 -0
- package/src/components/MainComponents/LanguageSelectorButton.tsx +9 -2
- package/src/components/MainComponents/LanguageSelectorModal.tsx +10 -6
- package/src/components/MainComponents/MessageContainer.tsx +15 -0
- package/src/components/MainComponents/ReduxWrapper.tsx +10 -0
- package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +22 -22
- 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/context/xmppProvider.tsx +3 -0
- package/src/helpers/callPush.ts +13 -1
- package/src/helpers/incomingCallFromPush.ts +65 -7
- package/src/helpers/pushPayload.ts +9 -1
- package/src/helpers/reportRoom.ts +93 -0
- package/src/i18n/strings.ts +444 -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 +12 -3
- 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/types.ts +70 -4
- package/src/version.ts +1 -1
|
@@ -19,21 +19,19 @@ import { getIconColor } from '../../../helpers/getIconColor';
|
|
|
19
19
|
import { useChatSettingState } from '../../../hooks/useChatSettingState';
|
|
20
20
|
import { useTheme } from '../../../hooks/useTheme';
|
|
21
21
|
import type { ChatTheme } from '../../../theme/theme';
|
|
22
|
+
import {
|
|
23
|
+
buildReportRoomPayload,
|
|
24
|
+
OTHER_REPORT_CATEGORY,
|
|
25
|
+
REPORT_CATEGORIES,
|
|
26
|
+
} from '../../../helpers/reportRoom';
|
|
22
27
|
|
|
23
28
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
29
|
+
* The ids are UI ids: helpers/reportRoom maps each one onto the category
|
|
30
|
+
* value `POST /v1/chats/reports/{chatName}` accepts and builds the
|
|
31
|
+
* non-empty text it requires. Labels come from the `report.category.*`
|
|
32
|
+
* strings.
|
|
27
33
|
*/
|
|
28
|
-
const CATEGORIES = [
|
|
29
|
-
'spam',
|
|
30
|
-
'violence',
|
|
31
|
-
'childAbuse',
|
|
32
|
-
'pornography',
|
|
33
|
-
'personalDetails',
|
|
34
|
-
'illegalDrugs',
|
|
35
|
-
'other',
|
|
36
|
-
] as const;
|
|
34
|
+
const CATEGORIES = [...REPORT_CATEGORIES, OTHER_REPORT_CATEGORY];
|
|
37
35
|
|
|
38
36
|
interface ReportChatModalProps {
|
|
39
37
|
visible: boolean;
|
|
@@ -66,17 +64,19 @@ const ReportChatModal: React.FC<ReportChatModalProps> = ({
|
|
|
66
64
|
|
|
67
65
|
const submit = async () => {
|
|
68
66
|
if (!category || sending) {return;}
|
|
67
|
+
const payload = buildReportRoomPayload(
|
|
68
|
+
roomJid || activeRoom?.jid || '',
|
|
69
|
+
category,
|
|
70
|
+
details
|
|
71
|
+
);
|
|
72
|
+
if (!payload) {return;}
|
|
69
73
|
setSending(true);
|
|
70
74
|
try {
|
|
71
|
-
await postReportRoom(
|
|
72
|
-
chatName: (roomJid || activeRoom?.jid || '').split('@')[0],
|
|
73
|
-
category,
|
|
74
|
-
text: details.trim() || undefined,
|
|
75
|
-
});
|
|
75
|
+
await postReportRoom(payload);
|
|
76
76
|
showToast({
|
|
77
77
|
id: Date.now().toString(),
|
|
78
78
|
title: t('toast.successTitle'),
|
|
79
|
-
message: t('
|
|
79
|
+
message: t('toast.reportSent'),
|
|
80
80
|
type: 'success',
|
|
81
81
|
});
|
|
82
82
|
close();
|
|
@@ -85,7 +85,7 @@ const ReportChatModal: React.FC<ReportChatModalProps> = ({
|
|
|
85
85
|
showToast({
|
|
86
86
|
id: Date.now().toString(),
|
|
87
87
|
title: t('toast.error'),
|
|
88
|
-
message: t('
|
|
88
|
+
message: t('toast.reportFailed'),
|
|
89
89
|
type: 'error',
|
|
90
90
|
});
|
|
91
91
|
} finally {
|
|
@@ -110,7 +110,7 @@ const ReportChatModal: React.FC<ReportChatModalProps> = ({
|
|
|
110
110
|
<View style={styles.card}>
|
|
111
111
|
<Text style={styles.title}>{t('modal.report.chatTitle')}</Text>
|
|
112
112
|
<View style={styles.categories}>
|
|
113
|
-
{CATEGORIES.map((id) => {
|
|
113
|
+
{CATEGORIES.map(({ id, labelKey }) => {
|
|
114
114
|
const selected = category === id;
|
|
115
115
|
return (
|
|
116
116
|
<TouchableOpacity
|
|
@@ -126,13 +126,13 @@ const ReportChatModal: React.FC<ReportChatModalProps> = ({
|
|
|
126
126
|
<Text
|
|
127
127
|
style={[styles.categoryLabel, selected && { color: primary }]}
|
|
128
128
|
>
|
|
129
|
-
{t(
|
|
129
|
+
{t(labelKey)}
|
|
130
130
|
</Text>
|
|
131
131
|
</TouchableOpacity>
|
|
132
132
|
);
|
|
133
133
|
})}
|
|
134
134
|
</View>
|
|
135
|
-
{category ===
|
|
135
|
+
{category === OTHER_REPORT_CATEGORY.id && (
|
|
136
136
|
<TextInput
|
|
137
137
|
testID="report-details"
|
|
138
138
|
style={styles.input}
|
|
@@ -33,7 +33,6 @@ import { useTheme } from '../../../hooks/useTheme';
|
|
|
33
33
|
import type { ChatTheme } from '../../../theme/theme';
|
|
34
34
|
import { chatTextStyle } from '../../../helpers/typography';
|
|
35
35
|
import { getElementFont } from '../../../helpers/getElementFont';
|
|
36
|
-
import { LANGUAGE_OPTIONS } from '../../../helpers/constants/LANGUAGE_OPTIONS';
|
|
37
36
|
import { MODAL_TYPES } from '../../../helpers/constants/MODAL_TYPES';
|
|
38
37
|
import {
|
|
39
38
|
setActiveFile,
|
|
@@ -44,7 +43,6 @@ import { runLogoutFlow } from '../../Menu/HeaderRoomListMenu';
|
|
|
44
43
|
import { useLogout } from '../../../hooks/useLogout';
|
|
45
44
|
import {
|
|
46
45
|
ApiRoom,
|
|
47
|
-
createChatCall,
|
|
48
46
|
ownAppId,
|
|
49
47
|
postPrivateRoom,
|
|
50
48
|
} from '../../../networking/api-requests/rooms.api';
|
|
@@ -53,9 +51,14 @@ import { useSelector } from 'react-redux';
|
|
|
53
51
|
import { store, type RootState } from '../../../roomStore';
|
|
54
52
|
import { setCallError, startOutgoingCall } from '../../../roomStore/callSlice';
|
|
55
53
|
import { sendCallInviteSignal } from '../../../networking/callTokenStanza';
|
|
54
|
+
import { requestOutgoingCall } from '../../../calls/startCall';
|
|
55
|
+
import { isCallRoomTypeAllowed } from '../../../calls/callMode';
|
|
56
56
|
import { AudioCallIcon, VideoCallIcon } from '../../VideoCalls/CallIcons';
|
|
57
57
|
import { accountNameOf } from '../../../helpers/accountName';
|
|
58
|
-
import {
|
|
58
|
+
import {
|
|
59
|
+
chatLanguageChoices,
|
|
60
|
+
setChatLanguage,
|
|
61
|
+
} from '../../../services/languageSettings';
|
|
59
62
|
import { composeName } from '../../../helpers/displayName';
|
|
60
63
|
import { isUnresolvedSenderId } from '../../../helpers/isUnresolvedSenderId';
|
|
61
64
|
|
|
@@ -158,15 +161,26 @@ const UserProfileModal: React.FC<UserProfileModalProps> = ({
|
|
|
158
161
|
[files]
|
|
159
162
|
);
|
|
160
163
|
|
|
164
|
+
// The install's translateLanguages (get-config) when the host passed
|
|
165
|
+
// them; none means no translation server, so no Language tab.
|
|
166
|
+
const languageChoices = useMemo(() => chatLanguageChoices(config), [config]);
|
|
167
|
+
|
|
161
168
|
const tabs = useMemo(
|
|
162
169
|
() =>
|
|
163
170
|
profileTabs({
|
|
164
171
|
isOwnProfile,
|
|
165
|
-
translatesEnabled:
|
|
172
|
+
translatesEnabled:
|
|
173
|
+
!!config?.translates?.enabled && languageChoices.length > 0,
|
|
166
174
|
hasMedia: media.length > 0,
|
|
167
175
|
hasDocuments: documents.length > 0,
|
|
168
176
|
}),
|
|
169
|
-
[
|
|
177
|
+
[
|
|
178
|
+
isOwnProfile,
|
|
179
|
+
config?.translates?.enabled,
|
|
180
|
+
languageChoices.length,
|
|
181
|
+
media.length,
|
|
182
|
+
documents.length,
|
|
183
|
+
]
|
|
170
184
|
);
|
|
171
185
|
|
|
172
186
|
// Keep the selected tab valid as the lists load in.
|
|
@@ -366,7 +380,7 @@ const UserProfileModal: React.FC<UserProfileModalProps> = ({
|
|
|
366
380
|
const canCall =
|
|
367
381
|
videoCallsConfig?.enabled === true &&
|
|
368
382
|
Boolean(videoCallsConfig?.livekitUrl?.trim()) &&
|
|
369
|
-
(videoCallsConfig?.allowedRoomTypes
|
|
383
|
+
isCallRoomTypeAllowed('private', videoCallsConfig?.allowedRoomTypes);
|
|
370
384
|
const isAudioCallsEnabled = canCall && videoCallsConfig?.enableAudioCalls === true;
|
|
371
385
|
const isCallBusy = useSelector((state: RootState) => state.call.phase !== 'idle');
|
|
372
386
|
|
|
@@ -403,7 +417,11 @@ const UserProfileModal: React.FC<UserProfileModalProps> = ({
|
|
|
403
417
|
dispatch(setActiveModal(undefined));
|
|
404
418
|
|
|
405
419
|
try {
|
|
406
|
-
await
|
|
420
|
+
await requestOutgoingCall({
|
|
421
|
+
chatName: room.bareName,
|
|
422
|
+
kind,
|
|
423
|
+
peerXmppUsername: room.peerXmppUsername || null,
|
|
424
|
+
});
|
|
407
425
|
} catch (error) {
|
|
408
426
|
dispatch(
|
|
409
427
|
setCallError(
|
|
@@ -556,8 +574,9 @@ const UserProfileModal: React.FC<UserProfileModalProps> = ({
|
|
|
556
574
|
if (activeTab === 'language') {
|
|
557
575
|
return (
|
|
558
576
|
<View>
|
|
559
|
-
{
|
|
560
|
-
const selected =
|
|
577
|
+
{languageChoices.map((option) => {
|
|
578
|
+
const selected =
|
|
579
|
+
String(langSource || '').toLowerCase() === option.id.toLowerCase();
|
|
561
580
|
return (
|
|
562
581
|
<TouchableOpacity
|
|
563
582
|
key={option.id}
|
|
@@ -94,13 +94,15 @@ const LanguageCard: React.FC<LanguageCardProps> = ({ style, testID }) => {
|
|
|
94
94
|
appChoices,
|
|
95
95
|
appCurrent
|
|
96
96
|
)}
|
|
97
|
-
{
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
97
|
+
{/* No translate languages from get-config: no translation server. */}
|
|
98
|
+
{chatChoices.length > 0 &&
|
|
99
|
+
group(
|
|
100
|
+
'chat',
|
|
101
|
+
t('settings.language.chat'),
|
|
102
|
+
t('settings.language.chatHint'),
|
|
103
|
+
chatChoices,
|
|
104
|
+
chatCurrent
|
|
105
|
+
)}
|
|
104
106
|
</View>
|
|
105
107
|
);
|
|
106
108
|
};
|
|
@@ -9,6 +9,7 @@ import { useT } from '../../i18n/useT';
|
|
|
9
9
|
import { ExpandIcon, HangUpIcon, MicOffIcon, MicOnIcon } from './CallIcons';
|
|
10
10
|
import { toggleCallMic, useCallSession } from './callSessionController';
|
|
11
11
|
import { terminateActiveCall } from './callActions';
|
|
12
|
+
import { callCanRenderSession } from './callLive';
|
|
12
13
|
import {
|
|
13
14
|
registerCallBarHost,
|
|
14
15
|
setCallBarAnchor,
|
|
@@ -33,10 +34,8 @@ const CONTROL = 'rgba(255, 255, 255, 0.2)';
|
|
|
33
34
|
/** True while a call is up and minimized, i.e. the strip should show. */
|
|
34
35
|
const useShowCallBar = (): boolean => {
|
|
35
36
|
const { minimized } = useCallUi();
|
|
36
|
-
const active = useSelector(
|
|
37
|
-
(state
|
|
38
|
-
!!state.call.token &&
|
|
39
|
-
(state.call.phase === 'connecting' || state.call.phase === 'in-call')
|
|
37
|
+
const active = useSelector((state: RootState) =>
|
|
38
|
+
callCanRenderSession(state.call)
|
|
40
39
|
);
|
|
41
40
|
const { config } = useChatSettingState();
|
|
42
41
|
return minimized && active && config?.videoCalls?.enabled === true;
|
|
@@ -62,7 +61,9 @@ export const ActiveCallBar: FC = () => {
|
|
|
62
61
|
: !session.connected
|
|
63
62
|
? t('call.status.connecting')
|
|
64
63
|
: !session.remoteJoined
|
|
65
|
-
?
|
|
64
|
+
? session.isGroup
|
|
65
|
+
? t('call.status.waitingForOthers')
|
|
66
|
+
: t('call.status.waitingForPeer')
|
|
66
67
|
: t('call.status.inCall');
|
|
67
68
|
const statusLine = session.remoteMicMuted
|
|
68
69
|
? `${status} · ${t('call.peerMuted', { name })}`
|
|
@@ -4,7 +4,8 @@ import { useDispatch, useSelector } from 'react-redux';
|
|
|
4
4
|
import { RootState } from '../../roomStore';
|
|
5
5
|
import { setCallError, startOutgoingCall } from '../../roomStore/callSlice';
|
|
6
6
|
import { sendCallInviteSignal } from '../../networking/callTokenStanza';
|
|
7
|
-
import {
|
|
7
|
+
import { requestOutgoingCall } from '../../calls/startCall';
|
|
8
|
+
import { isCallRoomTypeAllowed } from '../../calls/callMode';
|
|
8
9
|
import { useChatSettingState } from '../../hooks/useChatSettingState';
|
|
9
10
|
import { AudioCallIcon, VideoCallIcon } from './CallIcons';
|
|
10
11
|
import { useT } from '../../i18n/useT';
|
|
@@ -19,7 +20,8 @@ import { getIconColor } from '../../helpers/getIconColor';
|
|
|
19
20
|
* calls are off, which is the common case.
|
|
20
21
|
*
|
|
21
22
|
* Gating mirrors the web rules: calls need `config.videoCalls.enabled`, a
|
|
22
|
-
* `livekitUrl`, a 1:1 (private)
|
|
23
|
+
* `livekitUrl`, a 1:1 (private) or members-only group room (subject to
|
|
24
|
+
* `allowedRoomTypes`, default both), and no other call already running.
|
|
23
25
|
* Audio is a second opt-in on top of that (`enableAudioCalls`).
|
|
24
26
|
*/
|
|
25
27
|
export const CallButtons: FC = () => {
|
|
@@ -33,10 +35,14 @@ export const CallButtons: FC = () => {
|
|
|
33
35
|
});
|
|
34
36
|
|
|
35
37
|
const videoCallsConfig = config?.videoCalls;
|
|
36
|
-
const allowedRoomTypes = videoCallsConfig?.allowedRoomTypes || ['private'];
|
|
37
38
|
const isVideoCallsEnabled = videoCallsConfig?.enabled === true;
|
|
38
|
-
const
|
|
39
|
-
|
|
39
|
+
const isGroupRoom = currentRoom?.type === 'group';
|
|
40
|
+
// 1:1 chats and members-only group chats can call, subject to the host's
|
|
41
|
+
// videoCalls.allowedRoomTypes (default: both). Public rooms never do.
|
|
42
|
+
const isRoomAllowed = isCallRoomTypeAllowed(
|
|
43
|
+
currentRoom?.type,
|
|
44
|
+
videoCallsConfig?.allowedRoomTypes
|
|
45
|
+
);
|
|
40
46
|
const hasLivekitUrl = Boolean(videoCallsConfig?.livekitUrl?.trim());
|
|
41
47
|
const isCallBusy = call.phase !== 'idle';
|
|
42
48
|
const canCall = isVideoCallsEnabled && isRoomAllowed && hasLivekitUrl;
|
|
@@ -60,12 +66,16 @@ export const CallButtons: FC = () => {
|
|
|
60
66
|
if (!chatName) {return;}
|
|
61
67
|
|
|
62
68
|
// Resolve the peer xmpp localpart so we can XMPP-signal them when we
|
|
63
|
-
// hang up or cancel, without this they'd keep ringing forever.
|
|
69
|
+
// hang up or cancel, without this they'd keep ringing forever. A group
|
|
70
|
+
// call has no single peer to signal; the server rings every member and
|
|
71
|
+
// LiveKit carries the call.
|
|
64
72
|
const selfLocal = String(user?.xmppUsername || '').split('@')[0];
|
|
65
|
-
const peer =
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
73
|
+
const peer = isGroupRoom
|
|
74
|
+
? undefined
|
|
75
|
+
: (currentRoom.members || []).find((member: any) => {
|
|
76
|
+
const mLocal = String(member?.xmppUsername || '').split('@')[0];
|
|
77
|
+
return mLocal && mLocal !== selfLocal;
|
|
78
|
+
});
|
|
69
79
|
const peerXmppUsername = peer?.xmppUsername || null;
|
|
70
80
|
|
|
71
81
|
// Don't show "deleted" / "Deleted User" / "Unknown" as the dial
|
|
@@ -96,6 +106,7 @@ export const CallButtons: FC = () => {
|
|
|
96
106
|
roomBareName: chatName,
|
|
97
107
|
kind,
|
|
98
108
|
peerXmppUsername,
|
|
109
|
+
isGroup: isGroupRoom,
|
|
99
110
|
})
|
|
100
111
|
);
|
|
101
112
|
|
|
@@ -111,7 +122,7 @@ export const CallButtons: FC = () => {
|
|
|
111
122
|
}
|
|
112
123
|
|
|
113
124
|
try {
|
|
114
|
-
await
|
|
125
|
+
await requestOutgoingCall({ chatName, kind, peerXmppUsername });
|
|
115
126
|
} catch (error) {
|
|
116
127
|
const message =
|
|
117
128
|
error instanceof Error
|
|
@@ -120,7 +131,7 @@ export const CallButtons: FC = () => {
|
|
|
120
131
|
dispatch(setCallError(message));
|
|
121
132
|
}
|
|
122
133
|
},
|
|
123
|
-
[canCall, isCallBusy, currentRoom, user?.xmppUsername, dispatch, t]
|
|
134
|
+
[canCall, isCallBusy, currentRoom, isGroupRoom, user?.xmppUsername, dispatch, t]
|
|
124
135
|
);
|
|
125
136
|
|
|
126
137
|
if (!canCall || isCallBusy) {
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
3
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
+
import { VideoCallIcons } from '../../types/types';
|
|
5
|
+
import {
|
|
6
|
+
CameraOffIcon,
|
|
7
|
+
CameraOnIcon,
|
|
8
|
+
HangUpIcon,
|
|
9
|
+
MicOffIcon,
|
|
10
|
+
MicOnIcon,
|
|
11
|
+
SpeakerIcon,
|
|
12
|
+
SpeakerOffIcon,
|
|
13
|
+
SwitchCameraIcon,
|
|
14
|
+
} from './CallIcons';
|
|
15
|
+
import {
|
|
16
|
+
switchCallCamera,
|
|
17
|
+
toggleCallCamera,
|
|
18
|
+
toggleCallMic,
|
|
19
|
+
toggleCallSpeaker,
|
|
20
|
+
} from './callSessionController';
|
|
21
|
+
import type { CallSessionSnapshot } from './callSessionTypes';
|
|
22
|
+
import { useT } from '../../i18n/useT';
|
|
23
|
+
|
|
24
|
+
const TEXT_ON_DARK = '#FFFFFF';
|
|
25
|
+
const DANGER = '#E53935';
|
|
26
|
+
const CONTROL_IDLE = 'rgba(255, 255, 255, 0.16)';
|
|
27
|
+
|
|
28
|
+
interface CallControlBarProps {
|
|
29
|
+
session: Pick<CallSessionSnapshot, 'micOn' | 'cameraOn' | 'speakerOn'>;
|
|
30
|
+
isVideo: boolean;
|
|
31
|
+
icons?: VideoCallIcons;
|
|
32
|
+
onHangup: () => void;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The row of round buttons at the foot of the call screen: mic, camera (and
|
|
37
|
+
* its flip), speaker and hang up. Shared by the 1:1 and the group layout; the
|
|
38
|
+
* controls act on whichever transport carries the call.
|
|
39
|
+
*/
|
|
40
|
+
export const CallControlBar: FC<CallControlBarProps> = ({
|
|
41
|
+
session,
|
|
42
|
+
isVideo,
|
|
43
|
+
icons,
|
|
44
|
+
onHangup,
|
|
45
|
+
}) => {
|
|
46
|
+
const t = useT();
|
|
47
|
+
const insets = useSafeAreaInsets();
|
|
48
|
+
const { micOn, cameraOn, speakerOn } = session;
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<View style={[styles.controls, { paddingBottom: 20 + insets.bottom }]}>
|
|
52
|
+
<TouchableOpacity
|
|
53
|
+
accessibilityRole="button"
|
|
54
|
+
accessibilityLabel={micOn ? t('call.action.muteMic') : t('call.action.unmuteMic')}
|
|
55
|
+
onPress={toggleCallMic}
|
|
56
|
+
style={[styles.controlButton, { backgroundColor: micOn ? CONTROL_IDLE : DANGER }]}
|
|
57
|
+
>
|
|
58
|
+
{micOn
|
|
59
|
+
? (icons?.micOn ?? <MicOnIcon color={TEXT_ON_DARK} />)
|
|
60
|
+
: (icons?.micOff ?? <MicOffIcon color={TEXT_ON_DARK} />)}
|
|
61
|
+
</TouchableOpacity>
|
|
62
|
+
|
|
63
|
+
{isVideo && (
|
|
64
|
+
<TouchableOpacity
|
|
65
|
+
accessibilityRole="button"
|
|
66
|
+
accessibilityLabel={
|
|
67
|
+
cameraOn ? t('call.action.stopCamera') : t('call.action.startCamera')
|
|
68
|
+
}
|
|
69
|
+
onPress={toggleCallCamera}
|
|
70
|
+
style={[styles.controlButton, { backgroundColor: cameraOn ? CONTROL_IDLE : DANGER }]}
|
|
71
|
+
>
|
|
72
|
+
{cameraOn
|
|
73
|
+
? (icons?.cameraOn ?? <CameraOnIcon color={TEXT_ON_DARK} />)
|
|
74
|
+
: (icons?.cameraOff ?? <CameraOffIcon color={TEXT_ON_DARK} />)}
|
|
75
|
+
</TouchableOpacity>
|
|
76
|
+
)}
|
|
77
|
+
|
|
78
|
+
{isVideo && cameraOn && (
|
|
79
|
+
<TouchableOpacity
|
|
80
|
+
accessibilityRole="button"
|
|
81
|
+
accessibilityLabel={t('call.action.switchCamera')}
|
|
82
|
+
onPress={switchCallCamera}
|
|
83
|
+
style={[styles.controlButton, { backgroundColor: CONTROL_IDLE }]}
|
|
84
|
+
>
|
|
85
|
+
<SwitchCameraIcon color={TEXT_ON_DARK} />
|
|
86
|
+
</TouchableOpacity>
|
|
87
|
+
)}
|
|
88
|
+
|
|
89
|
+
<TouchableOpacity
|
|
90
|
+
accessibilityRole="button"
|
|
91
|
+
accessibilityLabel={speakerOn ? t('call.action.speakerOff') : t('call.action.speakerOn')}
|
|
92
|
+
onPress={toggleCallSpeaker}
|
|
93
|
+
style={[styles.controlButton, { backgroundColor: CONTROL_IDLE }]}
|
|
94
|
+
>
|
|
95
|
+
{speakerOn ? <SpeakerIcon color={TEXT_ON_DARK} /> : <SpeakerOffIcon color={TEXT_ON_DARK} />}
|
|
96
|
+
</TouchableOpacity>
|
|
97
|
+
|
|
98
|
+
<TouchableOpacity
|
|
99
|
+
accessibilityRole="button"
|
|
100
|
+
accessibilityLabel={t('call.action.hangUp')}
|
|
101
|
+
onPress={onHangup}
|
|
102
|
+
style={[styles.controlButton, styles.hangupButton]}
|
|
103
|
+
>
|
|
104
|
+
{icons?.hangup ?? <HangUpIcon color={TEXT_ON_DARK} />}
|
|
105
|
+
</TouchableOpacity>
|
|
106
|
+
</View>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const styles = StyleSheet.create({
|
|
111
|
+
controls: {
|
|
112
|
+
flexDirection: 'row',
|
|
113
|
+
alignItems: 'center',
|
|
114
|
+
justifyContent: 'center',
|
|
115
|
+
gap: 16,
|
|
116
|
+
paddingTop: 20,
|
|
117
|
+
paddingHorizontal: 16,
|
|
118
|
+
},
|
|
119
|
+
controlButton: {
|
|
120
|
+
width: 56,
|
|
121
|
+
height: 56,
|
|
122
|
+
borderRadius: 28,
|
|
123
|
+
alignItems: 'center',
|
|
124
|
+
justifyContent: 'center',
|
|
125
|
+
},
|
|
126
|
+
hangupButton: {
|
|
127
|
+
backgroundColor: DANGER,
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
export default CallControlBar;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import { loadWebRTC } from '../../calls/p2p/webrtcRuntime';
|
|
4
|
+
import { loadLiveKit } from './livekitRuntime';
|
|
5
|
+
|
|
6
|
+
interface CallVideoProps {
|
|
7
|
+
/**
|
|
8
|
+
* What the session snapshot hands out: a LiveKit track reference
|
|
9
|
+
* (`{ participant, publication, source }`) or a p2p stream handle
|
|
10
|
+
* (`{ streamURL }`).
|
|
11
|
+
*/
|
|
12
|
+
source: any;
|
|
13
|
+
style?: StyleProp<ViewStyle>;
|
|
14
|
+
objectFit?: 'contain' | 'cover';
|
|
15
|
+
mirror?: boolean;
|
|
16
|
+
zOrder?: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* One video surface of a call, whichever transport it came from: LiveKit's
|
|
21
|
+
* `<VideoTrack />` for a room track, the fork's `<RTCView />` for the stream
|
|
22
|
+
* of a peer to peer connection. Renders nothing when the matching native
|
|
23
|
+
* package is missing.
|
|
24
|
+
*/
|
|
25
|
+
export const CallVideo: FC<CallVideoProps> = ({
|
|
26
|
+
source,
|
|
27
|
+
style,
|
|
28
|
+
objectFit,
|
|
29
|
+
mirror,
|
|
30
|
+
zOrder,
|
|
31
|
+
}) => {
|
|
32
|
+
if (!source) {return null;}
|
|
33
|
+
|
|
34
|
+
if (typeof source.streamURL === 'string') {
|
|
35
|
+
const RTCView = loadWebRTC()?.RTCView;
|
|
36
|
+
return RTCView ? (
|
|
37
|
+
<RTCView
|
|
38
|
+
streamURL={source.streamURL}
|
|
39
|
+
style={style}
|
|
40
|
+
objectFit={objectFit}
|
|
41
|
+
mirror={mirror}
|
|
42
|
+
zOrder={zOrder}
|
|
43
|
+
/>
|
|
44
|
+
) : null;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const VideoTrack = loadLiveKit()?.VideoTrack;
|
|
48
|
+
return VideoTrack ? (
|
|
49
|
+
<VideoTrack
|
|
50
|
+
trackRef={source}
|
|
51
|
+
style={style}
|
|
52
|
+
objectFit={objectFit}
|
|
53
|
+
mirror={mirror}
|
|
54
|
+
zOrder={zOrder}
|
|
55
|
+
/>
|
|
56
|
+
) : null;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default CallVideo;
|