@stream-io/video-react-native-sdk 1.30.5 → 1.31.1-beta.0
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 +11 -0
- 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 +127 -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 +149 -0
- package/android/src/main/java/com/streamvideo/reactnative/screenshare/ScreenAudioCapture.kt +111 -0
- package/dist/commonjs/components/Call/CallControls/ScreenShareToggleButton.js +3 -2
- package/dist/commonjs/components/Call/CallControls/ScreenShareToggleButton.js.map +1 -1
- package/dist/commonjs/hooks/index.js +11 -0
- package/dist/commonjs/hooks/index.js.map +1 -1
- package/dist/commonjs/hooks/push/index.js +0 -2
- package/dist/commonjs/hooks/push/index.js.map +1 -1
- package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js +144 -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/hooks/useScreenShareAudioMixing.js +126 -0
- package/dist/commonjs/hooks/useScreenShareAudioMixing.js.map +1 -0
- package/dist/commonjs/hooks/useScreenShareButton.js +57 -3
- package/dist/commonjs/hooks/useScreenShareButton.js.map +1 -1
- package/dist/commonjs/index.js +1 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/modules/ScreenShareAudioManager.js +54 -0
- package/dist/commonjs/modules/ScreenShareAudioManager.js.map +1 -0
- 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 +16 -6
- package/dist/commonjs/providers/StreamCall/index.js.map +1 -1
- package/dist/commonjs/utils/StreamVideoRN/index.js +35 -21
- package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/commonjs/utils/internal/callingx/audioSessionPromise.js +68 -0
- package/dist/commonjs/utils/internal/callingx/audioSessionPromise.js.map +1 -0
- package/dist/commonjs/utils/internal/callingx/callingx.js +150 -0
- package/dist/commonjs/utils/internal/callingx/callingx.js.map +1 -0
- package/dist/commonjs/utils/internal/registerSDKGlobals.js +53 -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 +135 -202
- package/dist/commonjs/utils/push/android.js.map +1 -1
- package/dist/commonjs/utils/push/internal/ios.js +17 -34
- package/dist/commonjs/utils/push/internal/ios.js.map +1 -1
- package/dist/commonjs/utils/push/internal/rxSubjects.js +1 -45
- package/dist/commonjs/utils/push/internal/rxSubjects.js.map +1 -1
- package/dist/commonjs/utils/push/internal/utils.js +71 -53
- 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 +105 -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/CallControls/ScreenShareToggleButton.js +3 -2
- package/dist/module/components/Call/CallControls/ScreenShareToggleButton.js.map +1 -1
- package/dist/module/hooks/index.js +1 -0
- package/dist/module/hooks/index.js.map +1 -1
- package/dist/module/hooks/push/index.js +0 -2
- package/dist/module/hooks/push/index.js.map +1 -1
- package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js +137 -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/hooks/useScreenShareAudioMixing.js +119 -0
- package/dist/module/hooks/useScreenShareAudioMixing.js.map +1 -0
- package/dist/module/hooks/useScreenShareButton.js +57 -3
- package/dist/module/hooks/useScreenShareButton.js.map +1 -1
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/modules/ScreenShareAudioManager.js +47 -0
- package/dist/module/modules/ScreenShareAudioManager.js.map +1 -0
- 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 +16 -6
- package/dist/module/providers/StreamCall/index.js.map +1 -1
- package/dist/module/utils/StreamVideoRN/index.js +35 -21
- package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/module/utils/internal/callingx/audioSessionPromise.js +61 -0
- package/dist/module/utils/internal/callingx/audioSessionPromise.js.map +1 -0
- package/dist/module/utils/internal/callingx/callingx.js +140 -0
- package/dist/module/utils/internal/callingx/callingx.js.map +1 -0
- package/dist/module/utils/internal/registerSDKGlobals.js +53 -3
- 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 +137 -204
- package/dist/module/utils/push/android.js.map +1 -1
- package/dist/module/utils/push/internal/ios.js +17 -34
- package/dist/module/utils/push/internal/ios.js.map +1 -1
- package/dist/module/utils/push/internal/rxSubjects.js +0 -44
- package/dist/module/utils/push/internal/rxSubjects.js.map +1 -1
- package/dist/module/utils/push/internal/utils.js +67 -50
- 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 +99 -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/CallControls/ScreenShareToggleButton.d.ts +6 -1
- package/dist/typescript/components/Call/CallControls/ScreenShareToggleButton.d.ts.map +1 -1
- package/dist/typescript/hooks/index.d.ts +1 -0
- package/dist/typescript/hooks/index.d.ts.map +1 -1
- package/dist/typescript/hooks/push/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/hooks/useScreenShareAudioMixing.d.ts +14 -0
- package/dist/typescript/hooks/useScreenShareAudioMixing.d.ts.map +1 -0
- package/dist/typescript/hooks/useScreenShareButton.d.ts +39 -2
- package/dist/typescript/hooks/useScreenShareButton.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/ScreenShareAudioManager.d.ts +28 -0
- package/dist/typescript/modules/ScreenShareAudioManager.d.ts.map +1 -0
- 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/providers/StreamCall/index.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/index.d.ts +22 -2
- package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/types.d.ts +59 -25
- package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
- package/dist/typescript/utils/internal/callingx/audioSessionPromise.d.ts +16 -0
- package/dist/typescript/utils/internal/callingx/audioSessionPromise.d.ts.map +1 -0
- package/dist/typescript/utils/internal/callingx/callingx.d.ts +18 -0
- package/dist/typescript/utils/internal/callingx/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 -33
- package/dist/typescript/utils/push/internal/rxSubjects.d.ts.map +1 -1
- package/dist/typescript/utils/push/internal/utils.d.ts +14 -8
- 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 +19 -7
- package/ios/StreamVideoReactNative.h +7 -4
- package/ios/StreamVideoReactNative.m +282 -86
- package/package.json +13 -18
- package/src/components/Call/CallControls/ScreenShareToggleButton.tsx +11 -1
- package/src/hooks/index.ts +1 -0
- package/src/hooks/push/index.ts +0 -2
- package/src/hooks/push/useCallingExpWithCallingStateEffect.ts +189 -0
- package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +21 -34
- package/src/hooks/useAndroidKeepCallAliveEffect.ts +94 -120
- package/src/hooks/useScreenShareAudioMixing.ts +130 -0
- package/src/hooks/useScreenShareButton.ts +87 -2
- package/src/index.ts +1 -0
- package/src/modules/ScreenShareAudioManager.ts +49 -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 +17 -6
- package/src/utils/StreamVideoRN/index.ts +42 -30
- package/src/utils/StreamVideoRN/types.ts +61 -25
- package/src/utils/internal/callingx/audioSessionPromise.ts +65 -0
- package/src/utils/internal/callingx/callingx.ts +194 -0
- package/src/utils/internal/registerSDKGlobals.ts +52 -4
- package/src/utils/keepCallAliveHeadlessTask.ts +54 -0
- package/src/utils/push/android.ts +198 -311
- package/src/utils/push/internal/ios.ts +28 -44
- package/src/utils/push/internal/rxSubjects.ts +0 -61
- package/src/utils/push/internal/utils.ts +108 -64
- package/src/utils/push/ios.ts +1 -6
- package/src/utils/push/libs/callingx.ts +89 -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 +135 -0
- package/src/utils/push/setupIosVoipPushEvents.ts +11 -7
- package/src/version.ts +1 -1
- 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/hooks/push/useProcessPushCallEffect.js +0 -67
- package/dist/commonjs/hooks/push/useProcessPushCallEffect.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/hooks/push/useProcessPushCallEffect.js +0 -60
- package/dist/module/hooks/push/useProcessPushCallEffect.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/hooks/push/useProcessPushCallEffect.d.ts +0 -8
- package/dist/typescript/hooks/push/useProcessPushCallEffect.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/hooks/push/useProcessPushCallEffect.ts +0 -108
- 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
|
@@ -5,11 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.onVoipNotificationReceived = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
|
-
var _libs = require("../libs");
|
|
9
|
-
var _rxSubjects = require("./rxSubjects");
|
|
10
8
|
var _constants = require("./constants");
|
|
11
9
|
var _utils = require("./utils");
|
|
12
10
|
var _videoClient = require("@stream-io/video-client");
|
|
11
|
+
var _callingx = require("../libs/callingx");
|
|
13
12
|
const onVoipNotificationReceived = async (notification, pushConfig) => {
|
|
14
13
|
/* --- Example payload ---
|
|
15
14
|
{
|
|
@@ -33,6 +32,7 @@ const onVoipNotificationReceived = async (notification, pushConfig) => {
|
|
|
33
32
|
"version": "v2"
|
|
34
33
|
}
|
|
35
34
|
} */
|
|
35
|
+
const logger = _videoClient.videoLoggerSystem.getLogger('callingx - onVoipNotificationReceived');
|
|
36
36
|
const sender = notification?.stream?.sender;
|
|
37
37
|
const type = notification?.stream?.type;
|
|
38
38
|
// do not process any other notifications other than stream.video or ringing
|
|
@@ -43,50 +43,34 @@ const onVoipNotificationReceived = async (notification, pushConfig) => {
|
|
|
43
43
|
if (!call_cid || _reactNative.Platform.OS !== 'ios' || !pushConfig.ios.pushProviderName) {
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const callingx = (0, _callingx.getCallingxLib)();
|
|
47
|
+
if (callingx.isCallTracked(call_cid)) {
|
|
48
|
+
//same call_cid is already tracked, so we skip the notification
|
|
49
|
+
logger.debug(`the same call_cid ${call_cid} is already tracked, skipping the call.ring notification`);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
47
52
|
const client = await pushConfig.createStreamVideoClient();
|
|
48
53
|
if (!client) {
|
|
49
54
|
logger.debug('client not found, not processing call.ring voip push notification');
|
|
50
55
|
return;
|
|
51
56
|
}
|
|
52
|
-
const shouldRejectCallWhenBusy = client['rejectCallWhenBusy'] ?? false;
|
|
53
|
-
if (shouldRejectCallWhenBusy) {
|
|
54
|
-
// inform the iOS native module that we should reject call when busy
|
|
55
|
-
_reactNative.NativeModules.StreamVideoReactNative.setShouldRejectCallWhenBusy(shouldRejectCallWhenBusy);
|
|
56
|
-
}
|
|
57
57
|
const callFromPush = await client.onRingingCall(call_cid);
|
|
58
|
-
let uuid = '';
|
|
59
|
-
try {
|
|
60
|
-
uuid = await _reactNative.NativeModules?.StreamVideoReactNative?.getIncomingCallUUid(call_cid);
|
|
61
|
-
} catch (error) {
|
|
62
|
-
logger.error('Error in getting call uuid from native module', error);
|
|
63
|
-
}
|
|
64
|
-
if (!uuid) {
|
|
65
|
-
logger.error(`Not processing call.ring push notification, as no uuid found for call_cid: ${call_cid}`);
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
const created_by_id = notification?.stream?.created_by_id;
|
|
69
|
-
const receiver_id = notification?.stream?.receiver_id;
|
|
70
58
|
function closeCallIfNecessary() {
|
|
71
59
|
const {
|
|
72
60
|
mustEndCall,
|
|
73
|
-
|
|
74
|
-
} = (0, _utils.
|
|
61
|
+
endCallReason
|
|
62
|
+
} = (0, _utils.shouldCallBeClosed)(callFromPush, notification?.stream);
|
|
75
63
|
if (mustEndCall) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
callkeep.reportEndCallWithUUID(uuid, callkeepReason);
|
|
79
|
-
const voipPushNotification = (0, _libs.getVoipPushNotificationLib)();
|
|
80
|
-
voipPushNotification.onVoipNotificationCompleted(uuid);
|
|
64
|
+
logger.debug(`callingx.endCallWithReason for call_cid: ${call_cid} endCallReason: ${endCallReason}`);
|
|
65
|
+
callingx.endCallWithReason(call_cid, endCallReason);
|
|
81
66
|
return true;
|
|
82
67
|
}
|
|
83
68
|
return false;
|
|
84
69
|
}
|
|
85
70
|
const closed = closeCallIfNecessary();
|
|
86
|
-
|
|
87
|
-
if (!closed && canListenToWS()) {
|
|
71
|
+
if (!closed && (0, _utils.canListenToWS)()) {
|
|
88
72
|
const unsubscribe = callFromPush.on('all', event => {
|
|
89
|
-
const _canListenToWS = canListenToWS();
|
|
73
|
+
const _canListenToWS = (0, _utils.canListenToWS)();
|
|
90
74
|
if (!_canListenToWS) {
|
|
91
75
|
logger.debug(`unsubscribe due to event callCid: ${call_cid} canListenToWS: ${_canListenToWS}`, event);
|
|
92
76
|
unsubscribe();
|
|
@@ -101,10 +85,9 @@ const onVoipNotificationReceived = async (notification, pushConfig) => {
|
|
|
101
85
|
_constants.pushUnsubscriptionCallbacks.get(call_cid)?.forEach(cb => cb());
|
|
102
86
|
_constants.pushUnsubscriptionCallbacks.set(call_cid, [unsubscribe]);
|
|
103
87
|
}
|
|
104
|
-
|
|
105
|
-
//
|
|
106
|
-
logger.debug(`call_cid:${call_cid}
|
|
107
|
-
_rxSubjects.voipPushNotificationCallCId$.next(call_cid);
|
|
88
|
+
|
|
89
|
+
// callingx event listeners (setupCallingExpEvents) will handle accept/reject
|
|
90
|
+
logger.debug(`call_cid:${call_cid} received and processed from call.ring push notification`);
|
|
108
91
|
};
|
|
109
92
|
exports.onVoipNotificationReceived = onVoipNotificationReceived;
|
|
110
93
|
//# sourceMappingURL=ios.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_constants","_utils","_videoClient","_callingx","onVoipNotificationReceived","notification","pushConfig","logger","videoLoggerSystem","getLogger","sender","stream","type","call_cid","Platform","OS","ios","pushProviderName","callingx","getCallingxLib","isCallTracked","debug","client","createStreamVideoClient","callFromPush","onRingingCall","closeCallIfNecessary","mustEndCall","endCallReason","shouldCallBeClosed","endCallWithReason","closed","canListenToWS","unsubscribe","on","event","_canListenToWS","_closed","pushUnsubscriptionCallbacks","get","forEach","cb","set","exports"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/ios.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAEO,MAAMK,0BAA0B,GAA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,aAAa,EACtF,CAAC;MACDV,QAAQ,CAACY,iBAAiB,CAACjB,QAAQ,EAAEe,aAAa,CAAC;MACnD,OAAO,IAAI;IACb;IACA,OAAO,KAAK;EACd;EAEA,MAAMG,MAAM,GAAGL,oBAAoB,CAAC,CAAC;EACrC,IAAI,CAACK,MAAM,IAAI,IAAAC,oBAAa,EAAC,CAAC,EAAE;IAC9B,MAAMC,WAAW,GAAGT,YAAY,CAACU,EAAE,CAAC,KAAK,EAAGC,KAAK,IAAK;MACpD,MAAMC,cAAc,GAAG,IAAAJ,oBAAa,EAAC,CAAC;MACtC,IAAI,CAACI,cAAc,EAAE;QACnB7B,MAAM,CAACc,KAAK,CACV,qCAAqCR,QAAQ,mBAAmBuB,cAAc,EAAE,EAChFD,KACF,CAAC;QACDF,WAAW,CAAC,CAAC;QACb;MACF;MACA,MAAMI,OAAO,GAAGX,oBAAoB,CAAC,CAAC;MACtC,IAAIW,OAAO,EAAE;QACX9B,MAAM,CAACc,KAAK,CACV,qCAAqCR,QAAQ,mBAAmBuB,cAAc,wBAAwBC,OAAO,EAAE,EAC/GF,KACF,CAAC;QACDF,WAAW,CAAC,CAAC;MACf;IACF,CAAC,CAAC;IAEFK,sCAA2B,CAACC,GAAG,CAAC1B,QAAQ,CAAC,EAAE2B,OAAO,CAAEC,EAAE,IAAKA,EAAE,CAAC,CAAC,CAAC;IAChEH,sCAA2B,CAACI,GAAG,CAAC7B,QAAQ,EAAE,CAACoB,WAAW,CAAC,CAAC;EAC1D;;EAEA;EACA1B,MAAM,CAACc,KAAK,CACV,YAAYR,QAAQ,0DACtB,CAAC;AACH,CAAC;AAAC8B,OAAA,CAAAvC,0BAAA,GAAAA,0BAAA","ignoreList":[]}
|
|
@@ -3,55 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.pushNonRingingCallData$ = void 0;
|
|
7
7
|
var _rxjs = require("rxjs");
|
|
8
8
|
/**
|
|
9
9
|
* This rxjs subject is used to store the call cid of the accepted incoming call from push notification
|
|
10
10
|
* Note: it is should be subscribed only when a user has connected to the websocket of Stream
|
|
11
11
|
*/
|
|
12
12
|
const pushNonRingingCallData$ = exports.pushNonRingingCallData$ = new _rxjs.BehaviorSubject(undefined);
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* This rxjs subject is used to store the call cid of the accepted incoming call from push notification
|
|
16
|
-
* Note: it is should be subscribed only when a user has connected to the websocket of Stream
|
|
17
|
-
*/
|
|
18
|
-
const pushAcceptedIncomingCallCId$ = exports.pushAcceptedIncomingCallCId$ = new _rxjs.BehaviorSubject(undefined);
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* This rxjs subject is used to store the call cid of the tapped incoming call from push notification it is neither accepted nor rejected yet
|
|
22
|
-
* Note: it should be subscribed only when a user has connected to the websocket of Stream
|
|
23
|
-
*/
|
|
24
|
-
const pushTappedIncomingCallCId$ = exports.pushTappedIncomingCallCId$ = new _rxjs.BehaviorSubject(undefined);
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* This rxjs subject is used to store the call cid of the delivered incoming call from push notification it is neither accepted nor rejected yet
|
|
28
|
-
* Used so that the call is navigated to when app is open from being killed
|
|
29
|
-
* Note: it should be subscribed only when a user has connected to the websocket of Stream
|
|
30
|
-
*/
|
|
31
|
-
const pushAndroidBackgroundDeliveredIncomingCallCId$ = exports.pushAndroidBackgroundDeliveredIncomingCallCId$ = new _rxjs.BehaviorSubject(undefined);
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* This rxjs subject is used to store the call cid of the accepted incoming call from push notification
|
|
35
|
-
* Note: it should be subscribed only when a user has connected to the websocket of Stream
|
|
36
|
-
*/
|
|
37
|
-
const pushRejectedIncomingCallCId$ = exports.pushRejectedIncomingCallCId$ = new _rxjs.BehaviorSubject(undefined);
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* This rxjs subject is used to store the call cid of the incoming call from ios voip pushkit notification
|
|
41
|
-
*/
|
|
42
|
-
const voipPushNotificationCallCId$ = exports.voipPushNotificationCallCId$ = new _rxjs.BehaviorSubject(undefined);
|
|
43
|
-
|
|
44
|
-
/** The pair of cid of a call and its corresponding uuid created in the native side */
|
|
45
|
-
|
|
46
|
-
/*
|
|
47
|
-
* This rxjs subject should only used to store the CallkeepMap
|
|
48
|
-
* for the incoming call when on foreground
|
|
49
|
-
* or in other words, when we get didDisplayIncomingCall from callkeep lib
|
|
50
|
-
*/
|
|
51
|
-
const voipCallkeepCallOnForegroundMap$ = exports.voipCallkeepCallOnForegroundMap$ = new _rxjs.BehaviorSubject(undefined);
|
|
52
|
-
|
|
53
|
-
/*
|
|
54
|
-
* This rxjs subject should only used to store the CallkeepMap when it was accepted in the native dialer
|
|
55
|
-
*/
|
|
56
|
-
const voipCallkeepAcceptedCallOnNativeDialerMap$ = exports.voipCallkeepAcceptedCallOnNativeDialerMap$ = new _rxjs.BehaviorSubject(undefined);
|
|
57
13
|
//# sourceMappingURL=rxSubjects.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_rxjs","require","pushNonRingingCallData$","exports","BehaviorSubject","undefined"
|
|
1
|
+
{"version":3,"names":["_rxjs","require","pushNonRingingCallData$","exports","BehaviorSubject","undefined"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/rxSubjects.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,IAAIE,qBAAe,CAExDC,SAAS,CAAC","ignoreList":[]}
|
|
@@ -3,51 +3,48 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.shouldCallBeEnded = exports.processNonIncomingCallFromPush = exports.processCallFromPushInBackground = exports.
|
|
6
|
+
exports.shouldCallBeEnded = exports.shouldCallBeClosed = exports.processNonIncomingCallFromPush = exports.processCallFromPushInBackground = exports.clearPushWSEventSubscriptions = exports.canListenToWS = exports.canAddPushWSSubscriptionsRef = void 0;
|
|
7
7
|
var _videoClient = require("@stream-io/video-client");
|
|
8
8
|
var _newNotificationCallbacks = require("../../internal/newNotificationCallbacks");
|
|
9
9
|
var _constants = require("./constants");
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
const logger = _videoClient.videoLoggerSystem.getLogger('callingx');
|
|
10
12
|
/**
|
|
11
13
|
* This function is used to check if the call should be ended based on the push notification
|
|
12
14
|
* Useful for callkeep management to end the call if necessary (with reportEndCallWithUUID)
|
|
13
15
|
*/
|
|
14
16
|
const shouldCallBeEnded = (callFromPush, created_by_id, receiver_id) => {
|
|
15
|
-
/* callkeep reasons for ending a call
|
|
16
|
-
FAILED: 1,
|
|
17
|
-
REMOTE_ENDED: 2,
|
|
18
|
-
UNANSWERED: 3,
|
|
19
|
-
ANSWERED_ELSEWHERE: 4,
|
|
20
|
-
DECLINED_ELSEWHERE: 5,
|
|
21
|
-
MISSED: 6
|
|
22
|
-
*/
|
|
23
17
|
const callSession = callFromPush.state.session;
|
|
24
18
|
const rejected_by = callSession?.rejected_by;
|
|
25
19
|
const accepted_by = callSession?.accepted_by;
|
|
26
20
|
let mustEndCall = false;
|
|
27
|
-
let
|
|
28
|
-
if (
|
|
21
|
+
let endCallReason = 'unknown';
|
|
22
|
+
if (callFromPush.state.endedAt) {
|
|
23
|
+
mustEndCall = true;
|
|
24
|
+
endCallReason = 'remote';
|
|
25
|
+
} else if (created_by_id && rejected_by) {
|
|
29
26
|
if (rejected_by[created_by_id]) {
|
|
30
|
-
// call was cancelled by the caller
|
|
27
|
+
// call was cancelled by the caller before the receiver could answer
|
|
31
28
|
mustEndCall = true;
|
|
32
|
-
|
|
29
|
+
endCallReason = 'canceled';
|
|
33
30
|
}
|
|
34
31
|
} else if (receiver_id && rejected_by) {
|
|
35
32
|
if (rejected_by[receiver_id]) {
|
|
36
33
|
// call was rejected by the receiver in some other device
|
|
37
34
|
mustEndCall = true;
|
|
38
|
-
|
|
35
|
+
endCallReason = 'rejected';
|
|
39
36
|
}
|
|
40
37
|
} else if (receiver_id && accepted_by) {
|
|
41
38
|
if (accepted_by[receiver_id]) {
|
|
42
39
|
// call was accepted by the receiver in some other device
|
|
43
40
|
mustEndCall = true;
|
|
44
|
-
|
|
41
|
+
endCallReason = 'answeredElsewhere';
|
|
45
42
|
}
|
|
46
43
|
}
|
|
47
|
-
_videoClient.videoLoggerSystem.getLogger('shouldCallBeEnded').debug(`callCid: ${callFromPush.cid} mustEndCall: ${mustEndCall}
|
|
44
|
+
_videoClient.videoLoggerSystem.getLogger('shouldCallBeEnded').debug(`callCid: ${callFromPush.cid} mustEndCall: ${mustEndCall} endCallReason: ${endCallReason}`);
|
|
48
45
|
return {
|
|
49
46
|
mustEndCall,
|
|
50
|
-
|
|
47
|
+
endCallReason
|
|
51
48
|
};
|
|
52
49
|
};
|
|
53
50
|
|
|
@@ -56,57 +53,63 @@ const shouldCallBeEnded = (callFromPush, created_by_id, receiver_id) => {
|
|
|
56
53
|
2. this is because the app is in background state and we don't have a client to get the call and do an action
|
|
57
54
|
*/
|
|
58
55
|
exports.shouldCallBeEnded = shouldCallBeEnded;
|
|
59
|
-
const processCallFromPushInBackground = async (pushConfig, call_cid, action) => {
|
|
56
|
+
const processCallFromPushInBackground = async (pushConfig, call_cid, action, onIOSActionCanBeFulfilled) => {
|
|
60
57
|
let videoClient;
|
|
61
58
|
try {
|
|
62
59
|
videoClient = await pushConfig.createStreamVideoClient();
|
|
63
60
|
if (!videoClient) {
|
|
64
|
-
|
|
61
|
+
throw new Error('createStreamVideoClient returned null');
|
|
65
62
|
}
|
|
66
63
|
} catch (e) {
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
logger.error('processCallFromPushInBackground: failed to create video client', e);
|
|
65
|
+
onIOSActionCanBeFulfilled(true);
|
|
69
66
|
return;
|
|
70
67
|
}
|
|
71
|
-
await processCallFromPush(videoClient, call_cid, action, pushConfig);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* This function is used process the call from push notifications due to incoming call
|
|
76
|
-
* It does the following steps:
|
|
77
|
-
* 1. Get the call from the client if present or create a new call
|
|
78
|
-
* 2. Fetch the latest state of the call from the server if its not already in ringing state
|
|
79
|
-
* 3. Join or leave the call based on the user's action.
|
|
80
|
-
*/
|
|
81
|
-
exports.processCallFromPushInBackground = processCallFromPushInBackground;
|
|
82
|
-
const processCallFromPush = async (client, call_cid, action, pushConfig) => {
|
|
83
68
|
let callFromPush;
|
|
84
69
|
try {
|
|
85
|
-
callFromPush = await
|
|
70
|
+
callFromPush = await videoClient.onRingingCall(call_cid);
|
|
86
71
|
} catch (e) {
|
|
87
|
-
|
|
88
|
-
|
|
72
|
+
logger.error('processCallFromPushInBackground: failed to fetch call from push notification', e);
|
|
73
|
+
onIOSActionCanBeFulfilled(true);
|
|
89
74
|
return;
|
|
90
75
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
76
|
+
if (action === 'accept') {
|
|
77
|
+
if (pushConfig.publishOptions) {
|
|
78
|
+
callFromPush.updatePublishOptions(pushConfig.publishOptions);
|
|
79
|
+
}
|
|
80
|
+
logger.debug(`joining call from push notification with callCid: ${callFromPush.cid}`);
|
|
81
|
+
const callingState = callFromPush.state.callingState;
|
|
82
|
+
if (callingState !== _videoClient.CallingState.RINGING && callingState !== _videoClient.CallingState.IDLE) {
|
|
83
|
+
logger.debug(`skipping join call as it is not in ringing or idle state from push notification. callCid: ${callFromPush.cid}`);
|
|
84
|
+
onIOSActionCanBeFulfilled(true);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
try {
|
|
88
|
+
onIOSActionCanBeFulfilled(false);
|
|
98
89
|
await callFromPush.join();
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
90
|
+
} catch (e) {
|
|
91
|
+
logger.warn('processCallFromPushInBackground: failed to join call from push notification', e);
|
|
92
|
+
}
|
|
93
|
+
} else if (action === 'decline') {
|
|
94
|
+
const alreadyLeft = callFromPush.state.callingState === _videoClient.CallingState.LEFT;
|
|
95
|
+
if (alreadyLeft) {
|
|
96
|
+
onIOSActionCanBeFulfilled(false);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const canReject = callFromPush.state.callingState === _videoClient.CallingState.RINGING || callFromPush.state.callingState === _videoClient.CallingState.IDLE;
|
|
100
|
+
const isCurrentUserMember = callFromPush.state.members.some(member => member.user_id === callFromPush.currentUserId);
|
|
101
|
+
const reject = canReject && isCurrentUserMember;
|
|
102
|
+
logger.debug(`declining call from push notification with callCid: ${callFromPush.cid} reject: ${reject}`);
|
|
103
|
+
try {
|
|
102
104
|
await callFromPush.leave({
|
|
103
|
-
reject
|
|
105
|
+
reject,
|
|
104
106
|
reason: 'decline'
|
|
105
107
|
});
|
|
108
|
+
onIOSActionCanBeFulfilled(false);
|
|
109
|
+
} catch (e) {
|
|
110
|
+
logger.warn('processCallFromPushInBackground: failed to decline call from push notification', e);
|
|
111
|
+
onIOSActionCanBeFulfilled(true);
|
|
106
112
|
}
|
|
107
|
-
} catch (e) {
|
|
108
|
-
const logger = _videoClient.videoLoggerSystem.getLogger('processCallFromPush');
|
|
109
|
-
logger.warn(`failed to process ${action} call from push notification`, e);
|
|
110
113
|
}
|
|
111
114
|
};
|
|
112
115
|
|
|
@@ -117,7 +120,7 @@ const processCallFromPush = async (client, call_cid, action, pushConfig) => {
|
|
|
117
120
|
* 2. Fetch the latest state of the call from the server
|
|
118
121
|
* 3. Call all the callbacks to inform the app about the call
|
|
119
122
|
*/
|
|
120
|
-
exports.
|
|
123
|
+
exports.processCallFromPushInBackground = processCallFromPushInBackground;
|
|
121
124
|
const processNonIncomingCallFromPush = async (client, call_cid, nonRingingNotificationType) => {
|
|
122
125
|
let callFromPush;
|
|
123
126
|
try {
|
|
@@ -131,8 +134,8 @@ const processNonIncomingCallFromPush = async (client, call_cid, nonRingingNotifi
|
|
|
131
134
|
await callFromPush.get();
|
|
132
135
|
}
|
|
133
136
|
} catch (e) {
|
|
134
|
-
const
|
|
135
|
-
|
|
137
|
+
const nonRingingCallLogger = _videoClient.videoLoggerSystem.getLogger('processNonIncomingCallFromPush');
|
|
138
|
+
nonRingingCallLogger.error('failed to fetch call from push notification', e);
|
|
136
139
|
return;
|
|
137
140
|
}
|
|
138
141
|
(0, _newNotificationCallbacks.onNewCallNotification)(callFromPush, nonRingingNotificationType);
|
|
@@ -159,4 +162,19 @@ exports.clearPushWSEventSubscriptions = clearPushWSEventSubscriptions;
|
|
|
159
162
|
const canAddPushWSSubscriptionsRef = exports.canAddPushWSSubscriptionsRef = {
|
|
160
163
|
current: true
|
|
161
164
|
};
|
|
165
|
+
const canListenToWS = () => canAddPushWSSubscriptionsRef.current && _reactNative.AppState.currentState !== 'active';
|
|
166
|
+
exports.canListenToWS = canListenToWS;
|
|
167
|
+
const shouldCallBeClosed = (call, pushData) => {
|
|
168
|
+
const created_by_id = pushData?.created_by_id;
|
|
169
|
+
const receiver_id = pushData?.receiver_id;
|
|
170
|
+
const {
|
|
171
|
+
mustEndCall,
|
|
172
|
+
endCallReason
|
|
173
|
+
} = shouldCallBeEnded(call, created_by_id, receiver_id);
|
|
174
|
+
return {
|
|
175
|
+
mustEndCall,
|
|
176
|
+
endCallReason
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
exports.shouldCallBeClosed = shouldCallBeClosed;
|
|
162
180
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_videoClient","require","_newNotificationCallbacks","_constants","shouldCallBeEnded","callFromPush","created_by_id","receiver_id","callSession","state","session","rejected_by","accepted_by","mustEndCall","
|
|
1
|
+
{"version":3,"names":["_videoClient","require","_newNotificationCallbacks","_constants","_reactNative","logger","videoLoggerSystem","getLogger","shouldCallBeEnded","callFromPush","created_by_id","receiver_id","callSession","state","session","rejected_by","accepted_by","mustEndCall","endCallReason","endedAt","debug","cid","exports","processCallFromPushInBackground","pushConfig","call_cid","action","onIOSActionCanBeFulfilled","videoClient","createStreamVideoClient","Error","e","error","onRingingCall","publishOptions","updatePublishOptions","callingState","CallingState","RINGING","IDLE","join","warn","alreadyLeft","LEFT","canReject","isCurrentUserMember","members","some","member","user_id","currentUserId","reject","leave","reason","processNonIncomingCallFromPush","client","nonRingingNotificationType","_callFromPush","calls","find","c","callType","callId","split","call","get","nonRingingCallLogger","onNewCallNotification","clearPushWSEventSubscriptions","unsubscriptionCallbacks","pushUnsubscriptionCallbacks","forEach","cb","delete","canAddPushWSSubscriptionsRef","current","canListenToWS","AppState","currentState","shouldCallBeClosed","pushData"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/utils.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAUA,IAAAC,yBAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,MAAMI,MAAM,GAAGC,8BAAiB,CAACC,SAAS,CAAC,UAAU,CAAC;AAGtD;AACA;AACA;AACA;AACO,MAAMC,iBAAiB,GAAGA,CAC/BC,YAAkB,EAClBC,aAAiC,EACjCC,WAA+B,KAC5B;EACH,MAAMC,WAAW,GAAGH,YAAY,CAACI,KAAK,CAACC,OAAO;EAC9C,MAAMC,WAAW,GAAGH,WAAW,EAAEG,WAAW;EAC5C,MAAMC,WAAW,GAAGJ,WAAW,EAAEI,WAAW;EAC5C,IAAIC,WAAW,GAAG,KAAK;EACvB,IAAIC,aAA4B,GAAG,SAAS;EAE5C,IAAIT,YAAY,CAACI,KAAK,CAACM,OAAO,EAAE;IAC9BF,WAAW,GAAG,IAAI;IAClBC,aAAa,GAAG,QAAQ;EAC1B,CAAC,MAAM,IAAIR,aAAa,IAAIK,WAAW,EAAE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,CACxB,6CAA6C,EAC7CD,CACF,CAAC;IACD;EACF;EACA,IAAAoC,+CAAqB,EAAC1D,YAAY,EAAE+C,0BAA0B,CAAC;AACjE,CAAC;;AAED;AACA;AACA;AACA;AAHAlC,OAAA,CAAAgC,8BAAA,GAAAA,8BAAA;AAIO,MAAMc,6BAA6B,GAAI3C,QAAgB,IAAK;EACjE,MAAM4C,uBAAuB,GAAGC,sCAA2B,CAACL,GAAG,CAACxC,QAAQ,CAAC;EACzE,IAAI4C,uBAAuB,EAAE;IAC3BA,uBAAuB,CAACE,OAAO,CAAEC,EAAE,IAAKA,EAAE,CAAC,CAAC,CAAC;IAC7CF,sCAA2B,CAACG,MAAM,CAAChD,QAAQ,CAAC;EAC9C;AACF,CAAC;;AAED;AACA;AACA;AACA;AAHAH,OAAA,CAAA8C,6BAAA,GAAAA,6BAAA;AAIO,MAAMM,4BAA0D,GAAApD,OAAA,CAAAoD,4BAAA,GAAG;EACxEC,OAAO,EAAE;AACX,CAAC;AAEM,MAAMC,aAAa,GAAGA,CAAA,KAC3BF,4BAA4B,CAACC,OAAO,IAAIE,qBAAQ,CAACC,YAAY,KAAK,QAAQ;AAACxD,OAAA,CAAAsD,aAAA,GAAAA,aAAA;AAEtE,MAAMG,kBAAkB,GAAGA,CAChCf,IAAU,EACVgB,QAA4C,KACzC;EACH,MAAMtE,aAAa,GAAGsE,QAAQ,EAAEtE,aAAuB;EACvD,MAAMC,WAAW,GAAGqE,QAAQ,EAAErE,WAAqB;EAEnD,MAAM;IAAEM,WAAW;IAAEC;EAAc,CAAC,GAAGV,iBAAiB,CACtDwD,IAAI,EACJtD,aAAa,EACbC,WACF,CAAC;EACD,OAAO;IAAEM,WAAW;IAAEC;EAAc,CAAC;AACvC,CAAC;AAACI,OAAA,CAAAyD,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_rxSubjects","_libs","_videoClient","_pushLogoutCallback","_StreamVideoRN","lastApnToken","token","userId","processNonRingingNotificationStreamPayload","streamPayload","sender","type","cid","call_cid","logger","videoLoggerSystem","getLogger","trace","pushNonRingingCallData$","next","undefined","oniOSExpoNotificationEvent","event","pushConfig","StreamVideoRN","getConfig","push","trigger","request","payload","stream","JSON","stringify","exports","oniOSNotifeeEvent","Platform","OS","detail","notifeeLib","getNotifeeLibThrowIfNotInstalledForPush","EventType","PRESS","notification","data","result","debug","onTapNonRingingCallNotification","onPushNotificationiOSStreamVideoEvent","pushNotificationIosLib","getPushNotificationIosLib","getData","isClicked","userInteraction","finish","FetchResult","NoData","initIosNonVoipToken","client","setUnsubscribeListener","ios","pushProviderName","setDeviceToken","streamClient","_user","id","setPushLogoutCallback","removeDevice","err","warn","push_provider_name","addDevice","then","catch","isExpo","expoNotificationsLib","getExpoNotificationsLib","getDevicePushTokenAsync","devicePushToken","subscription","addPushTokenListener","remove","addEventListener","removeEventListener"],"sourceRoot":"../../../../src","sources":["utils/push/ios.ts"],"mappings":";;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAOA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AAEA,IAAAK,cAAA,GAAAL,OAAA;AAKA,IAAIM,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,GAAGC,8BAAiB,CAACC,SAAS,CACxC,4CACF,CAAC;IACDF,MAAM,CAACG,KAAK,CAAC,eAAeL,GAAG,KAAKD,IAAI,EAAE,CAAC;IAC3CO,mCAAuB,CAACC,IAAI,CAAC;MAAEP,GAAG;MAAED;IAAK,CAAC,CAAC;IAC3C,OAAO;MAAEC,GAAG;MAAED;IAAK,CAAC;EACtB;EACA,OAAOS,SAAS;AAClB;AAEO,MAAMC,0BAA0B,GAAIC,KAAuB,IAAK;EACrE,MAAMC,UAAU,GAAGC,4BAAa,CAACC,SAAS,CAAC,CAAC,CAACC,IAAI;EACjD,IAAIH,UAAU,EAAE;IACd,MAAMI,OAAO,GAAGL,KAAK,CAACM,OAAO,CAACD,OAAO;IACrC,IACEA,OAAO,IACP,OAAOA,OAAO,KAAK,QAAQ,IAC3B,MAAM,IAAIA,OAAO,IACjBA,OAAO,CAAChB,IAAI,KAAK,MAAM,IACvBgB,OAAO,CAACE,OAAO,EAAEC,MAAM,EACvB;MACA,MAAMrB,aAAa,GAAGkB,OAAO,CAACE,OAAO,CAACC,MAA2B;MACjE,MAAMhB,MAAM,GAAGC,8BAAiB,CAACC,SAAS,CACxC,4CACF,CAAC;MACDF,MAAM,CAACG,KAAK,CACV,gDAAgDc,IAAI,CAACC,SAAS,CAC5DvB,aACF,CAAC,EACH,CAAC;MACDD,0CAA0C,CAACC,aAAa,CAAC;IAC3D;EACF;AACF,CAAC;AAACwB,OAAA,CAAAZ,0BAAA,GAAAA,0BAAA;AAEK,MAAMa,iBAAiB,GAAGA,CAAC;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_rxSubjects","_libs","_videoClient","_pushLogoutCallback","_StreamVideoRN","lastApnToken","token","userId","processNonRingingNotificationStreamPayload","streamPayload","sender","type","cid","call_cid","logger","videoLoggerSystem","getLogger","trace","pushNonRingingCallData$","next","undefined","oniOSExpoNotificationEvent","event","pushConfig","StreamVideoRN","getConfig","push","trigger","request","payload","stream","JSON","stringify","exports","oniOSNotifeeEvent","Platform","OS","detail","notifeeLib","getNotifeeLibThrowIfNotInstalledForPush","EventType","PRESS","notification","data","result","debug","onTapNonRingingCallNotification","onPushNotificationiOSStreamVideoEvent","pushNotificationIosLib","getPushNotificationIosLib","getData","isClicked","userInteraction","finish","FetchResult","NoData","initIosNonVoipToken","client","setUnsubscribeListener","ios","pushProviderName","setDeviceToken","streamClient","_user","id","setPushLogoutCallback","removeDevice","err","warn","push_provider_name","addDevice","then","catch","isExpo","expoNotificationsLib","getExpoNotificationsLib","getDevicePushTokenAsync","devicePushToken","subscription","addPushTokenListener","remove","addEventListener","removeEventListener"],"sourceRoot":"../../../../src","sources":["utils/push/ios.ts"],"mappings":";;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAOA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AAEA,IAAAK,cAAA,GAAAL,OAAA;AAKA,IAAIM,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,GAAGC,8BAAiB,CAACC,SAAS,CACxC,4CACF,CAAC;IACDF,MAAM,CAACG,KAAK,CAAC,eAAeL,GAAG,KAAKD,IAAI,EAAE,CAAC;IAC3CO,mCAAuB,CAACC,IAAI,CAAC;MAAEP,GAAG;MAAED;IAAK,CAAC,CAAC;IAC3C,OAAO;MAAEC,GAAG;MAAED;IAAK,CAAC;EACtB;EACA,OAAOS,SAAS;AAClB;AAEO,MAAMC,0BAA0B,GAAIC,KAAuB,IAAK;EACrE,MAAMC,UAAU,GAAGC,4BAAa,CAACC,SAAS,CAAC,CAAC,CAACC,IAA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AAC;IACxD,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.extractCallingExpOptions = extractCallingExpOptions;
|
|
7
|
+
exports.getCallingxLib = getCallingxLib;
|
|
8
|
+
exports.getCallingxLibIfAvailable = getCallingxLibIfAvailable;
|
|
9
|
+
let callingx;
|
|
10
|
+
try {
|
|
11
|
+
callingx = require('@stream-io/react-native-callingx').CallingxModule;
|
|
12
|
+
} catch {}
|
|
13
|
+
function getCallingxLib() {
|
|
14
|
+
if (!callingx) {
|
|
15
|
+
throw Error('react-native-callingx library is not installed.');
|
|
16
|
+
}
|
|
17
|
+
return callingx;
|
|
18
|
+
}
|
|
19
|
+
function getCallingxLibIfAvailable() {
|
|
20
|
+
return callingx ?? undefined;
|
|
21
|
+
}
|
|
22
|
+
function extractCallingExpOptions(config) {
|
|
23
|
+
const {
|
|
24
|
+
push: pushConfig,
|
|
25
|
+
foregroundService: foregroundServiceConfig
|
|
26
|
+
} = config;
|
|
27
|
+
const callingExpOptions = {};
|
|
28
|
+
if (pushConfig?.ios) {
|
|
29
|
+
const iosOptions = {};
|
|
30
|
+
if (pushConfig.ios.supportsVideo !== undefined) {
|
|
31
|
+
iosOptions.supportsVideo = pushConfig.ios.supportsVideo;
|
|
32
|
+
}
|
|
33
|
+
if (pushConfig.ios.sound !== undefined) {
|
|
34
|
+
iosOptions.sound = pushConfig.ios.sound;
|
|
35
|
+
}
|
|
36
|
+
if (pushConfig.ios.imageName !== undefined) {
|
|
37
|
+
iosOptions.imageName = pushConfig.ios.imageName;
|
|
38
|
+
}
|
|
39
|
+
if (pushConfig.ios.callsHistory !== undefined) {
|
|
40
|
+
iosOptions.callsHistory = pushConfig.ios.callsHistory;
|
|
41
|
+
}
|
|
42
|
+
if (pushConfig.ios.displayCallTimeout !== undefined) {
|
|
43
|
+
iosOptions.displayCallTimeout = pushConfig.ios.displayCallTimeout;
|
|
44
|
+
}
|
|
45
|
+
if (Object.keys(iosOptions).length > 0) {
|
|
46
|
+
callingExpOptions.ios = iosOptions;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const androidOptions = {};
|
|
50
|
+
if (pushConfig?.android) {
|
|
51
|
+
if (pushConfig.android.incomingChannel) {
|
|
52
|
+
androidOptions.incomingChannel = pushConfig.android.incomingChannel;
|
|
53
|
+
}
|
|
54
|
+
if (pushConfig.android.titleTransformer) {
|
|
55
|
+
androidOptions.titleTransformer = pushConfig.android.titleTransformer;
|
|
56
|
+
}
|
|
57
|
+
if (pushConfig.android.notificationTexts) {
|
|
58
|
+
androidOptions.notificationTexts = pushConfig.android.notificationTexts;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (foregroundServiceConfig.android.channel) {
|
|
62
|
+
androidOptions.ongoingChannel = foregroundServiceConfig.android.channel;
|
|
63
|
+
}
|
|
64
|
+
if (Object.keys(androidOptions).length > 0) {
|
|
65
|
+
callingExpOptions.android = androidOptions;
|
|
66
|
+
}
|
|
67
|
+
if (pushConfig?.shouldRejectCallWhenBusy !== undefined) {
|
|
68
|
+
callingExpOptions.shouldRejectCallWhenBusy = pushConfig.shouldRejectCallWhenBusy;
|
|
69
|
+
}
|
|
70
|
+
if (pushConfig?.enableOngoingCalls !== undefined) {
|
|
71
|
+
callingExpOptions.enableOngoingCalls = pushConfig?.enableOngoingCalls;
|
|
72
|
+
}
|
|
73
|
+
return callingExpOptions;
|
|
74
|
+
}
|
|
75
|
+
//# 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","notificationTexts","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;AAEF,SAASC,cAAcA,CAAA,EAAG;EAC/B,IAAI,CAACH,QAAQ,EAAE;IACb,MAAMI,KAAK,CAAC,iDAAiD,CAAC;EAChE;EACA,OAAOJ,QAAQ;AACjB;AAEO,SAASK,yBAAyBA,CAAA,EAAG;EAC1C,OAAOL,QAAQ,IAAIM,SAAS;AAC9B;AAEO,SAASC,wBAAwBA,CACtCC,MAAyB,EACN;EACnB,MAAM;IAAEC,IAAI,EAAEC,UAAU;IAAEC,iBAAiB,EAAEC;EAAwB,CAAC,GACpEJ,MAAM;EACR,MAAMK,iBAAoC,GAAG,CAAC,CAAC;EAE/C,IAAIH,UAAU,EAAEI,GAAG,EAAE;IACnB,MAAMC,UAAoC,GAAG,CAAC,CAAC;IAC/C,IAAIL,UAAU,CAACI,GAAG,CAACE,aAAa,KAAKV,SAAS,EAAE;MAC9CS,UAAU,CAACC,aAAa,GAAGN,UAAU,CAACI,GAAG,CAACE,aAAa;IACzD;IACA,IAAIN,UAAU,CAACI,GAAG,CAACG,KAAK,KAAKX,SAAS,EAAE;MACtCS,UAAU,CAACE,KAAK,GAAGP,UAAU,CAACI,GAAG,CAACG,KAAK;IACzC;IACA,IAAIP,UAAU,CAACI,GAAG,CAACI,SAAS,KAAKZ,SAAS,EAAE;MAC1CS,UAAU,CAACG,SAAS,GAAGR,UAAU,CAACI,GAAG,CAACI,SAAS;IACjD;IACA,IAAIR,UAAU,CAACI,GAAG,CAACK,YAAY,KAAKb,SAAS,EAAE;MAC7CS,UAAU,CAACI,YAAY,GAAGT,UAAU,CAACI,GAA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,kBAAkB;EACvE;EAEA,OAAOnB,iBAAiB;AAC1B","ignoreList":[]}
|
|
@@ -36,36 +36,25 @@ Object.keys(_iosPushNotification).forEach(function (key) {
|
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
|
-
var
|
|
40
|
-
Object.keys(
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _voipPushNotification[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _voipPushNotification[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var _callkeep = require("./callkeep");
|
|
51
|
-
Object.keys(_callkeep).forEach(function (key) {
|
|
39
|
+
var _notifee = require("./notifee");
|
|
40
|
+
Object.keys(_notifee).forEach(function (key) {
|
|
52
41
|
if (key === "default" || key === "__esModule") return;
|
|
53
|
-
if (key in exports && exports[key] ===
|
|
42
|
+
if (key in exports && exports[key] === _notifee[key]) return;
|
|
54
43
|
Object.defineProperty(exports, key, {
|
|
55
44
|
enumerable: true,
|
|
56
45
|
get: function () {
|
|
57
|
-
return
|
|
46
|
+
return _notifee[key];
|
|
58
47
|
}
|
|
59
48
|
});
|
|
60
49
|
});
|
|
61
|
-
var
|
|
62
|
-
Object.keys(
|
|
50
|
+
var _callingx = require("./callingx");
|
|
51
|
+
Object.keys(_callingx).forEach(function (key) {
|
|
63
52
|
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (key in exports && exports[key] ===
|
|
53
|
+
if (key in exports && exports[key] === _callingx[key]) return;
|
|
65
54
|
Object.defineProperty(exports, key, {
|
|
66
55
|
enumerable: true,
|
|
67
56
|
get: function () {
|
|
68
|
-
return
|
|
57
|
+
return _callingx[key];
|
|
69
58
|
}
|
|
70
59
|
});
|
|
71
60
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_expoNotifications","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_firebaseMessaging","_iosPushNotification","
|
|
1
|
+
{"version":3,"names":["_expoNotifications","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_firebaseMessaging","_iosPushNotification","_notifee","_callingx"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/index.ts"],"mappings":";;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,kBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,kBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,kBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,kBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,kBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,kBAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,kBAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,oBAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,oBAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,oBAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;I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