@stream-io/video-react-native-sdk 1.28.3 → 1.29.0-beta.1
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/android/src/main/AndroidManifest.xml +8 -1
- package/android/src/main/AndroidManifestNew.xml +11 -0
- package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNativeModule.kt +42 -5
- package/android/src/main/java/com/streamvideo/reactnative/audio/utils/WebRtcAudioUtils.kt +70 -6
- package/android/src/main/java/com/streamvideo/reactnative/callmanager/StreamInCallManagerModule.kt +6 -4
- package/android/src/main/java/com/streamvideo/reactnative/keepalive/KeepAliveNotification.kt +83 -0
- package/android/src/main/java/com/streamvideo/reactnative/keepalive/StreamCallKeepAliveHeadlessService.kt +134 -0
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsGrid.js +3 -1
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsGrid.js.map +1 -1
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsSpotlight.js +5 -2
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsSpotlight.js.map +1 -1
- package/dist/commonjs/components/Call/CallParticipantsList/CallParticipantsList.js +6 -3
- package/dist/commonjs/components/Call/CallParticipantsList/CallParticipantsList.js.map +1 -1
- package/dist/commonjs/components/Participant/FloatingParticipantView/index.js +3 -1
- package/dist/commonjs/components/Participant/FloatingParticipantView/index.js.map +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/ParticipantView.js +3 -1
- package/dist/commonjs/components/Participant/ParticipantView/ParticipantView.js.map +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/index.js +3 -2
- package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/index.js.map +1 -1
- package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js +216 -0
- package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js.map +1 -0
- package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js +18 -31
- package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
- package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js +64 -97
- package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/commonjs/index.js +1 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/modules/call-manager/CallManager.js +26 -0
- package/dist/commonjs/modules/call-manager/CallManager.js.map +1 -1
- package/dist/commonjs/providers/StreamCall/index.js +6 -6
- package/dist/commonjs/providers/StreamCall/index.js.map +1 -1
- package/dist/commonjs/utils/StreamVideoRN/index.js +33 -21
- package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/commonjs/utils/internal/audioSessionPromise.js +46 -0
- package/dist/commonjs/utils/internal/audioSessionPromise.js.map +1 -0
- package/dist/commonjs/utils/internal/callingx.js +84 -0
- package/dist/commonjs/utils/internal/callingx.js.map +1 -0
- package/dist/commonjs/utils/internal/registerSDKGlobals.js +52 -3
- package/dist/commonjs/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/commonjs/utils/keepCallAliveHeadlessTask.js +48 -0
- package/dist/commonjs/utils/keepCallAliveHeadlessTask.js.map +1 -0
- package/dist/commonjs/utils/push/android.js +145 -200
- package/dist/commonjs/utils/push/android.js.map +1 -1
- package/dist/commonjs/utils/push/internal/ios.js +16 -34
- package/dist/commonjs/utils/push/internal/ios.js.map +1 -1
- package/dist/commonjs/utils/push/internal/rxSubjects.js +1 -20
- package/dist/commonjs/utils/push/internal/rxSubjects.js.map +1 -1
- package/dist/commonjs/utils/push/internal/utils.js +17 -1
- package/dist/commonjs/utils/push/internal/utils.js.map +1 -1
- package/dist/commonjs/utils/push/ios.js.map +1 -1
- package/dist/commonjs/utils/push/libs/callingx.js +75 -0
- package/dist/commonjs/utils/push/libs/callingx.js.map +1 -0
- package/dist/commonjs/utils/push/libs/index.js +8 -19
- package/dist/commonjs/utils/push/libs/index.js.map +1 -1
- package/dist/commonjs/utils/push/libs/notifee/index.js +0 -19
- package/dist/commonjs/utils/push/libs/notifee/index.js.map +1 -1
- package/dist/commonjs/utils/push/setupCallingExpEvents.js +97 -0
- package/dist/commonjs/utils/push/setupCallingExpEvents.js.map +1 -0
- package/dist/commonjs/utils/push/setupIosVoipPushEvents.js +7 -6
- package/dist/commonjs/utils/push/setupIosVoipPushEvents.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/commonjs/version.js.map +1 -1
- package/dist/module/components/Call/CallLayout/CallParticipantsGrid.js +3 -1
- package/dist/module/components/Call/CallLayout/CallParticipantsGrid.js.map +1 -1
- package/dist/module/components/Call/CallLayout/CallParticipantsSpotlight.js +5 -2
- package/dist/module/components/Call/CallLayout/CallParticipantsSpotlight.js.map +1 -1
- package/dist/module/components/Call/CallParticipantsList/CallParticipantsList.js +6 -3
- package/dist/module/components/Call/CallParticipantsList/CallParticipantsList.js.map +1 -1
- package/dist/module/components/Participant/FloatingParticipantView/index.js +3 -1
- package/dist/module/components/Participant/FloatingParticipantView/index.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/ParticipantView.js +3 -1
- package/dist/module/components/Participant/ParticipantView/ParticipantView.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/index.js +3 -2
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/index.js.map +1 -1
- package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js +209 -0
- package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js.map +1 -0
- package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +18 -31
- package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +66 -99
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/modules/call-manager/CallManager.js +26 -0
- package/dist/module/modules/call-manager/CallManager.js.map +1 -1
- package/dist/module/providers/StreamCall/index.js +6 -6
- package/dist/module/providers/StreamCall/index.js.map +1 -1
- package/dist/module/utils/StreamVideoRN/index.js +33 -21
- package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/module/utils/internal/audioSessionPromise.js +39 -0
- package/dist/module/utils/internal/audioSessionPromise.js.map +1 -0
- package/dist/module/utils/internal/callingx.js +75 -0
- package/dist/module/utils/internal/callingx.js.map +1 -0
- package/dist/module/utils/internal/registerSDKGlobals.js +53 -4
- package/dist/module/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/module/utils/keepCallAliveHeadlessTask.js +42 -0
- package/dist/module/utils/keepCallAliveHeadlessTask.js.map +1 -0
- package/dist/module/utils/push/android.js +147 -202
- package/dist/module/utils/push/android.js.map +1 -1
- package/dist/module/utils/push/internal/ios.js +16 -34
- package/dist/module/utils/push/internal/ios.js.map +1 -1
- package/dist/module/utils/push/internal/rxSubjects.js +0 -19
- package/dist/module/utils/push/internal/rxSubjects.js.map +1 -1
- package/dist/module/utils/push/internal/utils.js +14 -0
- package/dist/module/utils/push/internal/utils.js.map +1 -1
- package/dist/module/utils/push/ios.js.map +1 -1
- package/dist/module/utils/push/libs/callingx.js +67 -0
- package/dist/module/utils/push/libs/callingx.js.map +1 -0
- package/dist/module/utils/push/libs/index.js +1 -2
- package/dist/module/utils/push/libs/index.js.map +1 -1
- package/dist/module/utils/push/libs/notifee/index.js +0 -18
- package/dist/module/utils/push/libs/notifee/index.js.map +1 -1
- package/dist/module/utils/push/setupCallingExpEvents.js +91 -0
- package/dist/module/utils/push/setupCallingExpEvents.js.map +1 -0
- package/dist/module/utils/push/setupIosVoipPushEvents.js +7 -6
- package/dist/module/utils/push/setupIosVoipPushEvents.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/module/version.js.map +1 -1
- package/dist/typescript/components/Call/CallLayout/CallParticipantsGrid.d.ts +2 -2
- package/dist/typescript/components/Call/CallLayout/CallParticipantsGrid.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallLayout/CallParticipantsSpotlight.d.ts +2 -2
- package/dist/typescript/components/Call/CallLayout/CallParticipantsSpotlight.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallParticipantsList/CallParticipantsList.d.ts +6 -1
- package/dist/typescript/components/Call/CallParticipantsList/CallParticipantsList.d.ts.map +1 -1
- package/dist/typescript/components/Participant/FloatingParticipantView/index.d.ts +2 -2
- package/dist/typescript/components/Participant/FloatingParticipantView/index.d.ts.map +1 -1
- package/dist/typescript/components/Participant/ParticipantView/ParticipantView.d.ts +6 -1
- package/dist/typescript/components/Participant/ParticipantView/ParticipantView.d.ts.map +1 -1
- package/dist/typescript/components/Participant/ParticipantView/VideoRenderer/index.d.ts +2 -2
- package/dist/typescript/components/Participant/ParticipantView/VideoRenderer/index.d.ts.map +1 -1
- package/dist/typescript/hooks/push/useCallingExpWithCallingStateEffect.d.ts +5 -0
- package/dist/typescript/hooks/push/useCallingExpWithCallingStateEffect.d.ts.map +1 -0
- package/dist/typescript/hooks/push/useIosVoipPushEventsSetupEffect.d.ts.map +1 -1
- package/dist/typescript/hooks/useAndroidKeepCallAliveEffect.d.ts.map +1 -1
- package/dist/typescript/index.d.ts +1 -0
- package/dist/typescript/index.d.ts.map +1 -1
- package/dist/typescript/modules/call-manager/CallManager.d.ts +5 -0
- package/dist/typescript/modules/call-manager/CallManager.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/index.d.ts +20 -2
- package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/types.d.ts +54 -29
- package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
- package/dist/typescript/utils/internal/audioSessionPromise.d.ts +16 -0
- package/dist/typescript/utils/internal/audioSessionPromise.d.ts.map +1 -0
- package/dist/typescript/utils/internal/callingx.d.ts +13 -0
- package/dist/typescript/utils/internal/callingx.d.ts.map +1 -0
- package/dist/typescript/utils/internal/registerSDKGlobals.d.ts.map +1 -1
- package/dist/typescript/utils/keepCallAliveHeadlessTask.d.ts +10 -0
- package/dist/typescript/utils/keepCallAliveHeadlessTask.d.ts.map +1 -0
- package/dist/typescript/utils/push/android.d.ts +1 -2
- package/dist/typescript/utils/push/android.d.ts.map +1 -1
- package/dist/typescript/utils/push/internal/ios.d.ts.map +1 -1
- package/dist/typescript/utils/push/internal/rxSubjects.d.ts +0 -12
- package/dist/typescript/utils/push/internal/rxSubjects.d.ts.map +1 -1
- package/dist/typescript/utils/push/internal/utils.d.ts +4 -0
- package/dist/typescript/utils/push/internal/utils.d.ts.map +1 -1
- package/dist/typescript/utils/push/ios.d.ts +1 -2
- package/dist/typescript/utils/push/ios.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/callingx.d.ts +9 -0
- package/dist/typescript/utils/push/libs/callingx.d.ts.map +1 -0
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts +16 -2
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/index.d.ts +1 -2
- package/dist/typescript/utils/push/libs/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/notifee/index.d.ts +0 -1
- package/dist/typescript/utils/push/libs/notifee/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/setupCallingExpEvents.d.ts +8 -0
- package/dist/typescript/utils/push/setupCallingExpEvents.d.ts.map +1 -0
- package/dist/typescript/utils/push/setupIosVoipPushEvents.d.ts.map +1 -1
- package/dist/typescript/version.d.ts +1 -1
- package/dist/typescript/version.d.ts.map +1 -1
- package/expo-config-plugin/dist/withAndroidManifest.js +1 -33
- package/expo-config-plugin/dist/withAndroidPermissions.js +2 -7
- package/expo-config-plugin/dist/withAppDelegate.js +19 -197
- package/expo-config-plugin/dist/withMainActivity.js +1 -1
- package/expo-config-plugin/dist/withiOSInfoPlist.js +2 -3
- package/ios/StreamInCallManager.m +2 -0
- package/ios/StreamInCallManager.swift +20 -5
- package/ios/StreamVideoReactNative.h +7 -4
- package/ios/StreamVideoReactNative.m +191 -82
- package/package.json +10 -15
- package/src/components/Call/CallLayout/CallParticipantsGrid.tsx +3 -1
- package/src/components/Call/CallLayout/CallParticipantsSpotlight.tsx +4 -1
- package/src/components/Call/CallParticipantsList/CallParticipantsList.tsx +8 -0
- package/src/components/Participant/FloatingParticipantView/index.tsx +3 -1
- package/src/components/Participant/ParticipantView/ParticipantView.tsx +7 -0
- package/src/components/Participant/ParticipantView/VideoRenderer/index.tsx +7 -2
- package/src/hooks/push/useCallingExpWithCallingStateEffect.ts +307 -0
- package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +21 -34
- package/src/hooks/useAndroidKeepCallAliveEffect.ts +94 -120
- package/src/index.ts +1 -0
- package/src/modules/call-manager/CallManager.ts +36 -0
- package/src/modules/call-manager/native-module.d.ts +7 -0
- package/src/providers/StreamCall/index.tsx +6 -6
- package/src/utils/StreamVideoRN/index.ts +40 -30
- package/src/utils/StreamVideoRN/types.ts +56 -29
- package/src/utils/internal/audioSessionPromise.ts +39 -0
- package/src/utils/internal/callingx.ts +108 -0
- package/src/utils/internal/registerSDKGlobals.ts +47 -4
- package/src/utils/keepCallAliveHeadlessTask.ts +54 -0
- package/src/utils/push/android.ts +223 -308
- package/src/utils/push/internal/ios.ts +25 -46
- package/src/utils/push/internal/rxSubjects.ts +0 -29
- package/src/utils/push/internal/utils.ts +25 -0
- package/src/utils/push/ios.ts +1 -6
- package/src/utils/push/libs/callingx.ts +90 -0
- package/src/utils/push/libs/index.ts +1 -2
- package/src/utils/push/libs/notifee/index.ts +0 -27
- package/src/utils/push/setupCallingExpEvents.ts +117 -0
- package/src/utils/push/setupIosVoipPushEvents.ts +11 -7
- package/src/version.ts +1 -1
- package/CHANGELOG.md +0 -3103
- package/android/src/main/java/com/streamvideo/reactnative/util/CallAliveServiceChecker.kt +0 -95
- package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js +0 -160
- package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +0 -1
- package/dist/commonjs/utils/push/libs/callkeep.js +0 -17
- package/dist/commonjs/utils/push/libs/callkeep.js.map +0 -1
- package/dist/commonjs/utils/push/libs/voipPushNotification.js +0 -17
- package/dist/commonjs/utils/push/libs/voipPushNotification.js.map +0 -1
- package/dist/commonjs/utils/push/setupIosCallKeepEvents.js +0 -205
- package/dist/commonjs/utils/push/setupIosCallKeepEvents.js.map +0 -1
- package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js +0 -153
- package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +0 -1
- package/dist/module/utils/push/libs/callkeep.js +0 -11
- package/dist/module/utils/push/libs/callkeep.js.map +0 -1
- package/dist/module/utils/push/libs/voipPushNotification.js +0 -11
- package/dist/module/utils/push/libs/voipPushNotification.js.map +0 -1
- package/dist/module/utils/push/setupIosCallKeepEvents.js +0 -199
- package/dist/module/utils/push/setupIosCallKeepEvents.js.map +0 -1
- package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts +0 -5
- package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts.map +0 -1
- package/dist/typescript/utils/push/libs/callkeep.d.ts +0 -3
- package/dist/typescript/utils/push/libs/callkeep.d.ts.map +0 -1
- package/dist/typescript/utils/push/libs/voipPushNotification.d.ts +0 -3
- package/dist/typescript/utils/push/libs/voipPushNotification.d.ts.map +0 -1
- package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts +0 -6
- package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts.map +0 -1
- package/src/hooks/push/useIosCallkeepWithCallingStateEffect.ts +0 -235
- package/src/utils/push/libs/callkeep.ts +0 -16
- package/src/utils/push/libs/voipPushNotification.ts +0 -17
- package/src/utils/push/setupIosCallKeepEvents.ts +0 -252
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CallingState","videoLoggerSystem","AppState","Platform","getExpoNotificationsLib","getExpoNotificationsLibNoThrow","getFirebaseMessagingLib","getFirebaseMessagingLibNoThrow","getIncomingCallForegroundServiceTypes","getNotifeeLibThrowIfNotInstalledForPush","pushAcceptedIncomingCallCId$","pushAndroidBackgroundDeliveredIncomingCallCId$","pushNonRingingCallData$","pushRejectedIncomingCallCId$","pushTappedIncomingCallCId$","pushUnsubscriptionCallbacks","canAddPushWSSubscriptionsRef","clearPushWSEventSubscriptions","processCallFromPushInBackground","shouldCallBeEnded","setPushLogoutCallback","getAndroidDefaultRingtoneUrl","StreamVideoRN","ACCEPT_CALL_ACTION_ID","DECLINE_CALL_ACTION_ID","lastFirebaseToken","token","userId","initAndroidPushToken","client","pushConfig","setUnsubscribeListener","OS","android","pushProviderName","logger","getLogger","setDeviceToken","streamClient","_user","id","anonymous","debug","removeDevice","err","warn","push_provider_name","addDevice","isExpo","expoNotificationsLib","onTapNonRingingCallNotification","subscription","addPushTokenListener","devicePushToken","data","remove","getDevicePushTokenAsync","messaging","incomingCallChannel","unsubscribe","onTokenRefresh","refreshedToken","getToken","firebaseDataHandler","getConfig","push","sender","notifeeLib","notifee","default","settings","getNotificationSettings","authorizationStatus","type","call_cid","created_by_id","receiver_id","video_client","createStreamVideoClient","onRingingCall","shouldCallBeClosed","callToCheck","mustEndCall","canListenToWS","current","currentState","asForegroundService","registerForegroundService","Promise","stopForegroundService","callFromPush","_shouldCallBeClosed","unsubscribeFunctions","on","event","_canListenToWS","forEach","fn","state","callingState$","subscribe","callingState","IDLE","LEFT","get","cb","set","incomingCallNotificationTextGetters","error","sound","createChannel","getTitle","getBody","getAcceptButtonTitle","getDeclineButtonTitle","createdUserName","created_by_display_name","title","body","channelId","displayNotification","smallIcon","importance","foregroundServiceTypes","ongoing","vibrationPattern","loopSound","pressAction","launchActivity","actions","category","AndroidCategory","CALL","fullScreenAction","timeoutAfter","cancelDisplayedNotification","callChannel","callNotificationTextGetters","cid","next","onAndroidNotifeeEvent","isBackground","detail","notification","notificationId","hasObservers","observed","didPressDecline","EventType","ACTION_PRESS","didDismiss","DISMISSED","mustDecline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AC,CAAC;IAC5D,IAAIgE,IAAI,KAAKN,UAAU,CAACiF,SAAS,CAACM,KAAK,EAAE;MACvCzJ,iBAAiB,CACdmC,SAAS,CAAC,uBAAuB,CAAC,CAClCM,KAAK,CAAC,iDAAiDgC,QAAQ,EAAE,CAAC;MACrE5C,UAAU,CAACoB,+BAA+B,GACxCwB,QAAQ,EACRpB,IAAI,CAACmB,IACP,CAAC;IACH;EACF;AACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["CallingState","videoLoggerSystem","AppState","Platform","getExpoNotificationsLib","getExpoNotificationsLibNoThrow","getFirebaseMessagingLib","getFirebaseMessagingLibNoThrow","getNotifeeLibThrowIfNotInstalledForPush","pushNonRingingCallData$","pushUnsubscriptionCallbacks","canListenToWS","shouldCallBeClosed","setPushLogoutCallback","StreamVideoRN","getCallingxLib","lastFirebaseToken","token","userId","initAndroidPushToken","client","pushConfig","setUnsubscribeListener","OS","android","pushProviderName","logger","getLogger","setDeviceToken","streamClient","_user","id","anonymous","debug","removeDevice","err","warn","push_provider_name","addDevice","isExpo","expoNotificationsLib","onTapNonRingingCallNotification","subscription","addPushTokenListener","devicePushToken","data","remove","getDevicePushTokenAsync","messaging","unsubscribe","onTokenRefresh","refreshedToken","getToken","firebaseDataHandler","getConfig","push","sender","type","call_cid","callingx","checkPermissions","isNotificationsAllowed","createStreamVideoClient","shouldRejectCallWhenBusy","hasRegisteredCall","asForegroundService","callerName","created_by_display_name","hasVideo","video","registerBackgroundTask","_","stopTask","Promise","resolve","finishBackgroundTask","log","undefined","_client","callFromPush","onRingingCall","endCallWithReason","unsubscribeFunctions","on","event","_canListenToWS","forEach","fn","stateSubscription","state","callingState$","subscribe","callingState","IDLE","LEFT","endCallSubscription","addEventListener","callId","leave","reject","reason","error","appStateSubscription","nextAppState","get","cb","set","displayIncomingCall","notifeeLib","notifee","default","settings","getNotificationSettings","authorizationStatus","callChannel","callNotificationTextGetters","createChannel","channelId","getTitle","getBody","createdUserName","title","body","displayNotification","sound","smallIcon","vibrationPattern","importance","pressAction","launchActivity","timeoutAfter","cid","next","onAndroidNotifeeEvent","detail","notification","notificationId","EventType","PRESS"],"sourceRoot":"../../../../src","sources":["utils/push/android.ts"],"mappings":"AAAA,SACEA,YAAY,EAEZC,iBAAiB,QACZ,yBAAyB;AAChC,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AAKjD,SAEEC,uBAAuB,EACvBC,8BAA8B,EAC9BC,uBAAuB,EACvBC,8BAA8B,EAC9BC,uCAAuC,QAElC,QAAQ;AACf,SAASC,uBAAuB,QAAQ,uBAAuB;AAC/D,SAASC,2BAA2B,QAAQ,sBAAsB;AAClE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,kBAAkB;AACpE,SAASC,qBAAqB,QAAQ,gCAAgC;AACtE,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,cAAc,QAAQ,iBAAiB;AAUhD,IAAIC,iBAAiB,GAAG;EAAEC,KAAK,EAAE,EAAE;EAAEC,MAAM,EAAE;AAAG,CAAC;;AAEjD;AACA,OAAO,eAAeC,oBAAoBA,CACxCC,MAAyB,EACzBC,UAAsB,EACtBC,sBAAyD,EACzD;EACA,IAAInB,QAAQ,CAACoB,EAAE,KAAK,SAAS,IAAI,CAACF,UAAU,CAACG,OAAO,CAACC,gBAAgB,EAAE;IACrE;EACF;EACA,MAAMC,MAAM,GAAGzB,iBAAiB,CAAC0B,SAAS,CAAC,sBAAsB,CAAC;EAClE,MAAMC,cAAc,GAAG,MAAOX,KAAa,IAAK;IAC9C,MAAMC,MAAM,GAAGE,MAAM,CAACS,YAAY,CAACC,KAAK,EAAEC,EAAE,IAAI,EAAE;IAClD,IAAIX,MAAM,CAACS,YAAY,CAACG,SAAS,EAAE;MACjCN,MAAM,CAACO,KAAK,CAAC,mDAAmD,CAAC;MACjE;IACF;IACA,IACEjB,iBAAiB,CAACC,KAAK,KAAKA,KAAK,IACjCD,iBAAiB,CAACE,MAAM,KAAKA,MAAM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,KAAK,cAAc,EAC9B;IACA;EACF;;EAEA;EACA,MAAME,QAAQ,GAAGb,IAAI,CAACa,QAAkB;EAExC,MAAMkD,UAAU,GAAGpG,uCAAuC,CAAC,CAAC;EAC5D,IAAIiD,IAAI,KAAKmD,UAAU,CAAC6B,SAAS,CAACC,KAAK,EAAE;IACvCzI,iBAAiB,CACd0B,SAAS,CAAC,uBAAuB,CAAC,CAClCM,KAAK,CAAC,iDAAiDyB,QAAQ,EAAE,CAAC;IACrErC,UAAU,CAACoB,+BAA+B,GACxCiB,QAAQ,EACRb,IAAI,CAACY,IACP,CAAC;EACH;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getCallKeepLib, getVoipPushNotificationLib } from '../libs';
|
|
3
|
-
import { voipPushNotificationCallCId$ } from './rxSubjects';
|
|
1
|
+
import { Platform } from 'react-native';
|
|
4
2
|
import { pushUnsubscriptionCallbacks } from './constants';
|
|
5
|
-
import {
|
|
3
|
+
import { canListenToWS, shouldCallBeClosed } from './utils';
|
|
6
4
|
import { videoLoggerSystem } from '@stream-io/video-client';
|
|
5
|
+
import { getCallingxLib } from '../libs/callingx';
|
|
7
6
|
export const onVoipNotificationReceived = async (notification, pushConfig) => {
|
|
8
7
|
/* --- Example payload ---
|
|
9
8
|
{
|
|
@@ -27,6 +26,7 @@ export const onVoipNotificationReceived = async (notification, pushConfig) => {
|
|
|
27
26
|
"version": "v2"
|
|
28
27
|
}
|
|
29
28
|
} */
|
|
29
|
+
const logger = videoLoggerSystem.getLogger('setupIosVoipPushEvents');
|
|
30
30
|
const sender = notification?.stream?.sender;
|
|
31
31
|
const type = notification?.stream?.type;
|
|
32
32
|
// do not process any other notifications other than stream.video or ringing
|
|
@@ -37,47 +37,29 @@ export const onVoipNotificationReceived = async (notification, pushConfig) => {
|
|
|
37
37
|
if (!call_cid || Platform.OS !== 'ios' || !pushConfig.ios.pushProviderName) {
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
|
-
const
|
|
40
|
+
const callingx = getCallingxLib();
|
|
41
|
+
if (callingx.isCallRegistered(call_cid)) {
|
|
42
|
+
//same call_cid is registered, so we skipping the notification
|
|
43
|
+
logger.debug(`the same call_cid ${call_cid} is registered, skipping the call.ring notification`);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
41
46
|
const client = await pushConfig.createStreamVideoClient();
|
|
42
47
|
if (!client) {
|
|
43
48
|
logger.debug('client not found, not processing call.ring voip push notification');
|
|
44
49
|
return;
|
|
45
50
|
}
|
|
46
|
-
const shouldRejectCallWhenBusy = client['rejectCallWhenBusy'] ?? false;
|
|
47
|
-
if (shouldRejectCallWhenBusy) {
|
|
48
|
-
// inform the iOS native module that we should reject call when busy
|
|
49
|
-
NativeModules.StreamVideoReactNative.setShouldRejectCallWhenBusy(shouldRejectCallWhenBusy);
|
|
50
|
-
}
|
|
51
51
|
const callFromPush = await client.onRingingCall(call_cid);
|
|
52
|
-
let uuid = '';
|
|
53
|
-
try {
|
|
54
|
-
uuid = await NativeModules?.StreamVideoReactNative?.getIncomingCallUUid(call_cid);
|
|
55
|
-
} catch (error) {
|
|
56
|
-
logger.error('Error in getting call uuid from native module', error);
|
|
57
|
-
}
|
|
58
|
-
if (!uuid) {
|
|
59
|
-
logger.error(`Not processing call.ring push notification, as no uuid found for call_cid: ${call_cid}`);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const created_by_id = notification?.stream?.created_by_id;
|
|
63
|
-
const receiver_id = notification?.stream?.receiver_id;
|
|
64
52
|
function closeCallIfNecessary() {
|
|
65
|
-
const
|
|
66
|
-
mustEndCall,
|
|
67
|
-
callkeepReason
|
|
68
|
-
} = shouldCallBeEnded(callFromPush, created_by_id, receiver_id);
|
|
53
|
+
const mustEndCall = shouldCallBeClosed(callFromPush, notification?.stream);
|
|
69
54
|
if (mustEndCall) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const voipPushNotification = getVoipPushNotificationLib();
|
|
74
|
-
voipPushNotification.onVoipNotificationCompleted(uuid);
|
|
55
|
+
logger.debug(`callkeep.reportEndCallWithUUID for call_cid: ${call_cid}`);
|
|
56
|
+
//TODO: think about sending appropriate reason for end call
|
|
57
|
+
callingx.endCallWithReason(call_cid, 'local');
|
|
75
58
|
return true;
|
|
76
59
|
}
|
|
77
60
|
return false;
|
|
78
61
|
}
|
|
79
62
|
const closed = closeCallIfNecessary();
|
|
80
|
-
const canListenToWS = () => canAddPushWSSubscriptionsRef.current && AppState.currentState !== 'active';
|
|
81
63
|
if (!closed && canListenToWS()) {
|
|
82
64
|
const unsubscribe = callFromPush.on('all', event => {
|
|
83
65
|
const _canListenToWS = canListenToWS();
|
|
@@ -95,9 +77,9 @@ export const onVoipNotificationReceived = async (notification, pushConfig) => {
|
|
|
95
77
|
pushUnsubscriptionCallbacks.get(call_cid)?.forEach(cb => cb());
|
|
96
78
|
pushUnsubscriptionCallbacks.set(call_cid, [unsubscribe]);
|
|
97
79
|
}
|
|
80
|
+
|
|
98
81
|
// send the info to this subject, it is listened by callkeep events
|
|
99
82
|
// callkeep events will then accept/reject the call
|
|
100
|
-
logger.debug(`call_cid:${call_cid}
|
|
101
|
-
voipPushNotificationCallCId$.next(call_cid);
|
|
83
|
+
logger.debug(`call_cid:${call_cid} received and processed from call.ring push notification`);
|
|
102
84
|
};
|
|
103
85
|
//# sourceMappingURL=ios.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["Platform","pushUnsubscriptionCallbacks","canListenToWS","shouldCallBeClosed","videoLoggerSystem","getCallingxLib","onVoipNotificationReceived","notification","pushConfig","logger","getLogger","sender","stream","type","call_cid","OS","ios","pushProviderName","callingx","isCallRegistered","debug","client","createStreamVideoClient","callFromPush","onRingingCall","closeCallIfNecessary","mustEndCall","endCallWithReason","closed","unsubscribe","on","event","_canListenToWS","_closed","get","forEach","cb","set"],"sourceRoot":"../../../../../src","s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,23 +29,4 @@ export const pushAndroidBackgroundDeliveredIncomingCallCId$ = new BehaviorSubjec
|
|
|
29
29
|
* Note: it should be subscribed only when a user has connected to the websocket of Stream
|
|
30
30
|
*/
|
|
31
31
|
export const pushRejectedIncomingCallCId$ = new BehaviorSubject(undefined);
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* This rxjs subject is used to store the call cid of the incoming call from ios voip pushkit notification
|
|
35
|
-
*/
|
|
36
|
-
export const voipPushNotificationCallCId$ = new BehaviorSubject(undefined);
|
|
37
|
-
|
|
38
|
-
/** The pair of cid of a call and its corresponding uuid created in the native side */
|
|
39
|
-
|
|
40
|
-
/*
|
|
41
|
-
* This rxjs subject should only used to store the CallkeepMap
|
|
42
|
-
* for the incoming call when on foreground
|
|
43
|
-
* or in other words, when we get didDisplayIncomingCall from callkeep lib
|
|
44
|
-
*/
|
|
45
|
-
export const voipCallkeepCallOnForegroundMap$ = new BehaviorSubject(undefined);
|
|
46
|
-
|
|
47
|
-
/*
|
|
48
|
-
* This rxjs subject should only used to store the CallkeepMap when it was accepted in the native dialer
|
|
49
|
-
*/
|
|
50
|
-
export const voipCallkeepAcceptedCallOnNativeDialerMap$ = new BehaviorSubject(undefined);
|
|
51
32
|
//# sourceMappingURL=rxSubjects.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BehaviorSubject","pushNonRingingCallData$","undefined","pushAcceptedIncomingCallCId$","pushTappedIncomingCallCId$","pushAndroidBackgroundDeliveredIncomingCallCId$","pushRejectedIncomingCallCId$"
|
|
1
|
+
{"version":3,"names":["BehaviorSubject","pushNonRingingCallData$","undefined","pushAcceptedIncomingCallCId$","pushTappedIncomingCallCId$","pushAndroidBackgroundDeliveredIncomingCallCId$","pushRejectedIncomingCallCId$"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/rxSubjects.ts"],"mappings":"AAAA,SAASA,eAAe,QAAQ,MAAM;AAGtC;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,IAAID,eAAe,CAExDE,SAAS,CAAC;;AAEZ;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,IAAIH,eAAe,CAE7DE,SAAS,CAAC;;AAEZ;AACA;AACA;AACA;AACA,OAAO,MAAME,0BAA0B,GAAG,IAAIJ,eAAe,CAE3DE,SAAS,CAAC;;AAEZ;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMG,8CAA8C,GACzD,IAAIL,eAAe,CAAqBE,SAAS,CAAC;;AAEpD;AACA;AACA;AACA;AACA,OAAO,MAAMI,4BAA4B,GAAG,IAAIN,eAAe,CAE7DE,SAAS,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CallingState, videoLoggerSystem } from '@stream-io/video-client';
|
|
2
2
|
import { onNewCallNotification } from '../../internal/newNotificationCallbacks';
|
|
3
3
|
import { pushUnsubscriptionCallbacks } from './constants';
|
|
4
|
+
import { AppState } from 'react-native';
|
|
4
5
|
/**
|
|
5
6
|
* This function is used to check if the call should be ended based on the push notification
|
|
6
7
|
* Useful for callkeep management to end the call if necessary (with reportEndCallWithUUID)
|
|
@@ -87,6 +88,10 @@ export const processCallFromPush = async (client, call_cid, action, pushConfig)
|
|
|
87
88
|
callFromPush.updatePublishOptions(pushConfig.publishOptions);
|
|
88
89
|
}
|
|
89
90
|
videoLoggerSystem.getLogger('processCallFromPush').debug(`joining call from push notification with callCid: ${callFromPush.cid}`);
|
|
91
|
+
if (callFromPush.state.callingState === CallingState.JOINED) {
|
|
92
|
+
videoLoggerSystem.getLogger('processCallFromPush').debug(`call already joined from push notification with callCid: ${callFromPush.cid}`);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
90
95
|
await callFromPush.join();
|
|
91
96
|
} else if (action === 'decline') {
|
|
92
97
|
const canReject = callFromPush.state.callingState === CallingState.RINGING;
|
|
@@ -148,4 +153,13 @@ export const clearPushWSEventSubscriptions = call_cid => {
|
|
|
148
153
|
export const canAddPushWSSubscriptionsRef = {
|
|
149
154
|
current: true
|
|
150
155
|
};
|
|
156
|
+
export const canListenToWS = () => canAddPushWSSubscriptionsRef.current && AppState.currentState !== 'active';
|
|
157
|
+
export const shouldCallBeClosed = (call, pushData) => {
|
|
158
|
+
const created_by_id = pushData?.created_by_id;
|
|
159
|
+
const receiver_id = pushData?.receiver_id;
|
|
160
|
+
const {
|
|
161
|
+
mustEndCall
|
|
162
|
+
} = shouldCallBeEnded(call, created_by_id, receiver_id);
|
|
163
|
+
return mustEndCall;
|
|
164
|
+
};
|
|
151
165
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CallingState","videoLoggerSystem","onNewCallNotification","pushUnsubscriptionCallbacks","shouldCallBeEnded","callFromPush","created_by_id","receiver_id","callSession","state","session","rejected_by","accepted_by","mustEndCall","callkeepReason","getLogger","debug","cid","processCallFromPushInBackground","pushConfig","call_cid","action","videoClient","createStreamVideoClient","e","logger","error","processCallFromPush","client","onRingingCall","publishOptions","updatePublishOptions","
|
|
1
|
+
{"version":3,"names":["CallingState","videoLoggerSystem","onNewCallNotification","pushUnsubscriptionCallbacks","AppState","shouldCallBeEnded","callFromPush","created_by_id","receiver_id","callSession","state","session","rejected_by","accepted_by","mustEndCall","callkeepReason","getLogger","debug","cid","processCallFromPushInBackground","pushConfig","call_cid","action","videoClient","createStreamVideoClient","e","logger","error","processCallFromPush","client","onRingingCall","publishOptions","updatePublishOptions","callingState","JOINED","join","canReject","RINGING","leave","reject","reason","warn","processNonIncomingCallFromPush","nonRingingNotificationType","_callFromPush","calls","find","c","callType","callId","split","call","get","clearPushWSEventSubscriptions","unsubscriptionCallbacks","forEach","cb","delete","canAddPushWSSubscriptionsRef","current","canListenToWS","currentState","shouldCallBeClosed","pushData"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/utils.ts"],"mappings":"AAAA,SAEEA,YAAY,EAEZC,iBAAiB,QACZ,yBAAyB;AAKhC,SAASC,qBA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AC,CAAC,OAAO3B,CAAC,EAAE;IACV,MAAMC,MAAM,GAAGzB,iBAAiB,CAACe,SAAS,CACxC,gCACF,CAAC;IACDU,MAAM,CAACC,KAAK,CAAC,6CAA6C,EAAEF,CAAC,CAAC;IAC9D;EACF;EACAvB,qBAAqB,CAACI,YAAY,EAAEqC,0BAA0B,CAAC;AACjE,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMU,6BAA6B,GAAIhC,QAAgB,IAAK;EACjE,MAAMiC,uBAAuB,GAAGnD,2BAA2B,CAACiD,GAAG,CAAC/B,QAAQ,CAAC;EACzE,IAAIiC,uBAAuB,EAAE;IAC3BA,uBAAuB,CAACC,OAAO,CAAEC,EAAE,IAAKA,EAAE,CAAC,CAAC,CAAC;IAC7CrD,2BAA2B,CAACsD,MAAM,CAACpC,QAAQ,CAAC;EAC9C;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMqC,4BAA0D,GAAG;EACxEC,OAAO,EAAE;AACX,CAAC;AAED,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAC3BF,4BAA4B,CAACC,OAAO,IAAIvD,QAAQ,CAACyD,YAAY,KAAK,QAAQ;AAE5E,OAAO,MAAMC,kBAAkB,GAAGA,CAChCX,IAAU,EACVY,QAA4C,KACzC;EACH,MAAMxD,aAAa,GAAGwD,QAAQ,EAAExD,aAAuB;EACvD,MAAMC,WAAW,GAAGuD,QAAQ,EAAEvD,WAAqB;EAEnD,MAAM;IAAEM;EAAY,CAAC,GAAGT,iBAAiB,CAAC8C,IAAI,EAAE5C,aAAa,EAAEC,WAAW,CAAC;EAC3E,OAAOM,WAAW;AACpB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","pushNonRingingCallData$","getExpoNotificationsLib","getNotifeeLibThrowIfNotInstalledForPush","getPushNotificationIosLib","videoLoggerSystem","setPushLogoutCallback","StreamVideoRN","lastApnToken","token","userId","processNonRingingNotificationStreamPayload","streamPayload","sender","type","cid","call_cid","logger","getLogger","trace","next","undefined","oniOSExpoNotificationEvent","event","pushConfig","getConfig","push","trigger","request","payload","stream","JSON","stringify","oniOSNotifeeEvent","OS","detail","notifeeLib","EventType","PRESS","notification","data","result","debug","onTapNonRingingCallNotification","onPushNotificationiOSStreamVideoEvent","pushNotificationIosLib","getData","isClicked","userInteraction","finish","FetchResult","NoData","initIosNonVoipToken","client","setUnsubscribeListener","ios","pushProviderName","setDeviceToken","streamClient","_user","id","removeDevice","err","warn","push_provider_name","addDevice","then","catch","isExpo","expoNotificationsLib","getDevicePushTokenAsync","devicePushToken","subscription","addPushTokenListener","remove","addEventListener","removeEventListener"],"sourceRoot":"../../../../src","sources":["utils/push/ios.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SAASC,uBAAuB,QAAQ,uBAAuB;AAC/D,SAEEC,uBAAuB,EACvBC,uCAAuC,EACvCC,yBAAyB,QAEpB,QAAQ;AACf,SAA4BC,iBAAiB,QAAQ,yBAAyB;AAC9E,SAASC,qBAAqB,QAAQ,gCAAgC;AAEtE,SAASC,aAAa,QAAQ,kBAAkB;AAKhD,IAAIC,YAAY,GAAG;EAAEC,KAAK,EAAE,EAAE;EAAEC,MAAM,EAAE;AAAG,CAAC;AAE5C,SAASC,0CAA0CA,CACjDC,aAAgC,EAChC;EACA,IACEA,aAAa,EAAEC,MAAM,KAAK,cAAc,IACxCD,aAAa,EAAEE,IAAI,KAAK,WAAW,EACnC;IACA,MAAMC,GAAG,GAAGH,aAAa,CAACI,QAAQ;IAClC,MAAMF,IAAI,GAAGF,aAAa,CAACE,IAAI;IAC/B,MAAMG,MAAM,GAAGZ,iBAAiB,CAACa,SAAS,CACxC,4CACF,CAAC;IACDD,MAAM,CAACE,KAAK,CAAC,eAAeJ,GAAG,KAAKD,IAAI,EAAE,CAAC;IAC3Cb,uBAAuB,CAACmB,IAAI,CAAC;MAAEL,GAAG;MAAED;IAAK,CAAC,CAAC;IAC3C,OAAO;MAAEC,GAAG;MAAED;IAAK,CAAC;EACtB;EACA,OAAOO,SAAS;AAClB;AAEA,OAAO,MAAMC,0BAA0B,GAAIC,KAAuB,IAAK;EACrE,MAAMC,UAAU,GAAGjB,aAAa,CAACkB,SAAS,CAAC,CAAC,CAACC,IAAI;EACjD,IAAIF,UAAU,EAAE;IACd,MAAMG,OAAO,GAAGJ,KAAK,CAACK,OAAO,CAACD,OAAO;IACrC,IACEA,OAAO,IACP,OAAOA,OAAO,KAAK,QAAQ,IAC3B,MAAM,IAAIA,OAAO,IACjBA,OAAO,CAACb,IAAI,KAAK,MAAM,IACvBa,OAAO,CAACE,OAAO,EAAEC,MAAM,EACvB;MACA,MAAMlB,aAAa,GAAGe,OAAO,CAACE,OAAO,CAACC,MAA2B;MACjE,MAAMb,MAAM,GAAGZ,iBAAiB,CAACa,SAAS,CACxC,4CACF,CAAC;MACDD,MAAM,CAACE,KAAK,CACV,gDAAgDY,IAAI,CAACC,SAAS,CAC5DpB,aACF,CAAC,EACH,CAAC;MACDD,0CAA0C,CAACC,aAAa,CAAC;IAC3D;EACF;AACF,CAAC;AAED,OAAO,MAAMqB,iBAAiB,GAAGA,CAAC;
|
|
1
|
+
{"version":3,"names":["Platform","pushNonRingingCallData$","getExpoNotificationsLib","getNotifeeLibThrowIfNotInstalledForPush","getPushNotificationIosLib","videoLoggerSystem","setPushLogoutCallback","StreamVideoRN","lastApnToken","token","userId","processNonRingingNotificationStreamPayload","streamPayload","sender","type","cid","call_cid","logger","getLogger","trace","next","undefined","oniOSExpoNotificationEvent","event","pushConfig","getConfig","push","trigger","request","payload","stream","JSON","stringify","oniOSNotifeeEvent","OS","detail","notifeeLib","EventType","PRESS","notification","data","result","debug","onTapNonRingingCallNotification","onPushNotificationiOSStreamVideoEvent","pushNotificationIosLib","getData","isClicked","userInteraction","finish","FetchResult","NoData","initIosNonVoipToken","client","setUnsubscribeListener","ios","pushProviderName","setDeviceToken","streamClient","_user","id","removeDevice","err","warn","push_provider_name","addDevice","then","catch","isExpo","expoNotificationsLib","getDevicePushTokenAsync","devicePushToken","subscription","addPushTokenListener","remove","addEventListener","removeEventListener"],"sourceRoot":"../../../../src","sources":["utils/push/ios.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SAASC,uBAAuB,QAAQ,uBAAuB;AAC/D,SAEEC,uBAAuB,EACvBC,uCAAuC,EACvCC,yBAAyB,QAEpB,QAAQ;AACf,SAA4BC,iBAAiB,QAAQ,yBAAyB;AAC9E,SAASC,qBAAqB,QAAQ,gCAAgC;AAEtE,SAASC,aAAa,QAAQ,kBAAkB;AAKhD,IAAIC,YAAY,GAAG;EAAEC,KAAK,EAAE,EAAE;EAAEC,MAAM,EAAE;AAAG,CAAC;AAE5C,SAASC,0CAA0CA,CACjDC,aAAgC,EAChC;EACA,IACEA,aAAa,EAAEC,MAAM,KAAK,cAAc,IACxCD,aAAa,EAAEE,IAAI,KAAK,WAAW,EACnC;IACA,MAAMC,GAAG,GAAGH,aAAa,CAACI,QAAQ;IAClC,MAAMF,IAAI,GAAGF,aAAa,CAACE,IAAI;IAC/B,MAAMG,MAAM,GAAGZ,iBAAiB,CAACa,SAAS,CACxC,4CACF,CAAC;IACDD,MAAM,CAACE,KAAK,CAAC,eAAeJ,GAAG,KAAKD,IAAI,EAAE,CAAC;IAC3Cb,uBAAuB,CAACmB,IAAI,CAAC;MAAEL,GAAG;MAAED;IAAK,CAAC,CAAC;IAC3C,OAAO;MAAEC,GAAG;MAAED;IAAK,CAAC;EACtB;EACA,OAAOO,SAAS;AAClB;AAEA,OAAO,MAAMC,0BAA0B,GAAIC,KAAuB,IAAK;EACrE,MAAMC,UAAU,GAAGjB,aAAa,CAACkB,SAAS,CAAC,CAAC,CAACC,IAAI;EACjD,IAAIF,UAAU,EAAE;IACd,MAAMG,OAAO,GAAGJ,KAAK,CAACK,OAAO,CAACD,OAAO;IACrC,IACEA,OAAO,IACP,OAAOA,OAAO,KAAK,QAAQ,IAC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EAAE;IACrB,MAAMC,oBAAoB,GAAGnE,uBAAuB,CAAC,CAAC;IACtD,IAAImE,oBAAoB,EAAE;MACxBA,oBAAoB,CAACC,uBAAuB,CAAC,CAAC,CAACJ,IAAI,CAAEK,eAAe,IAAK;QACvEtD,MAAM,CAACyB,KAAK,CACV,iEAAiE,EACjE6B,eAAe,CAAC/B,IAClB,CAAC;QACDiB,cAAc,CAACc,eAAe,CAAC/B,IAAI,CAAC;MACtC,CAAC,CAAC;MACF,MAAMgC,YAAY,GAAGH,oBAAoB,CAACI,oBAAoB,CAC3DF,eAAe,IAAK;QACnBtD,MAAM,CAACyB,KAAK,CACV,8DAA8D,EAC9D6B,eAAe,CAAC/B,IAClB,CAAC;QACDiB,cAAc,CAACc,eAAe,CAAC/B,IAAI,CAAC;MACtC,CACF,CAAC;MACDc,sBAAsB,CAAC,MAAM;QAC3BrC,MAAM,CAACyB,KAAK,CAAC,mCAAmC,CAAC;QACjD8B,YAAY,CAACE,MAAM,CAAC,CAAC;MACvB,CAAC,CAAC;IACJ;EACF,CAAC,MAAM;IACL,MAAM7B,sBAAsB,GAAGzC,yBAAyB,CAAC,CAAC;IAC1DyC,sBAAsB,CAAC8B,gBAAgB,CAAC,UAAU,EAAGlE,KAAK,IAAK;MAC7DQ,MAAM,CAACyB,KAAK,CACV,wEAAwE,EACxEjC,KACF,CAAC;MACDgD,cAAc,CAAChD,KAAK,CAAC;IACvB,CAAC,CAAC;IACF6C,sBAAsB,CAAC,MAAM;MAC3BrC,MAAM,CAACyB,KAAK,CAAC,wDAAwD,CAAC;MACtEG,sBAAsB,CAAC+B,mBAAmB,CAAC,UAAU,CAAC;IACxD,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
let callingx;
|
|
2
|
+
try {
|
|
3
|
+
callingx = require('@stream-io/react-native-callingx').CallingxModule;
|
|
4
|
+
} catch {}
|
|
5
|
+
export function getCallingxLib() {
|
|
6
|
+
if (!callingx) {
|
|
7
|
+
throw Error('react-native-callingx library is not installed.');
|
|
8
|
+
}
|
|
9
|
+
return callingx;
|
|
10
|
+
}
|
|
11
|
+
export function getCallingxLibIfAvailable() {
|
|
12
|
+
return callingx ?? undefined;
|
|
13
|
+
}
|
|
14
|
+
export function extractCallingExpOptions(config) {
|
|
15
|
+
const {
|
|
16
|
+
push: pushConfig,
|
|
17
|
+
foregroundService: foregroundServiceConfig
|
|
18
|
+
} = config;
|
|
19
|
+
const callingExpOptions = {};
|
|
20
|
+
if (pushConfig?.ios) {
|
|
21
|
+
const iosOptions = {};
|
|
22
|
+
if (pushConfig.ios.supportsVideo !== undefined) {
|
|
23
|
+
iosOptions.supportsVideo = pushConfig.ios.supportsVideo;
|
|
24
|
+
}
|
|
25
|
+
if (pushConfig.ios.sound !== undefined) {
|
|
26
|
+
iosOptions.sound = pushConfig.ios.sound;
|
|
27
|
+
}
|
|
28
|
+
if (pushConfig.ios.imageName !== undefined) {
|
|
29
|
+
iosOptions.imageName = pushConfig.ios.imageName;
|
|
30
|
+
}
|
|
31
|
+
if (pushConfig.ios.callsHistory !== undefined) {
|
|
32
|
+
iosOptions.callsHistory = pushConfig.ios.callsHistory;
|
|
33
|
+
}
|
|
34
|
+
if (pushConfig.ios.displayCallTimeout !== undefined) {
|
|
35
|
+
iosOptions.displayCallTimeout = pushConfig.ios.displayCallTimeout;
|
|
36
|
+
}
|
|
37
|
+
if (Object.keys(iosOptions).length > 0) {
|
|
38
|
+
callingExpOptions.ios = iosOptions;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const androidOptions = {};
|
|
42
|
+
if (pushConfig?.android) {
|
|
43
|
+
if (pushConfig.android.incomingChannel) {
|
|
44
|
+
androidOptions.incomingChannel = pushConfig.android.incomingChannel;
|
|
45
|
+
}
|
|
46
|
+
if (pushConfig.android.titleTransformer) {
|
|
47
|
+
androidOptions.titleTransformer = pushConfig.android.titleTransformer;
|
|
48
|
+
}
|
|
49
|
+
if (pushConfig.android.subtitleTransformer) {
|
|
50
|
+
androidOptions.subtitleTransformer = pushConfig.android.subtitleTransformer;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (foregroundServiceConfig.android.channel) {
|
|
54
|
+
androidOptions.ongoingChannel = foregroundServiceConfig.android.channel;
|
|
55
|
+
}
|
|
56
|
+
if (Object.keys(androidOptions).length > 0) {
|
|
57
|
+
callingExpOptions.android = androidOptions;
|
|
58
|
+
}
|
|
59
|
+
if (pushConfig?.shouldRejectCallWhenBusy !== undefined) {
|
|
60
|
+
callingExpOptions.shouldRejectCallWhenBusy = pushConfig.shouldRejectCallWhenBusy;
|
|
61
|
+
}
|
|
62
|
+
if (pushConfig?.enableOngoingCalls !== undefined) {
|
|
63
|
+
callingExpOptions.enableOngoingCalls = pushConfig?.enableOngoingCalls;
|
|
64
|
+
}
|
|
65
|
+
return callingExpOptions;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=callingx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["callingx","require","CallingxModule","getCallingxLib","Error","getCallingxLibIfAvailable","undefined","extractCallingExpOptions","config","push","pushConfig","foregroundService","foregroundServiceConfig","callingExpOptions","ios","iosOptions","supportsVideo","sound","imageName","callsHistory","displayCallTimeout","Object","keys","length","androidOptions","android","incomingChannel","titleTransformer","subtitleTransformer","channel","ongoingChannel","shouldRejectCallWhenBusy","enableOngoingCalls"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/callingx.ts"],"mappings":"AAUA,IAAIA,QAAoC;AAExC,IAAI;EACFA,QAAQ,GAAGC,OAAO,CAAC,kCAAkC,CAAC,CAACC,cAAc;AACvE,CAAC,CAAC,MAAM,CAAC;AAET,OAAO,SAASC,cAAcA,CAAA,EAAG;EAC/B,IAAI,CAACH,QAAQ,EAAE;IACb,MAAMI,KAAK,CAAC,iDAAiD,CAAC;EAChE;EACA,OAAOJ,QAAQ;AACjB;AAEA,OAAO,SAASK,yBAAyBA,CAAA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AAc,CAACE,eAAe,GAAGhB,UAAU,CAACe,OAAO,CAACC,eAAe;IACrE;IACA,IAAIhB,UAAU,CAACe,OAAO,CAACE,gBAAgB,EAAE;MACvCH,cAAc,CAACG,gBAAgB,GAAGjB,UAAU,CAACe,OAAO,CAACE,gBAAgB;IACvE;IACA,IAAIjB,UAAU,CAACe,OAAO,CAACG,mBAAmB,EAAE;MAC1CJ,cAAc,CAACI,mBAAmB,GAChClB,UAAU,CAACe,OAAO,CAACG,mBAAmB;IAC1C;EACF;EAEA,IAAIhB,uBAAuB,CAACa,OAAO,CAACI,OAAO,EAAE;IAC3CL,cAAc,CAACM,cAAc,GAAGlB,uBAAuB,CAACa,OAAO,CAACI,OAAO;EACzE;EAEA,IAAIR,MAAM,CAACC,IAAI,CAACE,cAAc,CAAC,CAACD,MAAM,GAAG,CAAC,EAAE;IAC1CV,iBAAiB,CAACY,OAAO,GAAGD,cAAc;EAC5C;EAEA,IAAId,UAAU,EAAEqB,wBAAwB,KAAKzB,SAAS,EAAE;IACtDO,iBAAiB,CAACkB,wBAAwB,GACxCrB,UAAU,CAACqB,wBAAwB;EACvC;EAEA,IAAIrB,UAAU,EAAEsB,kBAAkB,KAAK1B,SAAS,EAAE;IAChDO,iBAAiB,CAACmB,kBAAkB,GAAGtB,UAAU,EAAEsB,kBAAkB;EACvE;EAEA,OAAOnB,iBAAiB;AAC1B","ignoreList":[]}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export * from './expoNotifications';
|
|
2
2
|
export * from './firebaseMessaging';
|
|
3
3
|
export * from './iosPushNotification';
|
|
4
|
-
export * from './voipPushNotification';
|
|
5
|
-
export * from './callkeep';
|
|
6
4
|
export * from './notifee';
|
|
5
|
+
export * from './callingx';
|
|
7
6
|
|
|
8
7
|
/*
|
|
9
8
|
NOTE: must keep each libs in different files
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["utils/push/libs/index.ts"],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,uBAAuB;AACrC,cAAc,
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["utils/push/libs/index.ts"],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,uBAAuB;AACrC,cAAc,WAAW;AACzB,cAAc,YAAY;;AAE1B;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { PermissionsAndroid } from 'react-native';
|
|
2
1
|
import { lib } from './lib';
|
|
3
|
-
import { videoLoggerSystem } from '@stream-io/video-client';
|
|
4
2
|
var AndroidForegroundServiceType = /*#__PURE__*/function (AndroidForegroundServiceType) {
|
|
5
3
|
AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_CAMERA"] = 64] = "FOREGROUND_SERVICE_TYPE_CAMERA";
|
|
6
4
|
AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE"] = 16] = "FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE";
|
|
@@ -27,24 +25,8 @@ export function getNotifeeLibThrowIfNotInstalledForPush() {
|
|
|
27
25
|
return lib;
|
|
28
26
|
}
|
|
29
27
|
export function getNotifeeLibNoThrowForKeepCallAlive() {
|
|
30
|
-
if (!lib) {
|
|
31
|
-
const logger = videoLoggerSystem.getLogger('getNotifeeLibNoThrow');
|
|
32
|
-
logger.info(`${'@notifee/react-native library not installed. It is required to keep call alive in the background for Android. '}${INSTALLATION_INSTRUCTION}`);
|
|
33
|
-
}
|
|
34
28
|
return lib;
|
|
35
29
|
}
|
|
36
|
-
export async function getKeepCallAliveForegroundServiceTypes() {
|
|
37
|
-
const types = [AndroidForegroundServiceType.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK];
|
|
38
|
-
const hasCameraPermission = await PermissionsAndroid.check(PermissionsAndroid.PERMISSIONS.CAMERA);
|
|
39
|
-
if (hasCameraPermission) {
|
|
40
|
-
types.push(AndroidForegroundServiceType.FOREGROUND_SERVICE_TYPE_CAMERA);
|
|
41
|
-
}
|
|
42
|
-
const hasMicrophonePermission = await PermissionsAndroid.check(PermissionsAndroid.PERMISSIONS.RECORD_AUDIO);
|
|
43
|
-
if (hasMicrophonePermission) {
|
|
44
|
-
types.push(AndroidForegroundServiceType.FOREGROUND_SERVICE_TYPE_MICROPHONE);
|
|
45
|
-
}
|
|
46
|
-
return types;
|
|
47
|
-
}
|
|
48
30
|
export function getIncomingCallForegroundServiceTypes() {
|
|
49
31
|
const types = [AndroidForegroundServiceType.FOREGROUND_SERVICE_TYPE_SHORT_SERVICE];
|
|
50
32
|
return types;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["lib","AndroidForegroundServiceType","INSTALLATION_INSTRUCTION","getNotifeeLibThrowIfNotInstalledForPush","Error","getNotifeeLibNoThrowForKeepCallAlive","getIncomingCallForegroundServiceTypes","types","FOREGROUND_SERVICE_TYPE_SHORT_SERVICE"],"sourceRoot":"../../../../../../src","sources":["utils/push/libs/notifee/index.ts"],"mappings":"AAAA,SAASA,GAAG,QAAmB,OAAO;AAAC,IAIlCC,4BAA4B,0BAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAAA,OAA5BA,4BAA4B;AAAA,EAA5BA,4BAA4B;AAkBjC,MAAMC,wBAAwB,GAC5B,6FAA6F;AAE/F,OAAO,SAASC,uCAAuCA,CAAA,EAAG;EACxD,IAAI,CAACH,GAAG,EAAE;IACR,MAAMI,KAAK,CACT,8FAA8F,GAC5FF,wBACJ,CAAC;EACH;EACA,OAAOF,GAAG;AACZ;AAEA,OAAO,SAASK,oCAAoCA,CAAA,EAAG;EACrD,OAAOL,GAAG;AACZ;AAEA,OAAO,SAASM,qCAAqCA,CAAA,EAAG;EACtD,MAAMC,KAAqC,GAAG,CAC5CN,4BAA4B,CAACO,qCAAqC,CACnE;EACD,OAAOD,KAAK;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { pushAcceptedIncomingCallCId$ } from './internal/rxSubjects';
|
|
2
|
+
import { videoLoggerSystem } from '@stream-io/video-client';
|
|
3
|
+
import { clearPushWSEventSubscriptions, processCallFromPushInBackground } from './internal/utils';
|
|
4
|
+
import { setPushLogoutCallback } from '../internal/pushLogoutCallback';
|
|
5
|
+
import { resolvePendingAudioSession } from '../internal/audioSessionPromise';
|
|
6
|
+
import { getCallingxLib } from './libs/callingx';
|
|
7
|
+
import { Platform } from 'react-native';
|
|
8
|
+
const logger = videoLoggerSystem.getLogger('Callingx');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* This hook is used to listen to callkeep events and do the necessary actions
|
|
12
|
+
*/
|
|
13
|
+
export function setupCallingExpEvents(pushConfig) {
|
|
14
|
+
const hasPushProvider = Platform.OS === 'android' && pushConfig.android?.pushProviderName || Platform.OS === 'ios' && pushConfig.ios?.pushProviderName;
|
|
15
|
+
if (!hasPushProvider) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const callingx = getCallingxLib();
|
|
19
|
+
const {
|
|
20
|
+
remove: removeAnswerCall
|
|
21
|
+
} = callingx.addEventListener('answerCall', onAcceptCall);
|
|
22
|
+
const {
|
|
23
|
+
remove: removeEndCall
|
|
24
|
+
} = callingx.addEventListener('endCall', onEndCall(pushConfig));
|
|
25
|
+
const {
|
|
26
|
+
remove: removeDidActivateAudioSession
|
|
27
|
+
} = callingx.addEventListener('didActivateAudioSession', onDidActivateAudioSession);
|
|
28
|
+
const {
|
|
29
|
+
remove: removeDidDeactivateAudioSession
|
|
30
|
+
} = callingx.addEventListener('didDeactivateAudioSession', onDidDeactivateAudioSession);
|
|
31
|
+
|
|
32
|
+
//NOTE: until getInitialEvents invocation, events are delayed and won't be sent to event listeners, this is a way to make sure none of required events are missed
|
|
33
|
+
//in most cases there will be no delayed answers or ends, but it we don't want to miss any of them
|
|
34
|
+
const events = callingx.getInitialEvents();
|
|
35
|
+
events.forEach(event => {
|
|
36
|
+
const {
|
|
37
|
+
eventName,
|
|
38
|
+
params
|
|
39
|
+
} = event;
|
|
40
|
+
if (eventName === 'answerCall') {
|
|
41
|
+
logger.debug(`answerCall delayed event callId: ${params?.callId}`);
|
|
42
|
+
onAcceptCall(params);
|
|
43
|
+
} else if (eventName === 'endCall') {
|
|
44
|
+
logger.debug(`endCall delayed event callId: ${params?.callId}`);
|
|
45
|
+
onEndCall(pushConfig)(params);
|
|
46
|
+
} else if (eventName === 'didActivateAudioSession') {
|
|
47
|
+
onDidActivateAudioSession();
|
|
48
|
+
} else if (eventName === 'didDeactivateAudioSession') {
|
|
49
|
+
onDidDeactivateAudioSession();
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
setPushLogoutCallback(async () => {
|
|
53
|
+
removeAnswerCall();
|
|
54
|
+
removeEndCall();
|
|
55
|
+
removeDidActivateAudioSession();
|
|
56
|
+
removeDidDeactivateAudioSession();
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
const onDidActivateAudioSession = () => {
|
|
60
|
+
logger.debug('callingExpDidActivateAudioSession');
|
|
61
|
+
resolvePendingAudioSession();
|
|
62
|
+
};
|
|
63
|
+
const onDidDeactivateAudioSession = () => {
|
|
64
|
+
logger.debug('callingExpDidDeactivateAudioSession');
|
|
65
|
+
};
|
|
66
|
+
const onAcceptCall = ({
|
|
67
|
+
callId: call_cid,
|
|
68
|
+
source
|
|
69
|
+
}) => {
|
|
70
|
+
logger.debug(`onAcceptCall event callId: ${call_cid} source: ${source}`);
|
|
71
|
+
if (source === 'app' || !call_cid) {
|
|
72
|
+
//we only need to process the call if the call was answered from the system
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
clearPushWSEventSubscriptions(call_cid);
|
|
76
|
+
// to process the call in the app
|
|
77
|
+
pushAcceptedIncomingCallCId$.next(call_cid);
|
|
78
|
+
};
|
|
79
|
+
const onEndCall = pushConfig => async ({
|
|
80
|
+
callId: call_cid,
|
|
81
|
+
source
|
|
82
|
+
}) => {
|
|
83
|
+
logger.debug(`onEndCall event callId: ${call_cid} source: ${source}`);
|
|
84
|
+
if (source === 'app' || !call_cid) {
|
|
85
|
+
//we only need to process the call if the call was rejected from the system
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
clearPushWSEventSubscriptions(call_cid);
|
|
89
|
+
await processCallFromPushInBackground(pushConfig, call_cid, 'decline');
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=setupCallingExpEvents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["pushAcceptedIncomingCallCId$","videoLoggerSystem","clearPushWSEventSubscriptions","processCallFromPushInBackground","setPushLogoutCallback","resolvePendingAudioSession","getCallingxLib","Platform","logger","getLogger","setupCallingExpEvents","pushConfig","hasPushProvider","OS","android","pushProviderName","ios","callingx","remove","removeAnswerCall","addEventListener","onAcceptCall","removeEndCall","onEndCall","removeDidActivateAudioSession","onDidActivateAudioSession","removeDidDeactivateAudioSession","onDidDeactivateAudioSession","events","getInitialEvents","forEach","event","eventName","params","debug","callId","call_cid","source","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C;IACA;EACF;EAEAlC,6BAA6B,CAACkC,QAAQ,CAAC;EACvC;EACApC,4BAA4B,CAACsC,IAAI,CAACF,QAAQ,CAAC;AAC7C,CAAC;AAED,MAAMb,SAAS,GACZZ,UAAsB,IACvB,OAAO;EAAEwB,MAAM,EAAEC,QAAQ;EAAEC;AAA+B,CAAC,KAAK;EAC9D7B,MAAM,CAAC0B,KAAK,CAAC,2BAA2BE,QAAQ,YAAYC,MAAM,EAAE,CAAC;EAErE,IAAIA,MAAM,KAAK,KAAK,IAAI,CAACD,QAAQ,EAAE;IACjC;IACA;EACF;EAEAlC,6BAA6B,CAACkC,QAAQ,CAAC;EAEvC,MAAMjC,+BAA+B,CAACQ,UAAU,EAAEyB,QAAQ,EAAE,SAAS,CAAC;AACxE,CAAC","ignoreList":[]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { getVoipPushNotificationLib } from './libs';
|
|
1
|
+
// import { getVoipPushNotificationLib } from './libs';
|
|
2
|
+
|
|
2
3
|
import { Platform } from 'react-native';
|
|
3
4
|
import { onVoipNotificationReceived } from './internal/ios';
|
|
4
5
|
import { setPushLogoutCallback } from '../internal/pushLogoutCallback';
|
|
5
6
|
import { videoLoggerSystem } from '@stream-io/video-client';
|
|
7
|
+
import { getCallingxLib } from './libs';
|
|
6
8
|
export function setupIosVoipPushEvents(pushConfig) {
|
|
7
9
|
if (Platform.OS !== 'ios' || !pushConfig.ios?.pushProviderName) {
|
|
8
10
|
return;
|
|
@@ -13,14 +15,13 @@ export function setupIosVoipPushEvents(pushConfig) {
|
|
|
13
15
|
logger.debug('ios pushProviderName is not defined, so skipping the setupIosVoipPushEvents');
|
|
14
16
|
return;
|
|
15
17
|
}
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
onVoipNotificationReceived(notification, pushConfig);
|
|
18
|
+
const callingx = getCallingxLib();
|
|
19
|
+
const voipNotificationReceivedListener = callingx.addEventListener('voipNotificationReceived', params => {
|
|
20
|
+
onVoipNotificationReceived(params, pushConfig);
|
|
20
21
|
});
|
|
21
22
|
setPushLogoutCallback(async () => {
|
|
22
23
|
videoLoggerSystem.getLogger('setPushLogoutCallback').debug('notification event listener removed');
|
|
23
|
-
|
|
24
|
+
voipNotificationReceivedListener.remove();
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
27
|
//# sourceMappingURL=setupIosVoipPushEvents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["Platform","onVoipNotificationReceived","setPushLogoutCallback","videoLoggerSystem","getCallingxLib","setupIosVoipPushEvents","pushConfig","OS","ios","pushProviderName","logger","getLogger","debug","callingx","voipNotificationReceivedListener","addEventListener","params","remove"],"sourceRoot":"../../../../src","sources":["utils/push/setupIosVoipPushEvents.ts"],"mappings":"AAAA;;AAEA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,0BAA0B,QAAQ,gBAAgB;AAC3D,SAASC,qBAAqB,QAAQ,gCAAgC;AAEtE,SAASC,iBAAiB,QAAQ,yBAAyB;AAC3D,SAASC,cAAc,QAAQ,QAAQ;AAEvC,OAAO,SAASC,sBAAsBA,CACpCC,UAAkD,EAClD;EACA,IAAIN,QAAQ,CAACO,EAAE,KAAK,KAAK,IAAI,CAACD,UAAU,CAACE,GAAG,EAAEC,gBAAgB,EAAE;IAC9D;EACF;EACA,MAAMC,MAAM,GAAGP,iBAAiB,CAACQ,SAAS,CAAC,wBAAwB,CAAC;EACpE,IAAI,CAACL,UAAU,CAACE,GAAG,CAACC,gBAAgB,EAAE;IACpC;IACAC,MAAM,CAACE,KAAK,CACV,6EACF,CAAC;IACD;EACF;EAEA,MAAMC,QAAQ,GAAGT,cAAc,CAAC,CAAC;EACjC,MAAMU,gCAAgC,GAAGD,QAAQ,CAACE,gBAAgB,CAChE,0BAA0B,EACzBC,MAAM,IAAK;IACVf,0BAA0B,CAACe,MAAM,EAAEV,UAAU,CAAC;EAChD,CACF,CAAC;EAEDJ,qBAAqB,CAAC,YAAY;IAChCC,iBAAiB,CACdQ,SAAS,CAAC,uBAAuB,CAAC,CAClCC,KAAK,CAAC,qCAAqC,CAAC;IAC/CE,gCAAgC,CAACG,MAAM,CAAC,CAAC;EAC3C,CAAC,CAAC;AACJ","ignoreList":[]}
|
package/dist/module/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '1.
|
|
1
|
+
export const version = '1.29.0-beta.1';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["version"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":"AAAA,OAAO,MAAMA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"names":["version"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":"AAAA,OAAO,MAAMA,OAAO,GAAG,eAAe","ignoreList":[]}
|