@stream-io/video-react-native-sdk 1.10.13 → 1.10.15
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 +13 -0
- package/dist/commonjs/hooks/push/index.js +0 -2
- package/dist/commonjs/hooks/push/index.js.map +1 -1
- package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js +20 -23
- package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -1
- package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js +6 -103
- package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
- package/dist/commonjs/utils/StreamVideoRN/index.js +4 -0
- package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/commonjs/utils/push/ios.js +95 -1
- package/dist/commonjs/utils/push/ios.js.map +1 -1
- package/dist/commonjs/utils/push/setupIosCallKeepEvents.js +150 -0
- package/dist/commonjs/utils/push/setupIosCallKeepEvents.js.map +1 -0
- package/dist/commonjs/utils/push/setupIosVoipPushEvents.js +27 -0
- package/dist/commonjs/utils/push/setupIosVoipPushEvents.js.map +1 -0
- package/dist/commonjs/version.js +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/useIosCallkeepWithCallingStateEffect.js +21 -24
- package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -1
- package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +10 -108
- package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
- package/dist/module/utils/StreamVideoRN/index.js +4 -0
- package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/module/utils/push/ios.js +97 -4
- package/dist/module/utils/push/ios.js.map +1 -1
- package/dist/module/utils/push/setupIosCallKeepEvents.js +145 -0
- package/dist/module/utils/push/setupIosCallKeepEvents.js.map +1 -0
- package/dist/module/utils/push/setupIosVoipPushEvents.js +21 -0
- package/dist/module/utils/push/setupIosVoipPushEvents.js.map +1 -0
- package/dist/module/version.js +1 -1
- package/dist/typescript/hooks/push/index.d.ts.map +1 -1
- package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts.map +1 -1
- package/dist/typescript/hooks/push/useIosVoipPushEventsSetupEffect.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/ios.d.ts +1 -0
- package/dist/typescript/utils/push/ios.d.ts.map +1 -1
- 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 +3 -0
- package/dist/typescript/utils/push/setupIosVoipPushEvents.d.ts.map +1 -0
- package/dist/typescript/version.d.ts +1 -1
- package/ios/StreamVideoReactNative.m +72 -22
- package/package.json +3 -3
- package/src/hooks/push/index.ts +0 -2
- package/src/hooks/push/useIosCallkeepWithCallingStateEffect.ts +37 -31
- package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +10 -145
- package/src/utils/StreamVideoRN/index.ts +5 -0
- package/src/utils/push/ios.ts +135 -3
- package/src/utils/push/setupIosCallKeepEvents.ts +187 -0
- package/src/utils/push/setupIosVoipPushEvents.ts +29 -0
- package/src/version.ts +1 -1
- package/dist/commonjs/hooks/push/useIosCallKeepEventsSetupEffect.js +0 -109
- package/dist/commonjs/hooks/push/useIosCallKeepEventsSetupEffect.js.map +0 -1
- package/dist/module/hooks/push/useIosCallKeepEventsSetupEffect.js +0 -103
- package/dist/module/hooks/push/useIosCallKeepEventsSetupEffect.js.map +0 -1
- package/dist/typescript/hooks/push/useIosCallKeepEventsSetupEffect.d.ts +0 -5
- package/dist/typescript/hooks/push/useIosCallKeepEventsSetupEffect.d.ts.map +0 -1
- package/src/hooks/push/useIosCallKeepEventsSetupEffect.ts +0 -132
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Platform } from 'react-native';
|
|
2
|
-
import { pushNonRingingCallData$ } from './internal/rxSubjects';
|
|
3
|
-
import { getExpoNotificationsLib, getNotifeeLibThrowIfNotInstalledForPush, getPushNotificationIosLib } from './libs';
|
|
4
|
-
import { getLogger } from '@stream-io/video-client';
|
|
1
|
+
import { AppState, NativeModules, Platform } from 'react-native';
|
|
2
|
+
import { pushNonRingingCallData$, pushUnsubscriptionCallbacks$, voipPushNotificationCallCId$ } from './internal/rxSubjects';
|
|
3
|
+
import { getCallKeepLib, getExpoNotificationsLib, getNotifeeLibThrowIfNotInstalledForPush, getPushNotificationIosLib, getVoipPushNotificationLib } from './libs';
|
|
4
|
+
import { RxUtils, getLogger } from '@stream-io/video-client';
|
|
5
5
|
import { setPushLogoutCallback } from '../internal/pushLogoutCallback';
|
|
6
6
|
import { StreamVideoRN } from '../StreamVideoRN';
|
|
7
|
+
import { shouldCallBeEnded, canAddPushWSSubscriptionsRef } from './internal/utils';
|
|
7
8
|
let lastApnToken = {
|
|
8
9
|
token: '',
|
|
9
10
|
userId: ''
|
|
@@ -143,4 +144,96 @@ export async function initIosNonVoipToken(client, pushConfig, setUnsubscribeList
|
|
|
143
144
|
});
|
|
144
145
|
}
|
|
145
146
|
}
|
|
147
|
+
export const onVoipNotificationReceived = async notification => {
|
|
148
|
+
/* --- Example payload ---
|
|
149
|
+
{
|
|
150
|
+
"aps": {
|
|
151
|
+
"alert": {
|
|
152
|
+
"body": "",
|
|
153
|
+
"title": "Vishal Narkhede is calling you"
|
|
154
|
+
},
|
|
155
|
+
"badge": 0,
|
|
156
|
+
"category": "stream.video",
|
|
157
|
+
"mutable-content": 1
|
|
158
|
+
},
|
|
159
|
+
"stream": {
|
|
160
|
+
"call_cid": "default:ixbm7y0k74pbjnq",
|
|
161
|
+
"call_display_name": "",
|
|
162
|
+
"created_by_display_name": "Vishal Narkhede",
|
|
163
|
+
"created_by_id": "vishalexpo",
|
|
164
|
+
"receiver_id": "santhoshexpo",
|
|
165
|
+
"sender": "stream.video",
|
|
166
|
+
"type": "call.ring",
|
|
167
|
+
"version": "v2"
|
|
168
|
+
}
|
|
169
|
+
} */
|
|
170
|
+
const sender = notification?.stream?.sender;
|
|
171
|
+
const type = notification?.stream?.type;
|
|
172
|
+
// do not process any other notifications other than stream.video or ringing
|
|
173
|
+
if (sender !== 'stream.video' && type !== 'call.ring') {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
const call_cid = notification?.stream?.call_cid;
|
|
177
|
+
const pushConfig = StreamVideoRN.getConfig().push;
|
|
178
|
+
if (!call_cid || Platform.OS !== 'ios' || !pushConfig) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const logger = getLogger(['setupIosVoipPushEvents']);
|
|
182
|
+
const client = await pushConfig.createStreamVideoClient();
|
|
183
|
+
if (!client) {
|
|
184
|
+
logger('debug', 'client not found, not processing call.ring voip push notification');
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
const callFromPush = await client.onRingingCall(call_cid);
|
|
188
|
+
let uuid = '';
|
|
189
|
+
try {
|
|
190
|
+
uuid = await NativeModules?.StreamVideoReactNative?.getIncomingCallUUid(call_cid);
|
|
191
|
+
} catch (error) {
|
|
192
|
+
logger('error', 'Error in getting call uuid from native module', error);
|
|
193
|
+
}
|
|
194
|
+
if (!uuid) {
|
|
195
|
+
logger('error', `Not processing call.ring push notification, as no uuid found for call_cid: ${call_cid}`);
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
const created_by_id = notification?.stream?.created_by_id;
|
|
199
|
+
const receiver_id = notification?.stream?.receiver_id;
|
|
200
|
+
function closeCallIfNecessary() {
|
|
201
|
+
const {
|
|
202
|
+
mustEndCall,
|
|
203
|
+
callkeepReason
|
|
204
|
+
} = shouldCallBeEnded(callFromPush, created_by_id, receiver_id);
|
|
205
|
+
if (mustEndCall) {
|
|
206
|
+
const callkeep = getCallKeepLib();
|
|
207
|
+
logger('debug', `callkeep.reportEndCallWithUUID for uuid: ${uuid}, call_cid: ${call_cid}, reason: ${callkeepReason}`);
|
|
208
|
+
callkeep.reportEndCallWithUUID(uuid, callkeepReason);
|
|
209
|
+
const voipPushNotification = getVoipPushNotificationLib();
|
|
210
|
+
voipPushNotification.onVoipNotificationCompleted(uuid);
|
|
211
|
+
return true;
|
|
212
|
+
}
|
|
213
|
+
return false;
|
|
214
|
+
}
|
|
215
|
+
const closed = closeCallIfNecessary();
|
|
216
|
+
const canListenToWS = () => canAddPushWSSubscriptionsRef.current && AppState.currentState !== 'active';
|
|
217
|
+
if (!closed && canListenToWS()) {
|
|
218
|
+
const unsubscribe = callFromPush.on('all', event => {
|
|
219
|
+
const _canListenToWS = canListenToWS();
|
|
220
|
+
if (!_canListenToWS) {
|
|
221
|
+
logger('debug', `unsubscribe due to event callCid: ${call_cid} canListenToWS: ${_canListenToWS}`, event);
|
|
222
|
+
unsubscribe();
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
const _closed = closeCallIfNecessary();
|
|
226
|
+
if (_closed) {
|
|
227
|
+
logger('debug', `unsubscribe due to event callCid: ${call_cid} canListenToWS: ${_canListenToWS} shouldCallBeClosed: ${_closed}`, event);
|
|
228
|
+
unsubscribe();
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
const unsubscriptionCallbacks = RxUtils.getCurrentValue(pushUnsubscriptionCallbacks$) ?? [];
|
|
232
|
+
pushUnsubscriptionCallbacks$.next([...unsubscriptionCallbacks, unsubscribe]);
|
|
233
|
+
}
|
|
234
|
+
// send the info to this subject, it is listened by callkeep events
|
|
235
|
+
// callkeep events will then accept/reject the call
|
|
236
|
+
logger('debug', `call_cid:${call_cid} uuid:${uuid} received and processed from call.ring push notification`);
|
|
237
|
+
voipPushNotificationCallCId$.next(call_cid);
|
|
238
|
+
};
|
|
146
239
|
//# sourceMappingURL=ios.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","pushNonRingingCallData$","getExpoNotificationsLib","getNotifeeLibThrowIfNotInstalledForPush","getPushNotificationIosLib","getLogger","setPushLogoutCallback","StreamVideoRN","lastApnToken","token","userId","processNonRingingNotificationStreamPayload","streamPayload","sender","type","cid","call_cid","logger","next","undefined","oniOSExpoNotificationEvent","event","pushConfig","getConfig","push","trigger","request","payload","stream","JSON","stringify","oniOSNotifeeEvent","OS","detail","notifeeLib","EventType","PRESS","notification","data","result","onTapNonRingingCallNotification","onPushNotificationiOSStreamVideoEvent","pushNotificationIosLib","getData","isClicked","userInteraction","finish","FetchResult","NoData","initIosNonVoipToken","client","setUnsubscribeListener","ios","pushProviderName","setDeviceToken","streamClient","_user","id","removeDevice","err","push_provider_name","addDevice","then","catch","isExpo","expoNotificationsLib","getDevicePushTokenAsync","devicePushToken","subscription","addPushTokenListener","remove","addEventListener","removeEventListener"],"sourceRoot":"../../../../src","sources":["utils/push/ios.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["AppState","NativeModules","Platform","pushNonRingingCallData$","pushUnsubscriptionCallbacks$","voipPushNotificationCallCId$","getCallKeepLib","getExpoNotificationsLib","getNotifeeLibThrowIfNotInstalledForPush","getPushNotificationIosLib","getVoipPushNotificationLib","RxUtils","getLogger","setPushLogoutCallback","StreamVideoRN","shouldCallBeEnded","canAddPushWSSubscriptionsRef","lastApnToken","token","userId","processNonRingingNotificationStreamPayload","streamPayload","sender","type","cid","call_cid","logger","next","undefined","oniOSExpoNotificationEvent","event","pushConfig","getConfig","push","trigger","request","payload","stream","JSON","stringify","oniOSNotifeeEvent","OS","detail","notifeeLib","EventType","PRESS","notification","data","result","onTapNonRingingCallNotification","onPushNotificationiOSStreamVideoEvent","pushNotificationIosLib","getData","isClicked","userInteraction","finish","FetchResult","NoData","initIosNonVoipToken","client","setUnsubscribeListener","ios","pushProviderName","setDeviceToken","streamClient","_user","id","removeDevice","err","push_provider_name","addDevice","then","catch","isExpo","expoNotificationsLib","getDevicePushTokenAsync","devicePushToken","subscription","addPushTokenListener","remove","addEventListener","removeEventListener","onVoipNotificationReceived","createStreamVideoClient","callFromPush","onRingingCall","uuid","StreamVideoReactNative","getIncomingCallUUid","error","created_by_id","receiver_id","closeCallIfNecessary","mustEndCall","callkeepReason","callkeep","reportEndCallWithUUID","voipPushNotification","onVoipNotificationCompleted","closed","canListenToWS","current","currentState","unsubscribe","on","_canListenToWS","_closed","unsubscriptionCallbacks","getCurrentValue"],"sourceRoot":"../../../../src","sources":["utils/push/ios.ts"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAEhE,SACEC,uBAAuB,EACvBC,4BAA4B,EAC5BC,4BAA4B,QACvB,uBAAuB;AAC9B,SAEEC,cAAc,EACdC,uBAAuB,EACvBC,uCAAuC,EACvCC,yBAAyB,EACzBC,0BAA0B,QAErB,QAAQ;AACf,SAASC,OAAO,EAAqBC,SAAS,QAAQ,yBAAyB;AAC/E,SAASC,qBAAqB,QAAQ,gCAAgC;AAEtE,SAASC,aAAa,QAAQ,kBAAkB;AAEhD,SACEC,iBAAiB,EACjBC,4BAA4B,QACvB,kBAAkB;AAIzB,IAAIC,YAAY,GAAG;EAAEC,KAAK,EAAE,EAAE;EAAEC,MAAM,EAAE;AAAG,CAAC;AAE5C,SAASC,0CAA0CA,CACjDC,aAAgC,EAChC;EACA,IACEA,aAAa,EAAEC,MAAM,KAAK,cAAc,IACxCD,aAAa,EAAEE,IAAI,KAAK,WAAW,EACnC;IACA,MAAMC,GAAG,GAAGH,aAAa,CAACI,QAAQ;IAClC,MAAMF,IAAI,GAAGF,aAAa,CAACE,IAAI;IAC/B,MAAMG,MAAM,GAAGd,SAAS,CAAC,CAAC,4CAA4C,CAAC,CAAC;IACxEc,MAAM,CAAC,OAAO,EAAE,eAAeF,GAAG,KAAKD,IAAI,EAAE,CAAC;IAC9CpB,uBAAuB,CAACwB,IAAI,CAAC;MAAEH,GAAG;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,oBAAoB,CAAC,CAAC;MACtC,IAAIc,OAAO,EAAE;QACXhF,MAAM,CACJ,OAAO,EACP,qCAAqCD,QAAQ,mBAAmBgF,cAAc,wBAAwBC,OAAO,EAAE,EAC/G5E,KACF,CAAC;QACDyE,WAAW,CAAC,CAAC;MACf;IACF,CAAC,CAAC;IACF,MAAMI,uBAAuB,GAC3BhG,OAAO,CAACiG,eAAe,CAACxG,4BAA4B,CAAC,IAAI,EAAE;IAC7DA,4BAA4B,CAACuB,IAAI,CAAC,CAChC,GAAGgF,uBAAuB,EAC1BJ,WAAW,CACZ,CAAC;EACJ;EACA;EACA;EACA7E,MAAM,CACJ,OAAO,EACP,YAAYD,QAAQ,SAAS6D,IAAI,0DACnC,CAAC;EACDjF,4BAA4B,CAACsB,IAAI,CAACF,QAAQ,CAAC;AAC7C,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { voipCallkeepCallOnForegroundMap$, voipPushNotificationCallCId$ } from './internal/rxSubjects';
|
|
2
|
+
import { getLogger, RxUtils } from '@stream-io/video-client';
|
|
3
|
+
import { getCallKeepLib, getVoipPushNotificationLib } from './libs';
|
|
4
|
+
import { clearPushWSEventSubscriptions, processCallFromPushInBackground } from './internal/utils';
|
|
5
|
+
import { pushAcceptedIncomingCallCId$, voipCallkeepAcceptedCallOnNativeDialerMap$ } from './internal/rxSubjects';
|
|
6
|
+
import { AppState, NativeModules, Platform } from 'react-native';
|
|
7
|
+
import { setPushLogoutCallback } from '../internal/pushLogoutCallback';
|
|
8
|
+
/**
|
|
9
|
+
* This hook is used to listen to callkeep events and do the necessary actions
|
|
10
|
+
*/
|
|
11
|
+
export function setupIosCallKeepEvents(pushConfig) {
|
|
12
|
+
if (Platform.OS !== 'ios' || !pushConfig.ios.pushProviderName) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const logger = getLogger(['setupIosCallKeepEvents']);
|
|
16
|
+
const callkeep = getCallKeepLib();
|
|
17
|
+
async function getCallCid(callUUID) {
|
|
18
|
+
let call_cid = RxUtils.getCurrentValue(voipPushNotificationCallCId$);
|
|
19
|
+
if (!call_cid) {
|
|
20
|
+
// if call_cid is not available, try to get it from native module
|
|
21
|
+
try {
|
|
22
|
+
call_cid = await NativeModules?.StreamVideoReactNative?.getIncomingCallCid(callUUID);
|
|
23
|
+
voipPushNotificationCallCId$.next(call_cid);
|
|
24
|
+
} catch (error) {
|
|
25
|
+
logger('debug', 'Error in getting call cid from native module - probably the call was already processed, so ignoring this callkeep event');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return call_cid;
|
|
29
|
+
}
|
|
30
|
+
function answerCall(callUUID) {
|
|
31
|
+
getCallCid(callUUID).then(call_cid => {
|
|
32
|
+
logger('debug', `answerCall event with call_cid: ${call_cid}`);
|
|
33
|
+
iosCallkeepAcceptCall(call_cid, callUUID);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function endCall(callUUID) {
|
|
37
|
+
getCallCid(callUUID).then(call_cid => {
|
|
38
|
+
logger('debug', `endCall event with call_cid: ${call_cid}`);
|
|
39
|
+
iosCallkeepRejectCall(call_cid, callUUID, pushConfig);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function didDisplayIncomingCall(callUUID, payload) {
|
|
43
|
+
const voipPushNotification = getVoipPushNotificationLib();
|
|
44
|
+
// @ts-expect-error
|
|
45
|
+
const call_cid = payload?.call_cid;
|
|
46
|
+
logger('debug', `didDisplayIncomingCall event with callUUID: ${callUUID} call_cid: ${call_cid}`);
|
|
47
|
+
if (call_cid) {
|
|
48
|
+
if (AppState.currentState === 'background') {
|
|
49
|
+
processCallFromPushInBackground(pushConfig, call_cid, 'backgroundDelivered');
|
|
50
|
+
}
|
|
51
|
+
voipCallkeepCallOnForegroundMap$.next({
|
|
52
|
+
uuid: callUUID,
|
|
53
|
+
cid: call_cid
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
voipPushNotification.onVoipNotificationCompleted(callUUID);
|
|
57
|
+
}
|
|
58
|
+
const {
|
|
59
|
+
remove: removeAnswerCall
|
|
60
|
+
} = callkeep.addEventListener('answerCall', ({
|
|
61
|
+
callUUID
|
|
62
|
+
}) => {
|
|
63
|
+
answerCall(callUUID);
|
|
64
|
+
});
|
|
65
|
+
const {
|
|
66
|
+
remove: removeEndCall
|
|
67
|
+
} = callkeep.addEventListener('endCall', ({
|
|
68
|
+
callUUID
|
|
69
|
+
}) => {
|
|
70
|
+
endCall(callUUID);
|
|
71
|
+
});
|
|
72
|
+
const {
|
|
73
|
+
remove: removeDisplayIncomingCall
|
|
74
|
+
} = callkeep.addEventListener('didDisplayIncomingCall', ({
|
|
75
|
+
callUUID,
|
|
76
|
+
payload
|
|
77
|
+
}) => {
|
|
78
|
+
didDisplayIncomingCall(callUUID, payload);
|
|
79
|
+
});
|
|
80
|
+
const {
|
|
81
|
+
remove: removeDidLoadWithEvents
|
|
82
|
+
} = callkeep.addEventListener('didLoadWithEvents', events => {
|
|
83
|
+
if (!events || !Array.isArray(events) || events.length < 1) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
events.forEach(event => {
|
|
87
|
+
const {
|
|
88
|
+
name,
|
|
89
|
+
data
|
|
90
|
+
} = event;
|
|
91
|
+
if (name === 'RNCallKeepDidDisplayIncomingCall') {
|
|
92
|
+
didDisplayIncomingCall(data.callUUID, data.payload);
|
|
93
|
+
} else if (name === 'RNCallKeepPerformAnswerCallAction') {
|
|
94
|
+
answerCall(data.callUUID);
|
|
95
|
+
} else if (name === 'RNCallKeepPerformEndCallAction') {
|
|
96
|
+
endCall(data.callUUID);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
setPushLogoutCallback(async () => {
|
|
101
|
+
removeAnswerCall();
|
|
102
|
+
removeEndCall();
|
|
103
|
+
removeDisplayIncomingCall();
|
|
104
|
+
removeDidLoadWithEvents();
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
const iosCallkeepAcceptCall = (call_cid, callUUIDFromCallkeep) => {
|
|
108
|
+
if (!shouldProcessCallFromCallkeep(call_cid, callUUIDFromCallkeep)) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
clearPushWSEventSubscriptions();
|
|
112
|
+
// to call end callkeep later if ended in app and not through callkeep
|
|
113
|
+
voipCallkeepAcceptedCallOnNativeDialerMap$.next({
|
|
114
|
+
uuid: callUUIDFromCallkeep,
|
|
115
|
+
cid: call_cid
|
|
116
|
+
});
|
|
117
|
+
// to process the call in the app
|
|
118
|
+
pushAcceptedIncomingCallCId$.next(call_cid);
|
|
119
|
+
// no need to keep these references anymore
|
|
120
|
+
voipCallkeepCallOnForegroundMap$.next(undefined);
|
|
121
|
+
};
|
|
122
|
+
const iosCallkeepRejectCall = async (call_cid, callUUIDFromCallkeep, pushConfig) => {
|
|
123
|
+
if (!shouldProcessCallFromCallkeep(call_cid, callUUIDFromCallkeep)) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
clearPushWSEventSubscriptions();
|
|
127
|
+
// no need to keep these references anymore
|
|
128
|
+
voipCallkeepAcceptedCallOnNativeDialerMap$.next(undefined);
|
|
129
|
+
voipCallkeepCallOnForegroundMap$.next(undefined);
|
|
130
|
+
voipPushNotificationCallCId$.next(undefined);
|
|
131
|
+
await processCallFromPushInBackground(pushConfig, call_cid, 'decline');
|
|
132
|
+
await NativeModules.StreamVideoReactNative?.removeIncomingCall(call_cid);
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Helper function to determine if the answer/end call event from callkeep must be processed
|
|
137
|
+
* Just checks if we have a valid call_cid and acts as a type guard for call_cid
|
|
138
|
+
*/
|
|
139
|
+
const shouldProcessCallFromCallkeep = (call_cid, callUUIDFromCallkeep) => {
|
|
140
|
+
if (!call_cid || !callUUIDFromCallkeep) {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
return true;
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=setupIosCallKeepEvents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["voipCallkeepCallOnForegroundMap$","voipPushNotificationCallCId$","getLogger","RxUtils","getCallKeepLib","getVoipPushNotificationLib","clearPushWSEventSubscriptions","processCallFromPushInBackground","pushAcceptedIncomingCallCId$","voipCallkeepAcceptedCallOnNativeDialerMap$","AppState","NativeModules","Platform","setPushLogoutCallback","setupIosCallKeepEvents","pushConfig","OS","ios","pushProviderName","logger","callkeep","getCallCid","callUUID","call_cid","getCurrentValue","StreamVideoReactNative","getIncomingCallCid","next","error","answerCall","then","iosCallkeepAcceptCall","endCall","iosCallkeepRejectCall","didDisplayIncomingCall","payload","voipPushNotification","currentState","uuid","cid","onVoipNotificationCompleted","remove","removeAnswerCall","addEventListener","removeEndCall","removeDisplayIncomingCall","removeDidLoadWithEvents","events","Array","isArray","length","forEach","event","name","data","callUUIDFromCallkeep","shouldProcessCallFromCallkeep","undefined","removeIncomingCall"],"sourceRoot":"../../../../src","sources":["utils/push/setupIosCallKeepEvents.ts"],"mappings":"AAAA,SACEA,gCAAgC,EAChCC,4BAA4B,QACvB,uBAAuB;AAC9B,SAASC,SAAS,EAAEC,OAAO,QAAQ,yBAAyB;AAC5D,SAASC,cAAc,EAAEC,0BAA0B,QAAQ,QAAQ;AAEnE,SACEC,6BAA6B,EAC7BC,+BAA+B,QAC1B,kBAAkB;AACzB,SACEC,4BAA4B,EAC5BC,0CAA0C,QACrC,uBAAuB;AAC9B,SAASC,QAAQ,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAChE,SAASC,qBAAqB,QAAQ,gCAAgC;AAItE;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CACpCC,UAAkD,EAClD;EACA,IAAIH,QAAQ,CAACI,EAAE,KAAK,KAAK,IAAI,CAACD,UAAU,CAACE,GAAG,CAACC,gBAAgB,EAAE;IAC7D;EACF;EACA,MAAMC,MAAM,GAAGjB,SA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4BAA4B,CAAC0B,IAAI,CAAC8B,SAAS,CAAC;EAC5C,MAAMlD,+BAA+B,CAACQ,UAAU,EAAEQ,QAAQ,EAAE,SAAS,CAAC;EACtE,MAAMZ,aAAa,CAACc,sBAAsB,EAAEiC,kBAAkB,CAACnC,QAAQ,CAAC;AAC1E,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMiC,6BAA6B,GAAGA,CACpCjC,QAA4B,EAC5BgC,oBAA4B,KACL;EACvB,IAAI,CAAChC,QAAQ,IAAI,CAACgC,oBAAoB,EAAE;IACtC,OAAO,KAAK;EACd;EACA,OAAO,IAAI;AACb,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { getVoipPushNotificationLib } from './libs';
|
|
2
|
+
import { Platform } from 'react-native';
|
|
3
|
+
import { onVoipNotificationReceived } from '..';
|
|
4
|
+
import { setPushLogoutCallback } from '../internal/pushLogoutCallback';
|
|
5
|
+
import { getLogger } from '@stream-io/video-client';
|
|
6
|
+
export function setupIosVoipPushEvents(pushConfig) {
|
|
7
|
+
if (Platform.OS !== 'ios' || !pushConfig.ios?.pushProviderName) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
const logger = getLogger(['setupIosVoipPushEvents']);
|
|
11
|
+
const voipPushNotification = getVoipPushNotificationLib();
|
|
12
|
+
logger('debug', 'notification event listener added');
|
|
13
|
+
voipPushNotification.addEventListener('notification', notification => {
|
|
14
|
+
onVoipNotificationReceived(notification);
|
|
15
|
+
});
|
|
16
|
+
setPushLogoutCallback(async () => {
|
|
17
|
+
getLogger(['setPushLogoutCallback'])('debug', 'notification event listener removed');
|
|
18
|
+
voipPushNotification.removeEventListener('notification');
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=setupIosVoipPushEvents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getVoipPushNotificationLib","Platform","onVoipNotificationReceived","setPushLogoutCallback","getLogger","setupIosVoipPushEvents","pushConfig","OS","ios","pushProviderName","logger","voipPushNotification","addEventListener","notification","removeEventListener"],"sourceRoot":"../../../../src","sources":["utils/push/setupIosVoipPushEvents.ts"],"mappings":"AAAA,SAASA,0BAA0B,QAAQ,QAAQ;AAEnD,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,0BAA0B,QAAQ,IAAI;AAC/C,SAASC,qBAAqB,QAAQ,gCAAgC;AACtE,SAASC,SAAS,QAAQ,yBAAyB;AAGnD,OAAO,SAASC,sBAAsBA,CACpCC,UAAkD,EAClD;EACA,IAAIL,QAAQ,CAACM,EAAE,KAAK,KAAK,IAAI,CAACD,UAAU,CAACE,GAAG,EAAEC,gBAAgB,EAAE;IAC9D;EACF;EACA,MAAMC,MAAM,GAAGN,SAAS,CAAC,CAAC,wBAAwB,CAAC,CAAC;EACpD,MAAMO,oBAAoB,GAAGX,0BAA0B,CAAC,CAAC;EAEzDU,MAAM,CAAC,OAAO,EAAE,mCAAmC,CAAC;EACpDC,oBAAoB,CAACC,gBAAgB,CAAC,cAAc,EAAGC,YAAY,IAAK;IACtEX,0BAA0B,CAACW,YAAY,CAAC;EAC1C,CAAC,CAAC;EACFV,qBAAqB,CAAC,YAAY;IAChCC,SAAS,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAClC,OAAO,EACP,qCACF,CAAC;IACDO,oBAAoB,CAACG,mBAAmB,CAAC,cAAc,CAAC;EAC1D,CAAC,CAAC;AACJ","ignoreList":[]}
|
package/dist/module/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '1.10.
|
|
1
|
+
export const version = '1.10.15';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/push/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/push/index.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,eAAO,MAAM,qBAAqB,YAMjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIosCallkeepWithCallingStateEffect.d.ts","sourceRoot":"","sources":["../../../../src/hooks/push/useIosCallkeepWithCallingStateEffect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useIosCallkeepWithCallingStateEffect.d.ts","sourceRoot":"","sources":["../../../../src/hooks/push/useIosCallkeepWithCallingStateEffect.ts"],"names":[],"mappings":"AA6CA;;GAEG;AACH,eAAO,MAAM,oCAAoC,YAyJhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIosVoipPushEventsSetupEffect.d.ts","sourceRoot":"","sources":["../../../../src/hooks/push/useIosVoipPushEventsSetupEffect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useIosVoipPushEventsSetupEffect.d.ts","sourceRoot":"","sources":["../../../../src/hooks/push/useIosVoipPushEventsSetupEffect.ts"],"names":[],"mappings":"AAuCA;;;GAGG;AACH,eAAO,MAAM,+BAA+B,YAiI3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/StreamVideoRN/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,OAAiC,EAC/B,KAAK,2BAA2B,EACjC,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/StreamVideoRN/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,OAAiC,EAC/B,KAAK,2BAA2B,EACjC,MAAM,sCAAsC,CAAC;AAsB9C,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAC,MAAM,CAA+B;IAEpD;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;IAO1E,MAAM,CAAC,gCAAgC,CACrC,aAAa,EAAE,OAAO,CACpB,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,CACzE;IAWH;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,aAAa,CAAC,UAAU,EAAE,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAsBvE,MAAM,CAAC,SAAS;IAIhB;;;OAGG;IACH,MAAM,CAAC,YAAY;IASnB,MAAM,CAAC,wBAAwB;IAI/B;;;;OAIG;IACH,MAAM,CAAC,gCAAgC,CACrC,QAAQ,EAAE,2BAA2B;CAYxC"}
|
|
@@ -11,5 +11,6 @@ export declare const oniOSNotifeeEvent: ({ event, }: {
|
|
|
11
11
|
export declare function onPushNotificationiOSStreamVideoEvent(notification: PushNotificationiOSType): void;
|
|
12
12
|
/** Send token to stream */
|
|
13
13
|
export declare function initIosNonVoipToken(client: StreamVideoClient, pushConfig: PushConfig, setUnsubscribeListener: (unsubscribe: () => void) => void): Promise<void>;
|
|
14
|
+
export declare const onVoipNotificationReceived: (notification: any) => Promise<void>;
|
|
14
15
|
export {};
|
|
15
16
|
//# sourceMappingURL=ios.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/ios.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/ios.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAMhE,OAAO,EACL,KAAK,gBAAgB,EAMrB,KAAK,uBAAuB,EAC7B,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAW,iBAAiB,EAAa,MAAM,yBAAyB,CAAC;AAEhF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAQnD,KAAK,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAqBzD,eAAO,MAAM,0BAA0B,UAAW,gBAAgB,SAoBjE,CAAC;AAEF,eAAO,MAAM,iBAAiB,eAE3B;IACD,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;CACvB,SAmBA,CAAC;AAEF,wBAAgB,qCAAqC,CACnD,YAAY,EAAE,uBAAuB,QAiCtC;AAED,2BAA2B;AAC3B,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,CAAC,WAAW,EAAE,MAAM,IAAI,KAAK,IAAI,iBAoF1D;AAED,eAAO,MAAM,0BAA0B,iBAAwB,GAAG,kBAwHjE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { StreamVideoConfig } from '../StreamVideoRN/types';
|
|
2
|
+
/**
|
|
3
|
+
* This hook is used to listen to callkeep events and do the necessary actions
|
|
4
|
+
*/
|
|
5
|
+
export declare function setupIosCallKeepEvents(pushConfig: NonNullable<StreamVideoConfig['push']>): void;
|
|
6
|
+
//# sourceMappingURL=setupIosCallKeepEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupIosCallKeepEvents.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/setupIosCallKeepEvents.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAchE;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,QAgHnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupIosVoipPushEvents.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/setupIosVoipPushEvents.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,QAmBnD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "1.10.
|
|
1
|
+
export declare const version = "1.10.15";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
// Do not change these consts, it is what is used react-native-webrtc
|
|
8
8
|
NSNotificationName const kBroadcastStartedNotification = @"iOS_BroadcastStarted";
|
|
9
9
|
NSNotificationName const kBroadcastStoppedNotification = @"iOS_BroadcastStopped";
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
static NSMutableDictionary *_incomingCallUUIDsByCallID = nil;
|
|
12
|
+
static NSMutableDictionary *_incomingCallCidsByUUID = nil;
|
|
13
|
+
static dispatch_queue_t _dictionaryQueue = nil;
|
|
11
14
|
|
|
12
15
|
void broadcastNotificationCallback(CFNotificationCenterRef center,
|
|
13
16
|
void *observer,
|
|
@@ -17,7 +20,6 @@ void broadcastNotificationCallback(CFNotificationCenterRef center,
|
|
|
17
20
|
StreamVideoReactNative *this = (__bridge StreamVideoReactNative*)observer;
|
|
18
21
|
NSString *eventName = (__bridge NSString*)name;
|
|
19
22
|
[this screenShareEventReceived: eventName];
|
|
20
|
-
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
@implementation StreamVideoReactNative
|
|
@@ -38,16 +40,22 @@ RCT_EXPORT_MODULE();
|
|
|
38
40
|
// options.videoEncoderFactory = simulcastVideoEncoderFactory;
|
|
39
41
|
}
|
|
40
42
|
|
|
43
|
+
+(void)initializeSharedDictionaries {
|
|
44
|
+
static dispatch_once_t onceToken;
|
|
45
|
+
dispatch_once(&onceToken, ^{
|
|
46
|
+
_dictionaryQueue = dispatch_queue_create("com.stream.video.dictionary", DISPATCH_QUEUE_SERIAL);
|
|
47
|
+
_incomingCallUUIDsByCallID = [NSMutableDictionary dictionary];
|
|
48
|
+
_incomingCallCidsByUUID = [NSMutableDictionary dictionary];
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
41
52
|
-(instancetype)init {
|
|
42
|
-
self = [super init]
|
|
43
|
-
if (self) {
|
|
53
|
+
if ((self = [super init])) {
|
|
44
54
|
_notificationCenter = CFNotificationCenterGetDarwinNotifyCenter();
|
|
45
|
-
[self setupObserver];
|
|
46
|
-
}
|
|
47
|
-
if (self) {
|
|
48
55
|
[UIDevice currentDevice].batteryMonitoringEnabled = YES;
|
|
56
|
+
[self setupObserver];
|
|
57
|
+
[StreamVideoReactNative initializeSharedDictionaries];
|
|
49
58
|
}
|
|
50
|
-
|
|
51
59
|
return self;
|
|
52
60
|
}
|
|
53
61
|
|
|
@@ -153,26 +161,68 @@ RCT_EXPORT_METHOD(currentThermalState:(RCTPromiseResolveBlock)resolve rejecter:(
|
|
|
153
161
|
}
|
|
154
162
|
|
|
155
163
|
+(void)registerIncomingCall:(NSString *)cid uuid:(NSString *)uuid {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
164
|
+
[StreamVideoReactNative initializeSharedDictionaries];
|
|
165
|
+
dispatch_sync(_dictionaryQueue, ^{
|
|
166
|
+
|
|
167
|
+
#ifdef DEBUG
|
|
168
|
+
NSLog(@"registerIncomingCall cid:%@ -> uuid:%@",cid,uuid);
|
|
169
|
+
#endif
|
|
170
|
+
NSString *lowercaseUUID = [uuid lowercaseString];
|
|
171
|
+
_incomingCallUUIDsByCallID[cid] = lowercaseUUID;
|
|
172
|
+
_incomingCallCidsByUUID[lowercaseUUID] = cid;
|
|
173
|
+
});
|
|
160
174
|
}
|
|
161
175
|
|
|
162
176
|
RCT_EXPORT_METHOD(getIncomingCallUUid:(NSString *)cid
|
|
163
177
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
164
178
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
165
179
|
{
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
180
|
+
dispatch_sync(_dictionaryQueue, ^{
|
|
181
|
+
NSString *uuid = _incomingCallUUIDsByCallID[cid];
|
|
182
|
+
if (uuid) {
|
|
183
|
+
resolve(uuid);
|
|
184
|
+
} else {
|
|
185
|
+
NSString *errorString = [NSString stringWithFormat:@"requested incoming call not found for cid: %@", cid];
|
|
186
|
+
reject(@"access_failure", errorString, nil);
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
RCT_EXPORT_METHOD(getIncomingCallCid:(NSString *)uuid
|
|
192
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
193
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
194
|
+
{
|
|
195
|
+
dispatch_sync(_dictionaryQueue, ^{
|
|
196
|
+
NSString *lowercaseUUID = [uuid lowercaseString];
|
|
197
|
+
NSString *foundCid = _incomingCallCidsByUUID[lowercaseUUID];
|
|
198
|
+
|
|
199
|
+
if (foundCid) {
|
|
200
|
+
resolve(foundCid);
|
|
201
|
+
} else {
|
|
202
|
+
NSString *errorString = [NSString stringWithFormat:@"requested incoming call not found for uuid: %@", uuid];
|
|
203
|
+
reject(@"access_failure", errorString, nil);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
RCT_EXPORT_METHOD(removeIncomingCall:(NSString *)cid
|
|
209
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
210
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
211
|
+
{
|
|
212
|
+
dispatch_sync(_dictionaryQueue, ^{
|
|
213
|
+
NSString *uuid = _incomingCallUUIDsByCallID[cid];
|
|
214
|
+
if (uuid) {
|
|
215
|
+
#ifdef DEBUG
|
|
216
|
+
NSLog(@"removeIncomingCall cid:%@ -> uuid:%@",cid,uuid);
|
|
217
|
+
#endif
|
|
218
|
+
|
|
219
|
+
[_incomingCallUUIDsByCallID removeObjectForKey:cid];
|
|
220
|
+
[_incomingCallCidsByUUID removeObjectForKey:uuid];
|
|
221
|
+
resolve(@YES);
|
|
222
|
+
} else {
|
|
223
|
+
resolve(@NO);
|
|
224
|
+
}
|
|
225
|
+
});
|
|
176
226
|
}
|
|
177
227
|
|
|
178
228
|
-(NSArray<NSString *> *)supportedEvents {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-native-sdk",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.15",
|
|
4
4
|
"packageManager": "yarn@3.2.4",
|
|
5
5
|
"description": "Stream Video SDK for React Native",
|
|
6
6
|
"author": "https://getstream.io",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"!**/.*"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@stream-io/video-client": "1.18.
|
|
50
|
-
"@stream-io/video-react-bindings": "1.5.
|
|
49
|
+
"@stream-io/video-client": "1.18.5",
|
|
50
|
+
"@stream-io/video-react-bindings": "1.5.7",
|
|
51
51
|
"intl-pluralrules": "2.0.1",
|
|
52
52
|
"lodash.merge": "^4.6.2",
|
|
53
53
|
"react-native-url-polyfill": "1.3.0",
|
package/src/hooks/push/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { useIosCallKeepEventsSetupEffect } from './useIosCallKeepEventsSetupEffect';
|
|
2
1
|
import { useIosVoipPushEventsSetupEffect } from './useIosVoipPushEventsSetupEffect';
|
|
3
2
|
import { useProcessPushCallEffect } from './useProcessPushCallEffect';
|
|
4
3
|
import { useInitAndroidTokenAndRest } from './useInitAndroidTokenAndRest';
|
|
@@ -11,7 +10,6 @@ import { useProcessPushNonRingingCallEffect } from './useProcessPushNonRingingCa
|
|
|
11
10
|
*/
|
|
12
11
|
export const usePushRegisterEffect = () => {
|
|
13
12
|
useIosInitRemoteNotifications();
|
|
14
|
-
useIosCallKeepEventsSetupEffect();
|
|
15
13
|
useIosVoipPushEventsSetupEffect();
|
|
16
14
|
useProcessPushNonRingingCallEffect();
|
|
17
15
|
useProcessPushCallEffect();
|