@stream-io/video-react-native-sdk 1.29.0-beta.1 → 1.29.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 +3114 -0
- package/android/src/main/AndroidManifest.xml +1 -8
- package/android/src/main/AndroidManifestNew.xml +0 -11
- package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNativeModule.kt +5 -42
- package/android/src/main/java/com/streamvideo/reactnative/audio/utils/WebRtcAudioUtils.kt +6 -70
- package/android/src/main/java/com/streamvideo/reactnative/callmanager/StreamInCallManagerModule.kt +4 -6
- package/android/src/main/java/com/streamvideo/reactnative/util/CallAliveServiceChecker.kt +95 -0
- package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js +160 -0
- package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -0
- package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js +31 -18
- package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
- package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js +97 -64
- package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/commonjs/index.js +0 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/modules/call-manager/CallManager.js +0 -26
- 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 +21 -33
- package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/commonjs/utils/internal/registerSDKGlobals.js +3 -52
- package/dist/commonjs/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/commonjs/utils/push/android.js +200 -145
- package/dist/commonjs/utils/push/android.js.map +1 -1
- package/dist/commonjs/utils/push/internal/ios.js +34 -16
- package/dist/commonjs/utils/push/internal/ios.js.map +1 -1
- package/dist/commonjs/utils/push/internal/rxSubjects.js +20 -1
- package/dist/commonjs/utils/push/internal/rxSubjects.js.map +1 -1
- package/dist/commonjs/utils/push/internal/utils.js +1 -17
- 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/callkeep.js +17 -0
- package/dist/commonjs/utils/push/libs/callkeep.js.map +1 -0
- package/dist/commonjs/utils/push/libs/index.js +19 -8
- package/dist/commonjs/utils/push/libs/index.js.map +1 -1
- package/dist/commonjs/utils/push/libs/notifee/index.js +19 -0
- package/dist/commonjs/utils/push/libs/notifee/index.js.map +1 -1
- package/dist/commonjs/utils/push/libs/voipPushNotification.js +17 -0
- package/dist/commonjs/utils/push/libs/voipPushNotification.js.map +1 -0
- package/dist/commonjs/utils/push/setupIosCallKeepEvents.js +205 -0
- package/dist/commonjs/utils/push/setupIosCallKeepEvents.js.map +1 -0
- package/dist/commonjs/utils/push/setupIosVoipPushEvents.js +6 -7
- 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/hooks/push/useIosCallkeepWithCallingStateEffect.js +153 -0
- package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -0
- package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +31 -18
- package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +99 -66
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/module/index.js +0 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/modules/call-manager/CallManager.js +0 -26
- 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 +21 -33
- package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/module/utils/internal/registerSDKGlobals.js +4 -53
- package/dist/module/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/module/utils/push/android.js +202 -147
- package/dist/module/utils/push/android.js.map +1 -1
- package/dist/module/utils/push/internal/ios.js +34 -16
- package/dist/module/utils/push/internal/ios.js.map +1 -1
- package/dist/module/utils/push/internal/rxSubjects.js +19 -0
- package/dist/module/utils/push/internal/rxSubjects.js.map +1 -1
- package/dist/module/utils/push/internal/utils.js +0 -14
- 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/callkeep.js +11 -0
- package/dist/module/utils/push/libs/callkeep.js.map +1 -0
- package/dist/module/utils/push/libs/index.js +2 -1
- package/dist/module/utils/push/libs/index.js.map +1 -1
- package/dist/module/utils/push/libs/notifee/index.js +18 -0
- package/dist/module/utils/push/libs/notifee/index.js.map +1 -1
- package/dist/module/utils/push/libs/voipPushNotification.js +11 -0
- package/dist/module/utils/push/libs/voipPushNotification.js.map +1 -0
- package/dist/module/utils/push/setupIosCallKeepEvents.js +199 -0
- package/dist/module/utils/push/setupIosCallKeepEvents.js.map +1 -0
- package/dist/module/utils/push/setupIosVoipPushEvents.js +6 -7
- 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/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts +5 -0
- package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.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 +0 -1
- package/dist/typescript/index.d.ts.map +1 -1
- package/dist/typescript/modules/call-manager/CallManager.d.ts +0 -5
- package/dist/typescript/modules/call-manager/CallManager.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/index.d.ts +2 -20
- package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/types.d.ts +29 -54
- package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
- package/dist/typescript/utils/internal/registerSDKGlobals.d.ts.map +1 -1
- package/dist/typescript/utils/push/android.d.ts +2 -1
- 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 +12 -0
- package/dist/typescript/utils/push/internal/rxSubjects.d.ts.map +1 -1
- package/dist/typescript/utils/push/internal/utils.d.ts +0 -4
- package/dist/typescript/utils/push/internal/utils.d.ts.map +1 -1
- package/dist/typescript/utils/push/ios.d.ts +2 -1
- package/dist/typescript/utils/push/ios.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/callkeep.d.ts +3 -0
- package/dist/typescript/utils/push/libs/callkeep.d.ts.map +1 -0
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts +2 -16
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/index.d.ts +2 -1
- package/dist/typescript/utils/push/libs/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/notifee/index.d.ts +1 -0
- package/dist/typescript/utils/push/libs/notifee/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/voipPushNotification.d.ts +3 -0
- package/dist/typescript/utils/push/libs/voipPushNotification.d.ts.map +1 -0
- package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts +6 -0
- package/dist/typescript/utils/push/setupIosCallKeepEvents.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 +33 -1
- package/expo-config-plugin/dist/withAndroidPermissions.js +7 -2
- package/expo-config-plugin/dist/withAppDelegate.js +197 -19
- package/expo-config-plugin/dist/withMainActivity.js +1 -1
- package/expo-config-plugin/dist/withiOSInfoPlist.js +3 -2
- package/ios/StreamInCallManager.m +0 -2
- package/ios/StreamInCallManager.swift +5 -20
- package/ios/StreamVideoReactNative.h +4 -7
- package/ios/StreamVideoReactNative.m +82 -191
- package/package.json +17 -12
- package/src/hooks/push/useIosCallkeepWithCallingStateEffect.ts +235 -0
- package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +34 -21
- package/src/hooks/useAndroidKeepCallAliveEffect.ts +120 -94
- package/src/index.ts +0 -1
- package/src/modules/call-manager/CallManager.ts +0 -36
- package/src/modules/call-manager/native-module.d.ts +0 -7
- package/src/providers/StreamCall/index.tsx +6 -6
- package/src/utils/StreamVideoRN/index.ts +30 -40
- package/src/utils/StreamVideoRN/types.ts +29 -56
- package/src/utils/internal/registerSDKGlobals.ts +4 -47
- package/src/utils/push/android.ts +308 -223
- package/src/utils/push/internal/ios.ts +46 -25
- package/src/utils/push/internal/rxSubjects.ts +29 -0
- package/src/utils/push/internal/utils.ts +0 -25
- package/src/utils/push/ios.ts +6 -1
- package/src/utils/push/libs/callkeep.ts +16 -0
- package/src/utils/push/libs/index.ts +2 -1
- package/src/utils/push/libs/notifee/index.ts +27 -0
- package/src/utils/push/libs/voipPushNotification.ts +17 -0
- package/src/utils/push/setupIosCallKeepEvents.ts +252 -0
- package/src/utils/push/setupIosVoipPushEvents.ts +7 -11
- package/src/version.ts +1 -1
- package/android/src/main/java/com/streamvideo/reactnative/keepalive/KeepAliveNotification.kt +0 -83
- package/android/src/main/java/com/streamvideo/reactnative/keepalive/StreamCallKeepAliveHeadlessService.kt +0 -134
- package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js +0 -216
- package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js.map +0 -1
- package/dist/commonjs/utils/internal/audioSessionPromise.js +0 -46
- package/dist/commonjs/utils/internal/audioSessionPromise.js.map +0 -1
- package/dist/commonjs/utils/internal/callingx.js +0 -84
- package/dist/commonjs/utils/internal/callingx.js.map +0 -1
- package/dist/commonjs/utils/keepCallAliveHeadlessTask.js +0 -48
- package/dist/commonjs/utils/keepCallAliveHeadlessTask.js.map +0 -1
- package/dist/commonjs/utils/push/libs/callingx.js +0 -75
- package/dist/commonjs/utils/push/libs/callingx.js.map +0 -1
- package/dist/commonjs/utils/push/setupCallingExpEvents.js +0 -97
- package/dist/commonjs/utils/push/setupCallingExpEvents.js.map +0 -1
- package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js +0 -209
- package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js.map +0 -1
- package/dist/module/utils/internal/audioSessionPromise.js +0 -39
- package/dist/module/utils/internal/audioSessionPromise.js.map +0 -1
- package/dist/module/utils/internal/callingx.js +0 -75
- package/dist/module/utils/internal/callingx.js.map +0 -1
- package/dist/module/utils/keepCallAliveHeadlessTask.js +0 -42
- package/dist/module/utils/keepCallAliveHeadlessTask.js.map +0 -1
- package/dist/module/utils/push/libs/callingx.js +0 -67
- package/dist/module/utils/push/libs/callingx.js.map +0 -1
- package/dist/module/utils/push/setupCallingExpEvents.js +0 -91
- package/dist/module/utils/push/setupCallingExpEvents.js.map +0 -1
- package/dist/typescript/hooks/push/useCallingExpWithCallingStateEffect.d.ts +0 -5
- package/dist/typescript/hooks/push/useCallingExpWithCallingStateEffect.d.ts.map +0 -1
- package/dist/typescript/utils/internal/audioSessionPromise.d.ts +0 -16
- package/dist/typescript/utils/internal/audioSessionPromise.d.ts.map +0 -1
- package/dist/typescript/utils/internal/callingx.d.ts +0 -13
- package/dist/typescript/utils/internal/callingx.d.ts.map +0 -1
- package/dist/typescript/utils/keepCallAliveHeadlessTask.d.ts +0 -10
- package/dist/typescript/utils/keepCallAliveHeadlessTask.d.ts.map +0 -1
- package/dist/typescript/utils/push/libs/callingx.d.ts +0 -9
- package/dist/typescript/utils/push/libs/callingx.d.ts.map +0 -1
- package/dist/typescript/utils/push/setupCallingExpEvents.d.ts +0 -8
- package/dist/typescript/utils/push/setupCallingExpEvents.d.ts.map +0 -1
- package/src/hooks/push/useCallingExpWithCallingStateEffect.ts +0 -307
- package/src/utils/internal/audioSessionPromise.ts +0 -39
- package/src/utils/internal/callingx.ts +0 -108
- package/src/utils/keepCallAliveHeadlessTask.ts +0 -54
- package/src/utils/push/libs/callingx.ts +0 -90
- package/src/utils/push/setupCallingExpEvents.ts +0 -117
|
@@ -5,68 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.registerSDKGlobals = registerSDKGlobals;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
|
-
var _callingx = require("../push/libs/callingx");
|
|
9
|
-
var _callingx2 = require("./callingx");
|
|
10
8
|
const StreamInCallManagerNativeModule = _reactNative.NativeModules.StreamInCallManager;
|
|
11
|
-
const CallingxModule = (0, _callingx.getCallingxLibIfAvailable)();
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Checks if StreamInCallManager should be bypassed because CallKit is handling
|
|
15
|
-
* the audio session via CallingX.
|
|
16
|
-
*
|
|
17
|
-
* On iOS, when CallingX is set up and has a registered call, the audio session
|
|
18
|
-
* is managed by CallKit through CallingxImpl.swift.
|
|
19
|
-
* In this case, StreamInCallManager should not run to avoid conflicting audio
|
|
20
|
-
* session configurations.
|
|
21
|
-
*/
|
|
22
|
-
const shouldBypassForCallKit = ({
|
|
23
|
-
isRingingTypeCall
|
|
24
|
-
}) => {
|
|
25
|
-
if (_reactNative.Platform.OS !== 'ios') {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
if (!CallingxModule) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
const bypass = CallingxModule.isSetup && (isRingingTypeCall || CallingxModule.isOngoingCallsEnabled);
|
|
32
|
-
return bypass;
|
|
33
|
-
};
|
|
34
9
|
const streamRNVideoSDKGlobals = {
|
|
35
|
-
callingX: {
|
|
36
|
-
startCall: _callingx2.startCallingxCall,
|
|
37
|
-
endCall: _callingx2.endCallingxCall
|
|
38
|
-
},
|
|
39
10
|
callManager: {
|
|
40
11
|
setup: ({
|
|
41
|
-
defaultDevice
|
|
42
|
-
isRingingTypeCall
|
|
12
|
+
defaultDevice
|
|
43
13
|
}) => {
|
|
44
|
-
if (shouldBypassForCallKit({
|
|
45
|
-
isRingingTypeCall
|
|
46
|
-
})) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
14
|
StreamInCallManagerNativeModule.setDefaultAudioDeviceEndpointType(defaultDevice);
|
|
50
15
|
StreamInCallManagerNativeModule.setup();
|
|
51
16
|
},
|
|
52
|
-
start: ({
|
|
53
|
-
isRingingTypeCall
|
|
54
|
-
}) => {
|
|
55
|
-
if (shouldBypassForCallKit({
|
|
56
|
-
isRingingTypeCall
|
|
57
|
-
})) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
17
|
+
start: () => {
|
|
60
18
|
StreamInCallManagerNativeModule.start();
|
|
61
19
|
},
|
|
62
|
-
stop: ({
|
|
63
|
-
isRingingTypeCall
|
|
64
|
-
}) => {
|
|
65
|
-
if (shouldBypassForCallKit({
|
|
66
|
-
isRingingTypeCall
|
|
67
|
-
})) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
20
|
+
stop: () => {
|
|
70
21
|
StreamInCallManagerNativeModule.stop();
|
|
71
22
|
}
|
|
72
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","StreamInCallManagerNativeModule","NativeModules","StreamInCallManager","streamRNVideoSDKGlobals","callManager","setup","defaultDevice","setDefaultAudioDeviceEndpointType","start","stop","registerSDKGlobals","global","streamRNVideoSDK"],"sourceRoot":"../../../../src","sources":["utils/internal/registerSDKGlobals.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAEA,MAAMC,+BAA+B,GAAGC,0BAAa,CAACC,mBAAmB;AAEzE,MAAMC,uBAAgD,GAAG;EACvDC,WAAW,EAAE;IACXC,KAAK,EAAEA,CAAC;MAAEC;IAAc,CAAC,KAAK;MAC5BN,+BAA+B,CAACO,iCAAiC,CAC/DD,aACF,CAAC;MACDN,+BAA+B,CAACK,KAAK,CAAC,CAAC;IACzC,CAAC;IACDG,KAAK,EAAEA,CAAA,KAAM;MACXR,+BAA+B,CAACQ,KAAK,CAAC,CAAC;IACzC,CAAC;IACDC,IAAI,EAAEA,CAAA,KAAM;MACVT,+BAA+B,CAACS,IAAI,CAAC,CAAC;IACxC;EACF;AACF,CAAC;;AAED;AACA;AACA;AACO,SAASC,kBAAkBA,CAAA,EAAG;EACnC,IAAI,CAACC,MAAM,CAACC,gBAAgB,EAAE;IAC5BD,MAAM,CAACC,gBAAgB,GAAGT,uBAAuB;EACnD;AACF","ignoreList":[]}
|
|
@@ -13,8 +13,10 @@ var _rxSubjects = require("./internal/rxSubjects");
|
|
|
13
13
|
var _constants = require("./internal/constants");
|
|
14
14
|
var _utils = require("./internal/utils");
|
|
15
15
|
var _pushLogoutCallback = require("../internal/pushLogoutCallback");
|
|
16
|
+
var _getAndroidDefaultRingtoneUrl = require("../getAndroidDefaultRingtoneUrl");
|
|
16
17
|
var _StreamVideoRN = require("../StreamVideoRN");
|
|
17
|
-
|
|
18
|
+
const ACCEPT_CALL_ACTION_ID = 'accept';
|
|
19
|
+
const DECLINE_CALL_ACTION_ID = 'decline';
|
|
18
20
|
let lastFirebaseToken = {
|
|
19
21
|
token: '',
|
|
20
22
|
userId: ''
|
|
@@ -69,7 +71,8 @@ async function initAndroidPushToken(client, pushConfig, setUnsubscribeListener)
|
|
|
69
71
|
await setDeviceToken(token);
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
|
-
|
|
74
|
+
// TODO: remove the incomingCallChannel check and find a better way once we have telecom integration for android
|
|
75
|
+
const messaging = pushConfig.isExpo && !pushConfig.android.incomingCallChannel ? (0, _libs.getFirebaseMessagingLibNoThrow)(true) : (0, _libs.getFirebaseMessagingLib)();
|
|
73
76
|
if (messaging) {
|
|
74
77
|
logger.debug(`setting firebase token listeners`);
|
|
75
78
|
const unsubscribe = messaging().onTokenRefresh(refreshedToken => setDeviceToken(refreshedToken));
|
|
@@ -83,8 +86,8 @@ async function initAndroidPushToken(client, pushConfig, setUnsubscribeListener)
|
|
|
83
86
|
* Creates notification from the push message data.
|
|
84
87
|
* For Ringing and Non-Ringing calls.
|
|
85
88
|
*/
|
|
86
|
-
|
|
87
89
|
const firebaseDataHandler = async data => {
|
|
90
|
+
if (_reactNative.Platform.OS !== 'android') return;
|
|
88
91
|
/* Example data from firebase
|
|
89
92
|
"message": {
|
|
90
93
|
"data": {
|
|
@@ -100,167 +103,174 @@ const firebaseDataHandler = async data => {
|
|
|
100
103
|
// other stuff
|
|
101
104
|
}
|
|
102
105
|
*/
|
|
103
|
-
if (_reactNative.Platform.OS !== 'android') return;
|
|
104
|
-
const logger = _videoClient.videoLoggerSystem.getLogger('firebaseDataHandler');
|
|
105
106
|
const pushConfig = _StreamVideoRN.StreamVideoRN.getConfig().push;
|
|
106
107
|
if (!pushConfig || !data || data.sender !== 'stream.video') {
|
|
107
108
|
return;
|
|
108
109
|
}
|
|
110
|
+
const notifeeLib = (0, _libs.getNotifeeLibThrowIfNotInstalledForPush)();
|
|
111
|
+
const notifee = notifeeLib.default;
|
|
112
|
+
const settings = await notifee.getNotificationSettings();
|
|
113
|
+
if (settings.authorizationStatus !== 1) {
|
|
114
|
+
const logger = _videoClient.videoLoggerSystem.getLogger('firebaseDataHandler');
|
|
115
|
+
logger.debug(`Notification permission not granted, unable to post ${data.type} notifications`);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
109
118
|
if (data.type === 'call.ring') {
|
|
110
119
|
const call_cid = data.call_cid;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
logger.debug(`video client not found, skipping the call.ring notification`);
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
const shouldRejectCallWhenBusy = client['rejectCallWhenBusy'] ?? false;
|
|
127
|
-
if (callingx.hasRegisteredCall() && shouldRejectCallWhenBusy) {
|
|
128
|
-
logger.debug(`registered call found, skipping the call.ring notification`);
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
const asForegroundService = (0, _utils.canListenToWS)();
|
|
132
|
-
const callerName = data.created_by_display_name;
|
|
133
|
-
const hasVideo = data.video === 'true';
|
|
120
|
+
const created_by_id = data.created_by_id;
|
|
121
|
+
const receiver_id = data.receiver_id;
|
|
122
|
+
const video_client = await pushConfig.createStreamVideoClient();
|
|
123
|
+
await video_client?.onRingingCall(call_cid);
|
|
124
|
+
const shouldCallBeClosed = callToCheck => {
|
|
125
|
+
const {
|
|
126
|
+
mustEndCall
|
|
127
|
+
} = (0, _utils.shouldCallBeEnded)(callToCheck, created_by_id, receiver_id);
|
|
128
|
+
return mustEndCall;
|
|
129
|
+
};
|
|
130
|
+
const canListenToWS = () => _utils.canAddPushWSSubscriptionsRef.current && _reactNative.AppState.currentState !== 'active';
|
|
131
|
+
const asForegroundService = canListenToWS();
|
|
134
132
|
if (asForegroundService) {
|
|
135
133
|
// Listen to call events from WS through fg service
|
|
136
134
|
// note: this will replace the current empty fg service runner
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
callingx.endCallWithReason(call_cid, 'remote');
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
const unsubscribeFunctions = [];
|
|
163
|
-
// check if service needs to be closed if accept/decline event was done on another device
|
|
164
|
-
const unsubscribe = callFromPush.on('all', event => {
|
|
165
|
-
const _canListenToWS = (0, _utils.canListenToWS)();
|
|
166
|
-
if (!_canListenToWS) {
|
|
167
|
-
logger.debug(`Closing fg service from event callCid: ${call_cid} canListenToWS: ${_canListenToWS}`, {
|
|
168
|
-
event
|
|
169
|
-
});
|
|
170
|
-
unsubscribeFunctions.forEach(fn => fn());
|
|
171
|
-
finishBackgroundTask();
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
if ((0, _utils.shouldCallBeClosed)(callFromPush, data)) {
|
|
175
|
-
logger.debug(`Closing fg service from event callCid: ${call_cid} canListenToWS: ${_canListenToWS} shouldCallBeClosed`, {
|
|
176
|
-
event
|
|
177
|
-
});
|
|
178
|
-
unsubscribeFunctions.forEach(fn => fn());
|
|
179
|
-
finishBackgroundTask();
|
|
180
|
-
//TODO: think about sending appropriate reason for end call
|
|
181
|
-
callingx.endCallWithReason(call_cid, 'rejected');
|
|
182
|
-
}
|
|
135
|
+
notifee.registerForegroundService(() => {
|
|
136
|
+
return new Promise(async () => {
|
|
137
|
+
const client = await pushConfig.createStreamVideoClient();
|
|
138
|
+
if (!client) {
|
|
139
|
+
_videoClient.videoLoggerSystem.getLogger('firebaseMessagingOnMessageHandler').debug(`Closing fg service as there is no client to create from push config`);
|
|
140
|
+
notifee.stopForegroundService();
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const callFromPush = await client.onRingingCall(call_cid);
|
|
144
|
+
let _shouldCallBeClosed = shouldCallBeClosed(callFromPush);
|
|
145
|
+
if (_shouldCallBeClosed) {
|
|
146
|
+
_videoClient.videoLoggerSystem.getLogger('firebaseMessagingOnMessageHandler').debug(`Closing fg service callCid: ${call_cid} shouldCallBeClosed: ${_shouldCallBeClosed}`);
|
|
147
|
+
notifee.stopForegroundService();
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const unsubscribeFunctions = [];
|
|
151
|
+
// check if service needs to be closed if accept/decline event was done on another device
|
|
152
|
+
const unsubscribe = callFromPush.on('all', event => {
|
|
153
|
+
const _canListenToWS = canListenToWS();
|
|
154
|
+
if (!_canListenToWS) {
|
|
155
|
+
_videoClient.videoLoggerSystem.getLogger('firebaseMessagingOnMessageHandler').debug(`Closing fg service from event callCid: ${call_cid} canListenToWS: ${_canListenToWS}`, {
|
|
156
|
+
event
|
|
183
157
|
});
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
callingx.log(`Ending call with callCid: ${call_cid} callingState: ${callingState}`, 'debug');
|
|
193
|
-
finishBackgroundTask();
|
|
194
|
-
callingx.endCallWithReason(call_cid, 'remote');
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
const endCallSubscription = callingx.addEventListener('endCall', async ({
|
|
198
|
-
callId
|
|
199
|
-
}) => {
|
|
200
|
-
unsubscribeFunctions.forEach(fn => fn());
|
|
201
|
-
try {
|
|
202
|
-
await callFromPush.leave({
|
|
203
|
-
reject: true,
|
|
204
|
-
reason: 'decline'
|
|
205
|
-
});
|
|
206
|
-
} catch (error) {
|
|
207
|
-
logger.error(`Failed to leave call with callCid: ${call_cid} error: ${error}`);
|
|
208
|
-
} finally {
|
|
209
|
-
callingx.log(`Ending call with callCid: ${call_cid} callId: ${callId}`, 'debug');
|
|
210
|
-
finishBackgroundTask();
|
|
211
|
-
callingx.endCallWithReason(callId, 'rejected');
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
//stop background task when app comes to foreground
|
|
216
|
-
const appStateSubscription = _reactNative.AppState.addEventListener('change', nextAppState => {
|
|
217
|
-
const _canListenToWS = (0, _utils.canListenToWS)();
|
|
218
|
-
callingx.log(`AppState changed to: ${nextAppState} for callCid: ${call_cid} canListenToWS: ${_canListenToWS}`, 'debug');
|
|
219
|
-
if (!_canListenToWS) {
|
|
220
|
-
unsubscribeFunctions.forEach(fn => fn());
|
|
221
|
-
finishBackgroundTask();
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
158
|
+
unsubscribeFunctions.forEach(fn => fn());
|
|
159
|
+
notifee.stopForegroundService();
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
_shouldCallBeClosed = shouldCallBeClosed(callFromPush);
|
|
163
|
+
if (_shouldCallBeClosed) {
|
|
164
|
+
_videoClient.videoLoggerSystem.getLogger('firebaseMessagingOnMessageHandler').debug(`Closing fg service from event callCid: ${call_cid} canListenToWS: ${_canListenToWS} shouldCallBeClosed: ${_shouldCallBeClosed}`, {
|
|
165
|
+
event
|
|
224
166
|
});
|
|
225
|
-
unsubscribeFunctions.
|
|
226
|
-
|
|
227
|
-
unsubscribeFunctions.push(() => endCallSubscription.remove());
|
|
228
|
-
unsubscribeFunctions.push(() => appStateSubscription.remove());
|
|
229
|
-
_constants.pushUnsubscriptionCallbacks.get(call_cid)?.forEach(cb => cb());
|
|
230
|
-
_constants.pushUnsubscriptionCallbacks.set(call_cid, unsubscribeFunctions);
|
|
231
|
-
} catch (error) {
|
|
232
|
-
callingx.log(`Failed to start background task with callCid: ${call_cid} error: ${error}`, 'error');
|
|
233
|
-
finishBackgroundTask();
|
|
167
|
+
unsubscribeFunctions.forEach(fn => fn());
|
|
168
|
+
notifee.stopForegroundService();
|
|
234
169
|
}
|
|
235
|
-
})
|
|
170
|
+
});
|
|
171
|
+
// check if service needs to be closed if call was left
|
|
172
|
+
const subscription = callFromPush.state.callingState$.subscribe(callingState => {
|
|
173
|
+
if (callingState === _videoClient.CallingState.IDLE || callingState === _videoClient.CallingState.LEFT) {
|
|
174
|
+
_videoClient.videoLoggerSystem.getLogger('firebaseMessagingOnMessageHandler').debug(`Closing fg service from callingState callCid: ${call_cid} callingState: ${callingState}`);
|
|
175
|
+
unsubscribeFunctions.forEach(fn => fn());
|
|
176
|
+
notifee.stopForegroundService();
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
unsubscribeFunctions.push(unsubscribe);
|
|
180
|
+
unsubscribeFunctions.push(() => subscription.unsubscribe());
|
|
181
|
+
_constants.pushUnsubscriptionCallbacks.get(call_cid)?.forEach(cb => cb());
|
|
182
|
+
_constants.pushUnsubscriptionCallbacks.set(call_cid, unsubscribeFunctions);
|
|
236
183
|
});
|
|
237
184
|
});
|
|
238
185
|
}
|
|
239
|
-
|
|
240
|
-
|
|
186
|
+
const incomingCallChannel = pushConfig.android.incomingCallChannel;
|
|
187
|
+
const incomingCallNotificationTextGetters = pushConfig.android.incomingCallNotificationTextGetters;
|
|
188
|
+
if (!incomingCallChannel || !incomingCallNotificationTextGetters) {
|
|
189
|
+
const logger = _videoClient.videoLoggerSystem.getLogger('firebaseMessagingOnMessageHandler');
|
|
190
|
+
logger.error("Can't show incoming call notification as either or both incomingCallChannel and incomingCallNotificationTextGetters were not provided");
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
/*
|
|
194
|
+
* Sound has to be set on channel level for android 8 and above and cant be updated later after creation!
|
|
195
|
+
* For android 7 and below, sound should be set on notification level
|
|
196
|
+
*/
|
|
197
|
+
// set default ringtone if not provided
|
|
198
|
+
if (!incomingCallChannel.sound) {
|
|
199
|
+
incomingCallChannel.sound = await (0, _getAndroidDefaultRingtoneUrl.getAndroidDefaultRingtoneUrl)();
|
|
200
|
+
}
|
|
201
|
+
await notifee.createChannel(incomingCallChannel);
|
|
202
|
+
const {
|
|
203
|
+
getTitle,
|
|
204
|
+
getBody,
|
|
205
|
+
getAcceptButtonTitle,
|
|
206
|
+
getDeclineButtonTitle
|
|
207
|
+
} = incomingCallNotificationTextGetters;
|
|
208
|
+
const createdUserName = data.created_by_display_name;
|
|
209
|
+
const title = getTitle(createdUserName);
|
|
210
|
+
const body = getBody(createdUserName);
|
|
211
|
+
_videoClient.videoLoggerSystem.getLogger('firebaseMessagingOnMessageHandler').debug(`Displaying incoming call notification with callCid: ${call_cid} title: ${title} body: ${body} asForegroundService: ${asForegroundService}`);
|
|
212
|
+
const channelId = incomingCallChannel.id;
|
|
213
|
+
await notifee.displayNotification({
|
|
214
|
+
id: call_cid,
|
|
215
|
+
title: getTitle(createdUserName),
|
|
216
|
+
body: getBody(createdUserName),
|
|
217
|
+
data,
|
|
218
|
+
android: {
|
|
219
|
+
channelId,
|
|
220
|
+
smallIcon: pushConfig.android.smallIcon,
|
|
221
|
+
importance: 4,
|
|
222
|
+
// high importance
|
|
223
|
+
foregroundServiceTypes: (0, _libs.getIncomingCallForegroundServiceTypes)(),
|
|
224
|
+
asForegroundService,
|
|
225
|
+
ongoing: true,
|
|
226
|
+
sound: incomingCallChannel.sound,
|
|
227
|
+
vibrationPattern: incomingCallChannel.vibrationPattern,
|
|
228
|
+
loopSound: true,
|
|
229
|
+
pressAction: {
|
|
230
|
+
id: 'default',
|
|
231
|
+
launchActivity: 'default' // open the app when the notification is pressed
|
|
232
|
+
},
|
|
233
|
+
actions: [{
|
|
234
|
+
title: getDeclineButtonTitle?.() ?? 'Decline',
|
|
235
|
+
pressAction: {
|
|
236
|
+
id: DECLINE_CALL_ACTION_ID
|
|
237
|
+
}
|
|
238
|
+
}, {
|
|
239
|
+
title: getAcceptButtonTitle?.() ?? 'Accept',
|
|
240
|
+
pressAction: {
|
|
241
|
+
id: ACCEPT_CALL_ACTION_ID,
|
|
242
|
+
launchActivity: 'default' // open the app when the notification is pressed
|
|
243
|
+
}
|
|
244
|
+
}],
|
|
245
|
+
category: notifeeLib.AndroidCategory.CALL,
|
|
246
|
+
fullScreenAction: {
|
|
247
|
+
id: 'stream_ringing_incoming_call'
|
|
248
|
+
},
|
|
249
|
+
timeoutAfter: 60000 // 60 seconds, after which the notification will be dismissed automatically
|
|
250
|
+
}
|
|
251
|
+
});
|
|
241
252
|
if (asForegroundService) {
|
|
242
253
|
// no need to check if call has be closed as that will be handled by the fg service
|
|
243
254
|
return;
|
|
244
255
|
}
|
|
256
|
+
|
|
257
|
+
// check if call needs to be closed if accept/decline event was done
|
|
258
|
+
// before the notification was shown
|
|
259
|
+
const client = await pushConfig.createStreamVideoClient();
|
|
260
|
+
if (!client) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
245
263
|
const callFromPush = await client.onRingingCall(call_cid);
|
|
246
|
-
if (
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
callingx.endCallWithReason(call_cid, 'remote');
|
|
264
|
+
if (shouldCallBeClosed(callFromPush)) {
|
|
265
|
+
_videoClient.videoLoggerSystem.getLogger('firebaseMessagingOnMessageHandler').debug(`Removing incoming call notification immediately with callCid: ${call_cid} as it should be closed`);
|
|
266
|
+
notifee.cancelDisplayedNotification(call_cid);
|
|
250
267
|
}
|
|
251
268
|
} else {
|
|
252
|
-
const notifeeLib = (0, _libs.getNotifeeLibThrowIfNotInstalledForPush)();
|
|
253
|
-
const notifee = notifeeLib.default;
|
|
254
|
-
const settings = await notifee.getNotificationSettings();
|
|
255
|
-
if (settings.authorizationStatus !== 1) {
|
|
256
|
-
logger.debug(`Notification permission not granted, unable to post ${data.type} notifications`);
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
269
|
// the other types are call.live_started and call.notification
|
|
261
270
|
const callChannel = pushConfig.android.callChannel;
|
|
262
271
|
const callNotificationTextGetters = pushConfig.android.callNotificationTextGetters;
|
|
263
272
|
if (!callChannel || !callNotificationTextGetters) {
|
|
273
|
+
const logger = _videoClient.videoLoggerSystem.getLogger('firebaseMessagingOnMessageHandler');
|
|
264
274
|
logger.debug("Can't show call notification as either or both callChannel and callNotificationTextGetters is not provided");
|
|
265
275
|
return;
|
|
266
276
|
}
|
|
@@ -275,7 +285,7 @@ const firebaseDataHandler = async data => {
|
|
|
275
285
|
const type = data.type;
|
|
276
286
|
const title = getTitle(type, createdUserName);
|
|
277
287
|
const body = getBody(type, createdUserName);
|
|
278
|
-
|
|
288
|
+
_videoClient.videoLoggerSystem.getLogger('firebaseMessagingOnMessageHandler').debug(`Displaying NonRingingPushEvent ${type} notification with title: ${title} body: ${body}`);
|
|
279
289
|
await notifee.displayNotification({
|
|
280
290
|
title: getTitle(type, createdUserName),
|
|
281
291
|
body: getBody(type, createdUserName),
|
|
@@ -303,7 +313,8 @@ const firebaseDataHandler = async data => {
|
|
|
303
313
|
};
|
|
304
314
|
exports.firebaseDataHandler = firebaseDataHandler;
|
|
305
315
|
const onAndroidNotifeeEvent = async ({
|
|
306
|
-
event
|
|
316
|
+
event,
|
|
317
|
+
isBackground
|
|
307
318
|
}) => {
|
|
308
319
|
if (_reactNative.Platform.OS !== 'android') return;
|
|
309
320
|
const {
|
|
@@ -311,7 +322,8 @@ const onAndroidNotifeeEvent = async ({
|
|
|
311
322
|
detail
|
|
312
323
|
} = event;
|
|
313
324
|
const {
|
|
314
|
-
notification
|
|
325
|
+
notification,
|
|
326
|
+
pressAction
|
|
315
327
|
} = detail;
|
|
316
328
|
const notificationId = notification?.id;
|
|
317
329
|
const data = notification?.data;
|
|
@@ -322,10 +334,53 @@ const onAndroidNotifeeEvent = async ({
|
|
|
322
334
|
|
|
323
335
|
// we can safely cast to string because the data is from "stream.video"
|
|
324
336
|
const call_cid = data.call_cid;
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
337
|
+
if (data.type === 'call.ring') {
|
|
338
|
+
// check if we have observers for the call cid (this means the app is in the foreground state)
|
|
339
|
+
const hasObservers = _rxSubjects.pushAcceptedIncomingCallCId$.observed && _rxSubjects.pushRejectedIncomingCallCId$.observed;
|
|
340
|
+
const notifeeLib = (0, _libs.getNotifeeLibThrowIfNotInstalledForPush)();
|
|
341
|
+
const notifee = notifeeLib.default;
|
|
342
|
+
// Check if we need to decline the call
|
|
343
|
+
const didPressDecline = type === notifeeLib.EventType.ACTION_PRESS && pressAction?.id === DECLINE_CALL_ACTION_ID;
|
|
344
|
+
const didDismiss = type === notifeeLib.EventType.DISMISSED;
|
|
345
|
+
const mustDecline = didPressDecline || didDismiss;
|
|
346
|
+
// Check if we need to accept the call
|
|
347
|
+
const mustAccept = type === notifeeLib.EventType.ACTION_PRESS && pressAction?.id === ACCEPT_CALL_ACTION_ID;
|
|
348
|
+
if (mustAccept || mustDecline || type === notifeeLib.EventType.ACTION_PRESS) {
|
|
349
|
+
_videoClient.videoLoggerSystem.getLogger('onAndroidNotifeeEvent').debug(`clearPushWSEventSubscriptions for callCId: ${call_cid} mustAccept: ${mustAccept} mustDecline: ${mustDecline}`);
|
|
350
|
+
(0, _utils.clearPushWSEventSubscriptions)(call_cid);
|
|
351
|
+
notifee.stopForegroundService();
|
|
352
|
+
}
|
|
353
|
+
if (mustAccept) {
|
|
354
|
+
_videoClient.videoLoggerSystem.getLogger('onAndroidNotifeeEvent').debug(`pushAcceptedIncomingCallCId$ added with callCId: ${call_cid}`);
|
|
355
|
+
_rxSubjects.pushAcceptedIncomingCallCId$.next(call_cid);
|
|
356
|
+
// NOTE: accept will be handled by the app with rxjs observers as the app will go to foreground always
|
|
357
|
+
} else if (mustDecline) {
|
|
358
|
+
_videoClient.videoLoggerSystem.getLogger('onAndroidNotifeeEvent').debug(`pushRejectedIncomingCallCId$ added with callCId: ${call_cid}`);
|
|
359
|
+
_rxSubjects.pushRejectedIncomingCallCId$.next(call_cid);
|
|
360
|
+
if (hasObservers) {
|
|
361
|
+
// if we had observers we can return here as the observers will handle the call as the app is in the foreground state
|
|
362
|
+
_videoClient.videoLoggerSystem.getLogger('onAndroidNotifeeEvent').debug(`Skipped processCallFromPushInBackground for Declining call with callCId: ${call_cid} as the app is in the foreground state`);
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
_videoClient.videoLoggerSystem.getLogger('onAndroidNotifeeEvent').debug(`start processCallFromPushInBackground - Declining call with callCId: ${call_cid}`);
|
|
366
|
+
await (0, _utils.processCallFromPushInBackground)(pushConfig, call_cid, 'decline');
|
|
367
|
+
} else {
|
|
368
|
+
if (type === notifeeLib.EventType.PRESS) {
|
|
369
|
+
_videoClient.videoLoggerSystem.getLogger('onAndroidNotifeeEvent').debug(`pushTappedIncomingCallCId$ added with callCId: ${call_cid}`);
|
|
370
|
+
_rxSubjects.pushTappedIncomingCallCId$.next(call_cid);
|
|
371
|
+
// pressed state will be handled by the app with rxjs observers as the app will go to foreground always
|
|
372
|
+
} else if (isBackground && type === notifeeLib.EventType.DELIVERED) {
|
|
373
|
+
_videoClient.videoLoggerSystem.getLogger('onAndroidNotifeeEvent').debug(`pushAndroidBackgroundDeliveredIncomingCallCId$ added with callCId: ${call_cid}`);
|
|
374
|
+
_rxSubjects.pushAndroidBackgroundDeliveredIncomingCallCId$.next(call_cid);
|
|
375
|
+
// background delivered state will be handled by the app with rxjs observers as processing needs to happen only when app is opened
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
} else {
|
|
379
|
+
const notifeeLib = (0, _libs.getNotifeeLibThrowIfNotInstalledForPush)();
|
|
380
|
+
if (type === notifeeLib.EventType.PRESS) {
|
|
381
|
+
_videoClient.videoLoggerSystem.getLogger('onAndroidNotifeeEvent').debug(`onTapNonRingingCallNotification with callCId: ${call_cid}`);
|
|
382
|
+
pushConfig.onTapNonRingingCallNotification?.(call_cid, data.type);
|
|
383
|
+
}
|
|
329
384
|
}
|
|
330
385
|
};
|
|
331
386
|
exports.onAndroidNotifeeEvent = onAndroidNotifeeEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_videoClient","require","_reactNative","_libs","_rxSubjects","_constants","_utils","_pushLogoutCallback","_StreamVideoRN","_callingx","lastFirebaseToken","token","userId","initAndroidPushToken","client","pushConfig","setUnsubscribeListener","Platform","OS","android","pushProviderName","logger","videoLoggerSystem","getLogger","setDeviceToken","streamClient","_user","id","anonymous","debug","setPushLogoutCallback","removeDevice","err","warn","push_provider_name","addDevice","isExpo","expoNotificationsLib","onTapNonRingingCallNotification","getExpoNotificationsLib","getExpoNotificationsLibNoThrow","subscription","addPushTokenListener","devicePushToken","data","remove","getDevicePushTokenAsync","messaging","getFirebaseMessagingLibNoThrow","getFirebaseMessagingLib","unsubscribe","onTokenRefresh","refreshedToken","getToken","firebaseDataHandler","StreamVideoRN","getConfig","push","sender","type","call_cid","callingx","getCallingxLib","checkPermissions","isNotificationsAllowed","createStreamVideoClient","shouldRejectCallWhenBusy","hasRegisteredCall","asForegroundService","canListenToWS","callerName","created_by_display_name","hasVideo","video","registerBackgroundTask","_","stopTask","Promise","resolve","finishBackgroundTask","log","undefined","_client","callFromPush","onRingingCall","shouldCallBeClosed","endCallWithReason","unsubscribeFunctions","on","event","_canListenToWS","forEach","fn","stateSubscription","state","callingState$","subscribe","callingState","CallingState","IDLE","LEFT","endCallSubscription","addEventListener","callId","leave","reject","reason","error","appStateSubscription","AppState","nextAppState","pushUnsubscriptionCallbacks","get","cb","set","displayIncomingCall","notifeeLib","getNotifeeLibThrowIfNotInstalledForPush","notifee","default","settings","getNotificationSettings","authorizationStatus","callChannel","callNotificationTextGetters","createChannel","channelId","getTitle","getBody","createdUserName","title","body","displayNotification","sound","smallIcon","vibrationPattern","importance","pressAction","launchActivity","timeoutAfter","cid","pushNonRingingCallData$","next","exports","onAndroidNotifeeEvent","detail","notification","notificationId","EventType","PRESS"],"sourceRoot":"../../../../src","sources":["utils/push/android.ts"],"mappings":";;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAF,OAAA;AASA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,cAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AAUA,IAAIS,iBAAiB,GAAG;EAAEC,KAAK,EAAE,EAAE;EAAEC,MAAM,EAAE;A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AAK,CAAE;MACvB;IACF,CAAC,CAAC;IACF,MAAMC,GAAG,GAAGhG,IAAI,CAACgB,QAAkB;IACnCiF,mCAAuB,CAACC,IAAI,CAAC;MAAEF,GAAG;MAAEjF;IAAK,CAAC,CAAC;EAC7C;AACF,CAAC;AAACoF,OAAA,CAAAzF,mBAAA,GAAAA,mBAAA;AAEK,MAAM0F,qBAAqB,GAAG,MAAAA,CAAO;EAAEvD;AAAwB,CAAC,KAAK;EAC1E,IAAIxE,qBAAQ,CAACC,EAAE,KAAK,SAAS,EAAE;EAC/B,MAAM;IAAEyC,IAAI;IAAEsF;EAAO,CAAC,GAAGxD,KAAK;EAC9B,MAAM;IAAEyD;EAAa,CAAC,GAAGD,MAAM;EAC/B,MAAME,cAAc,GAAGD,YAAY,EAAEvH,EAAE;EACvC,MAAMiB,IAAI,GAAGsG,YAAY,EAAEtG,IAAI;EAC/B,MAAM7B,UAAU,GAAGwC,4BAAa,CAACC,SAAS,CAAC,CAAC,CAACC,IAAI;EACjD,IACE,CAAC1C,UAAU,IACX,CAAC6B,IAAI,IACL,CAACuG,cAAc,IACfvG,IAAI,CAACc,MAAM,KAAK,cAAc,EAC9B;IACA;EACF;;EAEA;EACA,MAAME,QAAQ,GAAGhB,IAAI,CAACgB,QAAkB;EAExC,MAAMwD,UAAU,GAAG,IAAAC,6CAAuC,EAAC,CAAC;EAC5D,IAAI1D,IAAI,KAAKyD,UAAU,CAACgC,SAAS,CAACC,KAAK,EAAE;IACvC/H,8BAAiB,CACdC,SAAS,CAAC,uBAAuB,CAAC,CAClCM,KAAK,CAAC,iDAAiD+B,QAAQ,EAAE,CAAC;IACrE7C,UAAU,CAACuB,+BAA+B,GACxCsB,QAAQ,EACRhB,IAAI,CAACe,IACP,CAAC;EACH;AACF,CAAC;AAACoF,OAAA,CAAAC,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_videoClient","require","_reactNative","_libs","_rxSubjects","_constants","_utils","_pushLogoutCallback","_getAndroidDefaultRingtoneUrl","_StreamVideoRN","ACCEPT_CALL_ACTION_ID","DECLINE_CALL_ACTION_ID","lastFirebaseToken","token","userId","initAndroidPushToken","client","pushConfig","setUnsubscribeListener","Platform","OS","android","pushProviderName","logger","videoLoggerSystem","getLogger","setDeviceToken","streamClient","_user","id","anonymous","debug","setPushLogoutCallback","removeDevice","err","warn","push_provider_name","addDevice","isExpo","expoNotificationsLib","onTapNonRingingCallNotification","getExpoNotificationsLib","getExpoNotificationsLibNoThrow","subscription","addPushTokenListener","devicePushToken","data","remove","getDevicePushTokenAsync","messaging","incomingCallChannel","getFirebaseMessagingLibNoThrow","getFirebaseMessagingLib","unsubscribe","onTokenRefresh","refreshedToken","getToken","firebaseDataHandler","StreamVideoRN","getConfig","push","sender","notifeeLib","getNotifeeLibThrowIfNotInstalledForPush","notifee","default","settings","getNotificationSettings","authorizationStatus","type","call_cid","created_by_id","receiver_id","video_client","createStreamVideoClient","onRingingCall","shouldCallBeClosed","callToCheck","mustEndCall","shouldCallBeEnded","canListenToWS","canAddPushWSSubscriptionsRef","current","AppState","currentState","asForegroundService","registerForegroundService","Promise","stopForegroundService","callFromPush","_shouldCallBeClosed","unsubscribeFunctions","on","event","_canListenToWS","forEach","fn","state","callingState$","subscribe","callingState","CallingState","IDLE","LEFT","pushUnsubscriptionCallbacks","get","cb","set","incomingCallNotificationTextGetters","error","sound","getAndroidDefaultRingtoneUrl","createChannel","getTitle","getBody","getAcceptButtonTitle","getDeclineButtonTitle","createdUserName","created_by_display_name","title","body","channelId","displayNotification","smallIcon","importance","foregroundServiceTypes","getIncomingCallForegroundServiceTypes","ongoing","vibrationPattern","loopSound","pressAction","launchActivity","actions","category","AndroidCategory","CALL","fullScreenAction","timeoutAfter","cancelDisplayedNotification","callChannel","callNotificationTextGetters","cid","pushNonRingingCallData$","next","exports","onAndroidNotifeeEvent","isBackground","detail","notification","notificationId","hasObservers","pushAcceptedIncomingCallCId$","observed","pushRejectedIncomingCallCId$","didPressDecline","EventType","ACTION_PRESS","didDismiss","DISMISSED","mustDecline","mustAccept","clearPushWSEventSubscriptions","processCallFromPushInBackground","PRESS","pushTappedIncomingCallCId$","DELIVERED","pushAndroidBackgroundDeliveredIncomingCallCId$"],"sourceRoot":"../../../../src","sources":["utils/push/android.ts"],"mappings":";;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAF,OAAA;AAUA,IAAAG,WAAA,GAAAH,OAAA;AAOA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAMA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,6BAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AAEA,MAAMS,qBAAqB,GAAG,QAAQ;AACtC,MAAMC,sBAAsB,GAAG,SAAS;AAUxC,IAAIC,iBAAiB,GAAG;EAAEC,KAAK,EAAE,EAAE;EAAEC,MAAM,EAAE;AAAG,CAAC;;AAEjD;AACO,eAAeC,oBAAoBA,CACxCC,MAAyB,EACzBC,UAAsB,EACtBC,sBAAyD,EACzD;EACA,IAAIC,qBAAQ,CAACC,EAAE,KAAK,SAAS,IAAI,CAACH,UAAU,CAACI,OAAO,CAACC,gBAAgB,EAAE;IACrE;EACF;EACA,MAAMC,MAAM,GAAGC,8BAAiB,CAACC,SAAS,CAAC,sBAAsB,CAAC;EAClE,MAAMC,cAAc,GAAG,MAAOb,KAAa,IAAK;IAC9C,MAAMC,MAAM,GAAGE,MAAM,CAACW,YAAY,CAACC,KAAK,EAAEC,EAAE,IAAI,EAAE;IAClD,IAAIb,MAAM,CAACW,YAAY,CAACG,SAAS,EAAE;MACjCP,MAAM,CAACQ,KAAK,CAAC,mDAAmD,CAAC;MACjE;IACF;IACA,IACEnB,iBAAiB,CAACC,KAAK,KAAKA,KAAK,IACjCD,iBAAiB,CAACE,MAAM,KAAKA,MAAM,EACnC;MACAS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