@stream-io/video-react-native-sdk 1.29.1-beta.0 → 1.29.2

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.
Files changed (211) hide show
  1. package/CHANGELOG.md +3133 -0
  2. package/android/src/main/AndroidManifest.xml +1 -8
  3. package/android/src/main/AndroidManifestNew.xml +0 -11
  4. package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNativeModule.kt +5 -42
  5. package/android/src/main/java/com/streamvideo/reactnative/audio/utils/WebRtcAudioUtils.kt +6 -70
  6. package/android/src/main/java/com/streamvideo/reactnative/callmanager/StreamInCallManagerModule.kt +4 -6
  7. package/android/src/main/java/com/streamvideo/reactnative/util/CallAliveServiceChecker.kt +95 -0
  8. package/dist/commonjs/hooks/push/index.js +2 -0
  9. package/dist/commonjs/hooks/push/index.js.map +1 -1
  10. package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js +160 -0
  11. package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -0
  12. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js +31 -18
  13. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  14. package/dist/commonjs/hooks/push/useProcessPushCallEffect.js +67 -0
  15. package/dist/commonjs/hooks/push/useProcessPushCallEffect.js.map +1 -0
  16. package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js +97 -64
  17. package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  18. package/dist/commonjs/index.js +0 -1
  19. package/dist/commonjs/index.js.map +1 -1
  20. package/dist/commonjs/modules/call-manager/CallManager.js +0 -26
  21. package/dist/commonjs/modules/call-manager/CallManager.js.map +1 -1
  22. package/dist/commonjs/providers/StreamCall/index.js +6 -6
  23. package/dist/commonjs/providers/StreamCall/index.js.map +1 -1
  24. package/dist/commonjs/utils/StreamVideoRN/index.js +21 -33
  25. package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
  26. package/dist/commonjs/utils/internal/registerSDKGlobals.js +3 -52
  27. package/dist/commonjs/utils/internal/registerSDKGlobals.js.map +1 -1
  28. package/dist/commonjs/utils/push/android.js +202 -155
  29. package/dist/commonjs/utils/push/android.js.map +1 -1
  30. package/dist/commonjs/utils/push/internal/ios.js +34 -17
  31. package/dist/commonjs/utils/push/internal/ios.js.map +1 -1
  32. package/dist/commonjs/utils/push/internal/rxSubjects.js +45 -1
  33. package/dist/commonjs/utils/push/internal/rxSubjects.js.map +1 -1
  34. package/dist/commonjs/utils/push/internal/utils.js +20 -32
  35. package/dist/commonjs/utils/push/internal/utils.js.map +1 -1
  36. package/dist/commonjs/utils/push/ios.js.map +1 -1
  37. package/dist/commonjs/utils/push/libs/callkeep.js +17 -0
  38. package/dist/commonjs/utils/push/libs/callkeep.js.map +1 -0
  39. package/dist/commonjs/utils/push/libs/index.js +19 -8
  40. package/dist/commonjs/utils/push/libs/index.js.map +1 -1
  41. package/dist/commonjs/utils/push/libs/notifee/index.js +19 -0
  42. package/dist/commonjs/utils/push/libs/notifee/index.js.map +1 -1
  43. package/dist/commonjs/utils/push/libs/voipPushNotification.js +17 -0
  44. package/dist/commonjs/utils/push/libs/voipPushNotification.js.map +1 -0
  45. package/dist/commonjs/utils/push/setupIosCallKeepEvents.js +205 -0
  46. package/dist/commonjs/utils/push/setupIosCallKeepEvents.js.map +1 -0
  47. package/dist/commonjs/utils/push/setupIosVoipPushEvents.js +6 -7
  48. package/dist/commonjs/utils/push/setupIosVoipPushEvents.js.map +1 -1
  49. package/dist/commonjs/version.js +1 -1
  50. package/dist/commonjs/version.js.map +1 -1
  51. package/dist/module/hooks/push/index.js +2 -0
  52. package/dist/module/hooks/push/index.js.map +1 -1
  53. package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js +153 -0
  54. package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -0
  55. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +31 -18
  56. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  57. package/dist/module/hooks/push/useProcessPushCallEffect.js +60 -0
  58. package/dist/module/hooks/push/useProcessPushCallEffect.js.map +1 -0
  59. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +99 -66
  60. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  61. package/dist/module/index.js +0 -1
  62. package/dist/module/index.js.map +1 -1
  63. package/dist/module/modules/call-manager/CallManager.js +0 -26
  64. package/dist/module/modules/call-manager/CallManager.js.map +1 -1
  65. package/dist/module/providers/StreamCall/index.js +6 -6
  66. package/dist/module/providers/StreamCall/index.js.map +1 -1
  67. package/dist/module/utils/StreamVideoRN/index.js +21 -33
  68. package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
  69. package/dist/module/utils/internal/registerSDKGlobals.js +3 -52
  70. package/dist/module/utils/internal/registerSDKGlobals.js.map +1 -1
  71. package/dist/module/utils/push/android.js +204 -157
  72. package/dist/module/utils/push/android.js.map +1 -1
  73. package/dist/module/utils/push/internal/ios.js +34 -17
  74. package/dist/module/utils/push/internal/ios.js.map +1 -1
  75. package/dist/module/utils/push/internal/rxSubjects.js +44 -0
  76. package/dist/module/utils/push/internal/rxSubjects.js.map +1 -1
  77. package/dist/module/utils/push/internal/utils.js +19 -29
  78. package/dist/module/utils/push/internal/utils.js.map +1 -1
  79. package/dist/module/utils/push/ios.js.map +1 -1
  80. package/dist/module/utils/push/libs/callkeep.js +11 -0
  81. package/dist/module/utils/push/libs/callkeep.js.map +1 -0
  82. package/dist/module/utils/push/libs/index.js +2 -1
  83. package/dist/module/utils/push/libs/index.js.map +1 -1
  84. package/dist/module/utils/push/libs/notifee/index.js +18 -0
  85. package/dist/module/utils/push/libs/notifee/index.js.map +1 -1
  86. package/dist/module/utils/push/libs/voipPushNotification.js +11 -0
  87. package/dist/module/utils/push/libs/voipPushNotification.js.map +1 -0
  88. package/dist/module/utils/push/setupIosCallKeepEvents.js +199 -0
  89. package/dist/module/utils/push/setupIosCallKeepEvents.js.map +1 -0
  90. package/dist/module/utils/push/setupIosVoipPushEvents.js +6 -7
  91. package/dist/module/utils/push/setupIosVoipPushEvents.js.map +1 -1
  92. package/dist/module/version.js +1 -1
  93. package/dist/module/version.js.map +1 -1
  94. package/dist/typescript/hooks/push/index.d.ts.map +1 -1
  95. package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts +5 -0
  96. package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts.map +1 -0
  97. package/dist/typescript/hooks/push/useIosVoipPushEventsSetupEffect.d.ts.map +1 -1
  98. package/dist/typescript/hooks/push/useProcessPushCallEffect.d.ts +8 -0
  99. package/dist/typescript/hooks/push/useProcessPushCallEffect.d.ts.map +1 -0
  100. package/dist/typescript/hooks/useAndroidKeepCallAliveEffect.d.ts.map +1 -1
  101. package/dist/typescript/index.d.ts +0 -1
  102. package/dist/typescript/index.d.ts.map +1 -1
  103. package/dist/typescript/modules/call-manager/CallManager.d.ts +0 -5
  104. package/dist/typescript/modules/call-manager/CallManager.d.ts.map +1 -1
  105. package/dist/typescript/utils/StreamVideoRN/index.d.ts +2 -20
  106. package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
  107. package/dist/typescript/utils/StreamVideoRN/types.d.ts +29 -54
  108. package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
  109. package/dist/typescript/utils/internal/registerSDKGlobals.d.ts.map +1 -1
  110. package/dist/typescript/utils/push/android.d.ts +2 -1
  111. package/dist/typescript/utils/push/android.d.ts.map +1 -1
  112. package/dist/typescript/utils/push/internal/ios.d.ts.map +1 -1
  113. package/dist/typescript/utils/push/internal/rxSubjects.d.ts +33 -0
  114. package/dist/typescript/utils/push/internal/rxSubjects.d.ts.map +1 -1
  115. package/dist/typescript/utils/push/internal/utils.d.ts +1 -8
  116. package/dist/typescript/utils/push/internal/utils.d.ts.map +1 -1
  117. package/dist/typescript/utils/push/ios.d.ts +2 -1
  118. package/dist/typescript/utils/push/ios.d.ts.map +1 -1
  119. package/dist/typescript/utils/push/libs/callkeep.d.ts +3 -0
  120. package/dist/typescript/utils/push/libs/callkeep.d.ts.map +1 -0
  121. package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts +2 -16
  122. package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
  123. package/dist/typescript/utils/push/libs/index.d.ts +2 -1
  124. package/dist/typescript/utils/push/libs/index.d.ts.map +1 -1
  125. package/dist/typescript/utils/push/libs/notifee/index.d.ts +1 -0
  126. package/dist/typescript/utils/push/libs/notifee/index.d.ts.map +1 -1
  127. package/dist/typescript/utils/push/libs/voipPushNotification.d.ts +3 -0
  128. package/dist/typescript/utils/push/libs/voipPushNotification.d.ts.map +1 -0
  129. package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts +6 -0
  130. package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts.map +1 -0
  131. package/dist/typescript/utils/push/setupIosVoipPushEvents.d.ts.map +1 -1
  132. package/dist/typescript/version.d.ts +1 -1
  133. package/dist/typescript/version.d.ts.map +1 -1
  134. package/expo-config-plugin/dist/withAndroidManifest.js +33 -1
  135. package/expo-config-plugin/dist/withAndroidPermissions.js +7 -2
  136. package/expo-config-plugin/dist/withAppDelegate.js +197 -19
  137. package/expo-config-plugin/dist/withMainActivity.js +1 -1
  138. package/expo-config-plugin/dist/withiOSInfoPlist.js +3 -2
  139. package/ios/StreamInCallManager.m +0 -2
  140. package/ios/StreamInCallManager.swift +7 -19
  141. package/ios/StreamVideoReactNative.h +4 -7
  142. package/ios/StreamVideoReactNative.m +82 -189
  143. package/package.json +19 -14
  144. package/src/hooks/push/index.ts +2 -0
  145. package/src/hooks/push/useIosCallkeepWithCallingStateEffect.ts +235 -0
  146. package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +34 -21
  147. package/src/hooks/push/useProcessPushCallEffect.ts +108 -0
  148. package/src/hooks/useAndroidKeepCallAliveEffect.ts +120 -94
  149. package/src/index.ts +0 -1
  150. package/src/modules/call-manager/CallManager.ts +0 -36
  151. package/src/modules/call-manager/native-module.d.ts +0 -7
  152. package/src/providers/StreamCall/index.tsx +6 -6
  153. package/src/utils/StreamVideoRN/index.ts +30 -40
  154. package/src/utils/StreamVideoRN/types.ts +29 -56
  155. package/src/utils/internal/registerSDKGlobals.ts +4 -47
  156. package/src/utils/push/android.ts +309 -231
  157. package/src/utils/push/internal/ios.ts +44 -28
  158. package/src/utils/push/internal/rxSubjects.ts +61 -0
  159. package/src/utils/push/internal/utils.ts +26 -45
  160. package/src/utils/push/ios.ts +6 -1
  161. package/src/utils/push/libs/callkeep.ts +16 -0
  162. package/src/utils/push/libs/index.ts +2 -1
  163. package/src/utils/push/libs/notifee/index.ts +27 -0
  164. package/src/utils/push/libs/voipPushNotification.ts +17 -0
  165. package/src/utils/push/setupIosCallKeepEvents.ts +252 -0
  166. package/src/utils/push/setupIosVoipPushEvents.ts +7 -11
  167. package/src/version.ts +1 -1
  168. package/android/src/main/java/com/streamvideo/reactnative/keepalive/KeepAliveNotification.kt +0 -83
  169. package/android/src/main/java/com/streamvideo/reactnative/keepalive/StreamCallKeepAliveHeadlessService.kt +0 -149
  170. package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js +0 -121
  171. package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js.map +0 -1
  172. package/dist/commonjs/utils/internal/callingx/audioSessionPromise.js +0 -58
  173. package/dist/commonjs/utils/internal/callingx/audioSessionPromise.js.map +0 -1
  174. package/dist/commonjs/utils/internal/callingx/callingx.js +0 -109
  175. package/dist/commonjs/utils/internal/callingx/callingx.js.map +0 -1
  176. package/dist/commonjs/utils/keepCallAliveHeadlessTask.js +0 -48
  177. package/dist/commonjs/utils/keepCallAliveHeadlessTask.js.map +0 -1
  178. package/dist/commonjs/utils/push/libs/callingx.js +0 -75
  179. package/dist/commonjs/utils/push/libs/callingx.js.map +0 -1
  180. package/dist/commonjs/utils/push/setupCallingExpEvents.js +0 -108
  181. package/dist/commonjs/utils/push/setupCallingExpEvents.js.map +0 -1
  182. package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js +0 -114
  183. package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js.map +0 -1
  184. package/dist/module/utils/internal/callingx/audioSessionPromise.js +0 -51
  185. package/dist/module/utils/internal/callingx/audioSessionPromise.js.map +0 -1
  186. package/dist/module/utils/internal/callingx/callingx.js +0 -100
  187. package/dist/module/utils/internal/callingx/callingx.js.map +0 -1
  188. package/dist/module/utils/keepCallAliveHeadlessTask.js +0 -42
  189. package/dist/module/utils/keepCallAliveHeadlessTask.js.map +0 -1
  190. package/dist/module/utils/push/libs/callingx.js +0 -67
  191. package/dist/module/utils/push/libs/callingx.js.map +0 -1
  192. package/dist/module/utils/push/setupCallingExpEvents.js +0 -102
  193. package/dist/module/utils/push/setupCallingExpEvents.js.map +0 -1
  194. package/dist/typescript/hooks/push/useCallingExpWithCallingStateEffect.d.ts +0 -5
  195. package/dist/typescript/hooks/push/useCallingExpWithCallingStateEffect.d.ts.map +0 -1
  196. package/dist/typescript/utils/internal/callingx/audioSessionPromise.d.ts +0 -16
  197. package/dist/typescript/utils/internal/callingx/audioSessionPromise.d.ts.map +0 -1
  198. package/dist/typescript/utils/internal/callingx/callingx.d.ts +0 -13
  199. package/dist/typescript/utils/internal/callingx/callingx.d.ts.map +0 -1
  200. package/dist/typescript/utils/keepCallAliveHeadlessTask.d.ts +0 -10
  201. package/dist/typescript/utils/keepCallAliveHeadlessTask.d.ts.map +0 -1
  202. package/dist/typescript/utils/push/libs/callingx.d.ts +0 -9
  203. package/dist/typescript/utils/push/libs/callingx.d.ts.map +0 -1
  204. package/dist/typescript/utils/push/setupCallingExpEvents.d.ts +0 -8
  205. package/dist/typescript/utils/push/setupCallingExpEvents.d.ts.map +0 -1
  206. package/src/hooks/push/useCallingExpWithCallingStateEffect.ts +0 -147
  207. package/src/utils/internal/callingx/audioSessionPromise.ts +0 -53
  208. package/src/utils/internal/callingx/callingx.ts +0 -146
  209. package/src/utils/keepCallAliveHeadlessTask.ts +0 -54
  210. package/src/utils/push/libs/callingx.ts +0 -90
  211. package/src/utils/push/setupCallingExpEvents.ts +0 -130
@@ -1,8 +1,9 @@
1
- import { Platform } from 'react-native';
1
+ import { AppState, NativeModules, Platform } from 'react-native';
2
+ import { getCallKeepLib, getVoipPushNotificationLib } from '../libs';
3
+ import { voipPushNotificationCallCId$ } from './rxSubjects';
2
4
  import { pushUnsubscriptionCallbacks } from './constants';
3
- import { canListenToWS, shouldCallBeClosed } from './utils';
5
+ import { canAddPushWSSubscriptionsRef, shouldCallBeEnded } from './utils';
4
6
  import { videoLoggerSystem } from '@stream-io/video-client';
5
- import { getCallingxLib } from '../libs/callingx';
6
7
  export const onVoipNotificationReceived = async (notification, pushConfig) => {
7
8
  /* --- Example payload ---
8
9
  {
@@ -26,7 +27,6 @@ export const onVoipNotificationReceived = async (notification, pushConfig) => {
26
27
  "version": "v2"
27
28
  }
28
29
  } */
29
- const logger = videoLoggerSystem.getLogger('callingx - onVoipNotificationReceived');
30
30
  const sender = notification?.stream?.sender;
31
31
  const type = notification?.stream?.type;
32
32
  // do not process any other notifications other than stream.video or ringing
@@ -37,31 +37,47 @@ export const onVoipNotificationReceived = async (notification, pushConfig) => {
37
37
  if (!call_cid || Platform.OS !== 'ios' || !pushConfig.ios.pushProviderName) {
38
38
  return;
39
39
  }
40
- const callingx = getCallingxLib();
41
- if (callingx.isCallTracked(call_cid)) {
42
- //same call_cid is already tracked, so we skip the notification
43
- logger.debug(`the same call_cid ${call_cid} is already tracked, skipping the call.ring notification`);
44
- return;
45
- }
40
+ const logger = videoLoggerSystem.getLogger('setupIosVoipPushEvents');
46
41
  const client = await pushConfig.createStreamVideoClient();
47
42
  if (!client) {
48
43
  logger.debug('client not found, not processing call.ring voip push notification');
49
44
  return;
50
45
  }
46
+ const shouldRejectCallWhenBusy = client['rejectCallWhenBusy'] ?? false;
47
+ if (shouldRejectCallWhenBusy) {
48
+ // inform the iOS native module that we should reject call when busy
49
+ NativeModules.StreamVideoReactNative.setShouldRejectCallWhenBusy(shouldRejectCallWhenBusy);
50
+ }
51
51
  const callFromPush = await client.onRingingCall(call_cid);
52
+ let uuid = '';
53
+ try {
54
+ uuid = await NativeModules?.StreamVideoReactNative?.getIncomingCallUUid(call_cid);
55
+ } catch (error) {
56
+ logger.error('Error in getting call uuid from native module', error);
57
+ }
58
+ if (!uuid) {
59
+ logger.error(`Not processing call.ring push notification, as no uuid found for call_cid: ${call_cid}`);
60
+ return;
61
+ }
62
+ const created_by_id = notification?.stream?.created_by_id;
63
+ const receiver_id = notification?.stream?.receiver_id;
52
64
  function closeCallIfNecessary() {
53
65
  const {
54
66
  mustEndCall,
55
- endCallReason
56
- } = shouldCallBeClosed(callFromPush, notification?.stream);
67
+ callkeepReason
68
+ } = shouldCallBeEnded(callFromPush, created_by_id, receiver_id);
57
69
  if (mustEndCall) {
58
- logger.debug(`callingx.endCallWithReason for call_cid: ${call_cid} endCallReason: ${endCallReason}`);
59
- callingx.endCallWithReason(call_cid, endCallReason);
70
+ const callkeep = getCallKeepLib();
71
+ logger.debug(`callkeep.reportEndCallWithUUID for uuid: ${uuid}, call_cid: ${call_cid}, reason: ${callkeepReason}`);
72
+ callkeep.reportEndCallWithUUID(uuid, callkeepReason);
73
+ const voipPushNotification = getVoipPushNotificationLib();
74
+ voipPushNotification.onVoipNotificationCompleted(uuid);
60
75
  return true;
61
76
  }
62
77
  return false;
63
78
  }
64
79
  const closed = closeCallIfNecessary();
80
+ const canListenToWS = () => canAddPushWSSubscriptionsRef.current && AppState.currentState !== 'active';
65
81
  if (!closed && canListenToWS()) {
66
82
  const unsubscribe = callFromPush.on('all', event => {
67
83
  const _canListenToWS = canListenToWS();
@@ -79,8 +95,9 @@ export const onVoipNotificationReceived = async (notification, pushConfig) => {
79
95
  pushUnsubscriptionCallbacks.get(call_cid)?.forEach(cb => cb());
80
96
  pushUnsubscriptionCallbacks.set(call_cid, [unsubscribe]);
81
97
  }
82
-
83
- // callingx event listeners (setupCallingExpEvents) will handle accept/reject
84
- logger.debug(`call_cid:${call_cid} received and processed from call.ring push notification`);
98
+ // send the info to this subject, it is listened by callkeep events
99
+ // callkeep events will then accept/reject the call
100
+ logger.debug(`call_cid:${call_cid} uuid:${uuid} received and processed from call.ring push notification`);
101
+ voipPushNotificationCallCId$.next(call_cid);
85
102
  };
86
103
  //# sourceMappingURL=ios.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","pushUnsubscriptionCallbacks","canListenToWS","shouldCallBeClosed","videoLoggerSystem","getCallingxLib","onVoipNotificationReceived","notification","pushConfig","logger","getLogger","sender","stream","type","call_cid","OS","ios","pushProviderName","callingx","isCallTracked","debug","client","createStreamVideoClient","callFromPush","onRingingCall","closeCallIfNecessary","mustEndCall","endCallReason","endCallWithReason","closed","unsubscribe","on","event","_canListenToWS","_closed","get","forEach","cb","set"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/ios.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,2BAA2B,QAAQ,aAAa;AACzD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,SAAS;AAE3D,SAASC,iBAAiB,QAAQ,yBAAyB;AAC3D,SAASC,cAAc,QAAQ,kBAAkB;AAEjD,OAAO,MAAMC,0BAA0B,GAAG,MAAAA,CACxCC,YAAiB,EACjBC,UAAkD,KAC/C;EACH;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,MAAMC,MAAM,GAAGL,iBAAiB,CAACM,SAAS,CACxC,uCACF,CAAC;EAED,MAAMC,MAAM,GAAGJ,YAAY,EAAEK,MAAM,EAAED,MAAM;EAC3C,MAAME,IAAI,GAAGN,YAAY,EAAEK,MAAM,EAAEC,IAAI;EACvC;EACA,IAAI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AI,CAAC+B,cAAc,EAAE;QACnBxB,MAAM,CAACW,KAAK,CACV,qCAAqCN,QAAQ,mBAAmBmB,cAAc,EAAE,EAChFD,KACF,CAAC;QACDF,WAAW,CAAC,CAAC;QACb;MACF;MACA,MAAMI,OAAO,GAAGT,oBAAoB,CAAC,CAAC;MACtC,IAAIS,OAAO,EAAE;QACXzB,MAAM,CAACW,KAAK,CACV,qCAAqCN,QAAQ,mBAAmBmB,cAAc,wBAAwBC,OAAO,EAAE,EAC/GF,KACF,CAAC;QACDF,WAAW,CAAC,CAAC;MACf;IACF,CAAC,CAAC;IAEF7B,2BAA2B,CAACkC,GAAG,CAACrB,QAAQ,CAAC,EAAEsB,OAAO,CAAEC,EAAE,IAAKA,EAAE,CAAC,CAAC,CAAC;IAChEpC,2BAA2B,CAACqC,GAAG,CAACxB,QAAQ,EAAE,CAACgB,WAAW,CAAC,CAAC;EAC1D;;EAEA;EACArB,MAAM,CAACW,KAAK,CACV,YAAYN,QAAQ,0DACtB,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["AppState","NativeModules","Platform","getCallKeepLib","getVoipPushNotificationLib","voipPushNotificationCallCId$","pushUnsubscriptionCallbacks","canAddPushWSSubscriptionsRef","shouldCallBeEnded","videoLoggerSystem","onVoipNotificationReceived","notification","pushConfig","sender","stream","type","call_cid","OS","ios","pushProviderName","logger","getLogger","client","createStreamVideoClient","debug","shouldRejectCallWhenBusy","StreamVideoReactNative","setShouldRejectCallWhenBusy","callFromPush","onRingingCall","uuid","getIncomingCallUUid","error","created_by_id","receiver_id","closeCallIfNecessary","mustEndCall","callkeepReason","callkeep","reportEndCallWithUUID","voipPushNotification","onVoipNotificationCompleted","closed","canListenToWS","current","currentState","unsubscribe","on","event","_canListenToWS","_closed","get","forEach","cb","set","next"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/ios.ts"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAChE,SA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GAAGN,aAAa,CAAC,CAAC;MACtC,IAAI,CAACM,cAAc,EAAE;QACnB7B,MAAM,CAACI,KAAK,CACV,qCAAqCR,QAAQ,mBAAmBiC,cAAc,EAAE,EAChFD,KACF,CAAC;QACDF,WAAW,CAAC,CAAC;QACb;MACF;MACA,MAAMI,OAAO,GAAGf,oBAAoB,CAAC,CAAC;MACtC,IAAIe,OAAO,EAAE;QACX9B,MAAM,CAACI,KAAK,CACV,qCAAqCR,QAAQ,mBAAmBiC,cAAc,wBAAwBC,OAAO,EAAE,EAC/GF,KACF,CAAC;QACDF,WAAW,CAAC,CAAC;MACf;IACF,CAAC,CAAC;IAEFxC,2BAA2B,CAAC6C,GAAG,CAACnC,QAAQ,CAAC,EAAEoC,OAAO,CAAEC,EAAE,IAAKA,EAAE,CAAC,CAAC,CAAC;IAChE/C,2BAA2B,CAACgD,GAAG,CAACtC,QAAQ,EAAE,CAAC8B,WAAW,CAAC,CAAC;EAC1D;EACA;EACA;EACA1B,MAAM,CAACI,KAAK,CACV,YAAYR,QAAQ,SAASc,IAAI,0DACnC,CAAC;EACDzB,4BAA4B,CAACkD,IAAI,CAACvC,QAAQ,CAAC;AAC7C,CAAC","ignoreList":[]}
@@ -4,4 +4,48 @@ import { BehaviorSubject } from 'rxjs';
4
4
  * Note: it is should be subscribed only when a user has connected to the websocket of Stream
5
5
  */
6
6
  export const pushNonRingingCallData$ = new BehaviorSubject(undefined);
7
+
8
+ /**
9
+ * This rxjs subject is used to store the call cid of the accepted incoming call from push notification
10
+ * Note: it is should be subscribed only when a user has connected to the websocket of Stream
11
+ */
12
+ export const pushAcceptedIncomingCallCId$ = new BehaviorSubject(undefined);
13
+
14
+ /**
15
+ * 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
16
+ * Note: it should be subscribed only when a user has connected to the websocket of Stream
17
+ */
18
+ export const pushTappedIncomingCallCId$ = new BehaviorSubject(undefined);
19
+
20
+ /**
21
+ * 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
22
+ * Used so that the call is navigated to when app is open from being killed
23
+ * Note: it should be subscribed only when a user has connected to the websocket of Stream
24
+ */
25
+ export const pushAndroidBackgroundDeliveredIncomingCallCId$ = new BehaviorSubject(undefined);
26
+
27
+ /**
28
+ * This rxjs subject is used to store the call cid of the accepted incoming call from push notification
29
+ * Note: it should be subscribed only when a user has connected to the websocket of Stream
30
+ */
31
+ export const pushRejectedIncomingCallCId$ = new BehaviorSubject(undefined);
32
+
33
+ /**
34
+ * This rxjs subject is used to store the call cid of the incoming call from ios voip pushkit notification
35
+ */
36
+ export const voipPushNotificationCallCId$ = new BehaviorSubject(undefined);
37
+
38
+ /** The pair of cid of a call and its corresponding uuid created in the native side */
39
+
40
+ /*
41
+ * This rxjs subject should only used to store the CallkeepMap
42
+ * for the incoming call when on foreground
43
+ * or in other words, when we get didDisplayIncomingCall from callkeep lib
44
+ */
45
+ export const voipCallkeepCallOnForegroundMap$ = new BehaviorSubject(undefined);
46
+
47
+ /*
48
+ * This rxjs subject should only used to store the CallkeepMap when it was accepted in the native dialer
49
+ */
50
+ export const voipCallkeepAcceptedCallOnNativeDialerMap$ = new BehaviorSubject(undefined);
7
51
  //# sourceMappingURL=rxSubjects.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BehaviorSubject","pushNonRingingCallData$","undefined"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/rxSubjects.ts"],"mappings":"AAAA,SAASA,eAAe,QAAQ,MAAM;AAGtC;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,IAAID,eAAe,CAExDE,SAAS,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BehaviorSubject","pushNonRingingCallData$","undefined","pushAcceptedIncomingCallCId$","pushTappedIncomingCallCId$","pushAndroidBackgroundDeliveredIncomingCallCId$","pushRejectedIncomingCallCId$","voipPushNotificationCallCId$","voipCallkeepCallOnForegroundMap$","voipCallkeepAcceptedCallOnNativeDialerMap$"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/rxSubjects.ts"],"mappings":"AAAA,SAASA,eAAe,QAAQ,MAAM;AAGtC;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,IAAID,eAAe,CAExDE,SAAS,CAAC;;AAEZ;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,IAAIH,eAAe,CAE7DE,SAAS,CAAC;;AAEZ;AACA;AACA;AACA;AACA,OAAO,MAAME,0BAA0B,GAAG,IAAIJ,eAAe,CAE3DE,SAAS,CAAC;;AAEZ;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMG,8CAA8C,GACzD,IAAIL,eAAe,CAAqBE,SAAS,CAAC;;AAEpD;AACA;AACA;AACA;AACA,OAAO,MAAMI,4BAA4B,GAAG,IAAIN,eAAe,CAE7DE,SAAS,CAAC;;AAEZ;AACA;AACA;AACA,OAAO,MAAMK,4BAA4B,GAAG,IAAIP,eAAe,CAE7DE,SAAS,CAAC;;AAEZ;;AAMA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMM,gCAAgC,GAAG,IAAIR,eAAe,CAEjEE,SAAS,CAAC;;AAEZ;AACA;AACA;AACA,OAAO,MAAMO,0CAA0C,GAAG,IAAIT,eAAe,CAE3EE,SAAS,CAAC","ignoreList":[]}
@@ -1,40 +1,47 @@
1
1
  import { CallingState, videoLoggerSystem } from '@stream-io/video-client';
2
2
  import { onNewCallNotification } from '../../internal/newNotificationCallbacks';
3
3
  import { pushUnsubscriptionCallbacks } from './constants';
4
- import { AppState } from 'react-native';
5
4
  /**
6
5
  * This function is used to check if the call should be ended based on the push notification
7
6
  * Useful for callkeep management to end the call if necessary (with reportEndCallWithUUID)
8
7
  */
9
8
  export const shouldCallBeEnded = (callFromPush, created_by_id, receiver_id) => {
9
+ /* callkeep reasons for ending a call
10
+ FAILED: 1,
11
+ REMOTE_ENDED: 2,
12
+ UNANSWERED: 3,
13
+ ANSWERED_ELSEWHERE: 4,
14
+ DECLINED_ELSEWHERE: 5,
15
+ MISSED: 6
16
+ */
10
17
  const callSession = callFromPush.state.session;
11
18
  const rejected_by = callSession?.rejected_by;
12
19
  const accepted_by = callSession?.accepted_by;
13
20
  let mustEndCall = false;
14
- let endCallReason = 'unknown';
21
+ let callkeepReason = 0;
15
22
  if (created_by_id && rejected_by) {
16
23
  if (rejected_by[created_by_id]) {
17
- // call was cancelled by the caller before the receiver could answer
24
+ // call was cancelled by the caller
18
25
  mustEndCall = true;
19
- endCallReason = 'canceled';
26
+ callkeepReason = 2;
20
27
  }
21
28
  } else if (receiver_id && rejected_by) {
22
29
  if (rejected_by[receiver_id]) {
23
30
  // call was rejected by the receiver in some other device
24
31
  mustEndCall = true;
25
- endCallReason = 'rejected';
32
+ callkeepReason = 5;
26
33
  }
27
34
  } else if (receiver_id && accepted_by) {
28
35
  if (accepted_by[receiver_id]) {
29
36
  // call was accepted by the receiver in some other device
30
37
  mustEndCall = true;
31
- endCallReason = 'answeredElsewhere';
38
+ callkeepReason = 4;
32
39
  }
33
40
  }
34
- videoLoggerSystem.getLogger('shouldCallBeEnded').debug(`callCid: ${callFromPush.cid} mustEndCall: ${mustEndCall} endCallReason: ${endCallReason}`);
41
+ videoLoggerSystem.getLogger('shouldCallBeEnded').debug(`callCid: ${callFromPush.cid} mustEndCall: ${mustEndCall} callkeepReason: ${callkeepReason}`);
35
42
  return {
36
43
  mustEndCall,
37
- endCallReason
44
+ callkeepReason
38
45
  };
39
46
  };
40
47
 
@@ -66,10 +73,10 @@ export const processCallFromPushInBackground = async (pushConfig, call_cid, acti
66
73
  */
67
74
  export const processCallFromPush = async (client, call_cid, action, pushConfig) => {
68
75
  let callFromPush;
69
- const logger = videoLoggerSystem.getLogger('Callingx - processCallFromPush');
70
76
  try {
71
77
  callFromPush = await client.onRingingCall(call_cid);
72
78
  } catch (e) {
79
+ const logger = videoLoggerSystem.getLogger('processCallFromPush');
73
80
  logger.error('failed to fetch call from push notification', e);
74
81
  return;
75
82
  }
@@ -79,22 +86,18 @@ export const processCallFromPush = async (client, call_cid, action, pushConfig)
79
86
  if (pushConfig.publishOptions) {
80
87
  callFromPush.updatePublishOptions(pushConfig.publishOptions);
81
88
  }
82
- logger.debug(`joining call from push notification with callCid: ${callFromPush.cid}`);
83
- const callingState = callFromPush.state.callingState;
84
- if (callingState !== CallingState.RINGING && callingState !== CallingState.IDLE) {
85
- logger.debug(`skipping join call as it is not in ringing or idle state from push notification. callCid: ${callFromPush.cid}`);
86
- return;
87
- }
89
+ videoLoggerSystem.getLogger('processCallFromPush').debug(`joining call from push notification with callCid: ${callFromPush.cid}`);
88
90
  await callFromPush.join();
89
91
  } else if (action === 'decline') {
90
92
  const canReject = callFromPush.state.callingState === CallingState.RINGING;
91
- logger.debug(`declining call from push notification with callCid: ${callFromPush.cid} reject: ${canReject}`);
93
+ videoLoggerSystem.getLogger('processCallFromPush').debug(`declining call from push notification with callCid: ${callFromPush.cid} reject: ${canReject}`);
92
94
  await callFromPush.leave({
93
95
  reject: canReject,
94
96
  reason: 'decline'
95
97
  });
96
98
  }
97
99
  } catch (e) {
100
+ const logger = videoLoggerSystem.getLogger('processCallFromPush');
98
101
  logger.warn(`failed to process ${action} call from push notification`, e);
99
102
  }
100
103
  };
@@ -145,17 +148,4 @@ export const clearPushWSEventSubscriptions = call_cid => {
145
148
  export const canAddPushWSSubscriptionsRef = {
146
149
  current: true
147
150
  };
148
- export const canListenToWS = () => canAddPushWSSubscriptionsRef.current && AppState.currentState !== 'active';
149
- export const shouldCallBeClosed = (call, pushData) => {
150
- const created_by_id = pushData?.created_by_id;
151
- const receiver_id = pushData?.receiver_id;
152
- const {
153
- mustEndCall,
154
- endCallReason
155
- } = shouldCallBeEnded(call, created_by_id, receiver_id);
156
- return {
157
- mustEndCall,
158
- endCallReason
159
- };
160
- };
161
151
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["CallingState","videoLoggerSystem","onNewCallNotification","pushUnsubscriptionCallbacks","AppState","shouldCallBeEnded","callFromPush","created_by_id","receiver_id","callSession","state","session","rejected_by","accepted_by","mustEndCall","endCallReason","getLogger","debug","cid","processCallFromPushInBackground","pushConfig","call_cid","action","videoClient","createStreamVideoClient","e","logger","error","processCallFromPush","client","onRingingCall","publishOptions","updatePublishOptions","callingState","RINGING","IDLE","join","canReject","leave","reject","reason","warn","processNonIncomingCallFromPush","nonRingingNotificationType","_callFromPush","calls","find","c","callType","callId","split","call","get","clearPushWSEventSubscriptions","unsubscriptionCallbacks","forEach","cb","delete","canAddPushWSSubscriptionsRef","current","canListenToWS","currentState","shouldCallBeClosed","pushData"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/utils.ts"],"mappings":"AAAA,SAEEA,YAAY,EAEZC,iBAAiB,QACZ,yBAAyB;AAKhC,SAASC,qBAAqB,QAAQ,yCAAyC;AAC/E,SAASC,2BAA2B,QAAQ,aAAa;AACzD,SAASC,QAAQ,QAAQ,cAAc;AAOvC;AACA;AACA;AACA;AACA,OAAO,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,IAAIR,aAAa,IAAIK,WAAW,EAAE;IAChC,IAAIA,WAAW,CAACL,aAAa,CAAC,EAAE;MAC9B;MACAO,WAAW,GAAG,IAAI;MAClBC,aAAa,GAAG,UAAU;IAC5B;EACF,CAAC,MAAM,IAAIP,WAAW,IAAII,WAAW,EAAE;IACrC,IAAIA,WAAW,CAACJ,WAAW,CAAC,EAAE;MAC5B;MACAM,WAAW,GAAG,IAAI;MAClBC,aAAa,GAAG,UAAU;IAC5B;EACF,CAAC,MAAM,IAAIP,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,QAAQ,EAAEvD,WAAqB;EAEnD,MAAM;IAAEM,WAAW;IAAEC;EAAc,CAAC,GAAGV,iBAAiB,CACtD8C,IAAI,EACJ5C,aAAa,EACbC,WACF,CAAC;EACD,OAAO;IAAEM,WAAW;IAAEC;EAAc,CAAC;AACvC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["CallingState","videoLoggerSystem","onNewCallNotification","pushUnsubscriptionCallbacks","shouldCallBeEnded","callFromPush","created_by_id","receiver_id","callSession","state","session","rejected_by","accepted_by","mustEndCall","callkeepReason","getLogger","debug","cid","processCallFromPushInBackground","pushConfig","call_cid","action","videoClient","createStreamVideoClient","e","logger","error","processCallFromPush","client","onRingingCall","publishOptions","updatePublishOptions","join","canReject","callingState","RINGING","leave","reject","reason","warn","processNonIncomingCallFromPush","nonRingingNotificationType","_callFromPush","calls","find","c","callType","callId","split","call","get","clearPushWSEventSubscriptions","unsubscriptionCallbacks","forEach","cb","delete","canAddPushWSSubscriptionsRef","current"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/utils.ts"],"mappings":"AAAA,SAEEA,YAAY,EAEZC,iBAAiB,QACZ,yBAAyB;AAKhC,SAASC,qBAAqB,QAAQ,yCAAyC;AAC/E,SAASC,2BAA2B,QAAQ,aAAa;AAMzD;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGA,CAC/BC,YAAkB,EAClBC,aAAiC,EACjCC,WAA+B,KAC5B;EACH;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,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,cAAc,GAAG,CAAC;EACtB,IAAIR,aAAa,IAAIK,WAAW,EAAE;IAChC,IAAIA,WAAW,CAACL,aAAa,CAAC,EAAE;MAC9B;M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B,EAChBqB,0BAA+C,KAC5C;EACH,IAAIpC,YAAkB;EACtB,IAAI;IACF,MAAMqC,aAAa,GAAGd,MAAM,CAACnB,KAAK,CAACkC,KAAK,CAACC,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAAC5B,GAAG,KAAKG,QAAQ,CAAC;IACxE,IAAIsB,aAAa,EAAE;MACjBrC,YAAY,GAAGqC,aAAa;IAC9B,CAAC,MAAM;MACL;MACA,MAAM,CAACI,QAAQ,EAAEC,MAAM,CAAC,GAAG3B,QAAQ,CAAC4B,KAAK,CAAC,GAAG,CAAC;MAC9C3C,YAAY,GAAGuB,MAAM,CAACqB,IAAI,CAACH,QAAQ,EAAYC,MAAgB,CAAC;MAChE,MAAM1C,YAAY,CAAC6C,GAAG,CAAC,CAAC;IAC1B;EACF,CAAC,CAAC,OAAO1B,CAAC,EAAE;IACV,MAAMC,MAAM,GAAGxB,iBAAiB,CAACc,SAAS,CACxC,gCACF,CAAC;IACDU,MAAM,CAACC,KAAK,CAAC,6CAA6C,EAAEF,CAAC,CAAC;IAC9D;EACF;EACAtB,qBAAqB,CAACG,YAAY,EAAEoC,0BAA0B,CAAC;AACjE,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMU,6BAA6B,GAAI/B,QAAgB,IAAK;EACjE,MAAMgC,uBAAuB,GAAGjD,2BAA2B,CAAC+C,GAAG,CAAC9B,QAAQ,CAAC;EACzE,IAAIgC,uBAAuB,EAAE;IAC3BA,uBAAuB,CAACC,OAAO,CAAEC,EAAE,IAAKA,EAAE,CAAC,CAAC,CAAC;IAC7CnD,2BAA2B,CAACoD,MAAM,CAACnC,QAAQ,CAAC;EAC9C;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMoC,4BAA0D,GAAG;EACxEC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","pushNonRingingCallData$","getExpoNotificationsLib","getNotifeeLibThrowIfNotInstalledForPush","getPushNotificationIosLib","videoLoggerSystem","setPushLogoutCallback","StreamVideoRN","lastApnToken","token","userId","processNonRingingNotificationStreamPayload","streamPayload","sender","type","cid","call_cid","logger","getLogger","trace","next","undefined","oniOSExpoNotificationEvent","event","pushConfig","getConfig","push","trigger","request","payload","stream","JSON","stringify","oniOSNotifeeEvent","OS","detail","notifeeLib","EventType","PRESS","notification","data","result","debug","onTapNonRingingCallNotification","onPushNotificationiOSStreamVideoEvent","pushNotificationIosLib","getData","isClicked","userInteraction","finish","FetchResult","NoData","initIosNonVoipToken","client","setUnsubscribeListener","ios","pushProviderName","setDeviceToken","streamClient","_user","id","removeDevice","err","warn","push_provider_name","addDevice","then","catch","isExpo","expoNotificationsLib","getDevicePushTokenAsync","devicePushToken","subscription","addPushTokenListener","remove","addEventListener","removeEventListener"],"sourceRoot":"../../../../src","sources":["utils/push/ios.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SAASC,uBAAuB,QAAQ,uBAAuB;AAC/D,SAEEC,uBAAuB,EACvBC,uCAAuC,EACvCC,yBAAyB,QAEpB,QAAQ;AACf,SAA4BC,iBAAiB,QAAQ,yBAAyB;AAC9E,SAASC,qBAAqB,QAAQ,gCAAgC;AAEtE,SAASC,aAAa,QAAQ,kBAAkB;AAKhD,IAAIC,YAAY,GAAG;EAAEC,KAAK,EAAE,EAAE;EAAEC,MAAM,EAAE;AAAG,CAAC;AAE5C,SAASC,0CAA0CA,CACjDC,aAAgC,EAChC;EACA,IACEA,aAAa,EAAEC,MAAM,KAAK,cAAc,IACxCD,aAAa,EAAEE,IAAI,KAAK,WAAW,EACnC;IACA,MAAMC,GAAG,GAAGH,aAAa,CAACI,QAAQ;IAClC,MAAMF,IAAI,GAAGF,aAAa,CAACE,IAAI;IAC/B,MAAMG,MAAM,GAAGZ,iBAAiB,CAACa,SAAS,CACxC,4CACF,CAAC;IACDD,MAAM,CAACE,KAAK,CAAC,eAAeJ,GAAG,KAAKD,IAAI,EAAE,CA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xEjC,KACF,CAAC;MACDgD,cAAc,CAAChD,KAAK,CAAC;IACvB,CAAC,CAAC;IACF6C,sBAAsB,CAAC,MAAM;MAC3BrC,MAAM,CAACyB,KAAK,CAAC,wDAAwD,CAAC;MACtEG,sBAAsB,CAAC+B,mBAAmB,CAAC,UAAU,CAAC;IACxD,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
1
+ {"version":3,"names":["Platform","pushNonRingingCallData$","getExpoNotificationsLib","getNotifeeLibThrowIfNotInstalledForPush","getPushNotificationIosLib","videoLoggerSystem","setPushLogoutCallback","StreamVideoRN","lastApnToken","token","userId","processNonRingingNotificationStreamPayload","streamPayload","sender","type","cid","call_cid","logger","getLogger","trace","next","undefined","oniOSExpoNotificationEvent","event","pushConfig","getConfig","push","trigger","request","payload","stream","JSON","stringify","oniOSNotifeeEvent","OS","detail","notifeeLib","EventType","PRESS","notification","data","result","debug","onTapNonRingingCallNotification","onPushNotificationiOSStreamVideoEvent","pushNotificationIosLib","getData","isClicked","userInteraction","finish","FetchResult","NoData","initIosNonVoipToken","client","setUnsubscribeListener","ios","pushProviderName","setDeviceToken","streamClient","_user","id","removeDevice","err","warn","push_provider_name","addDevice","then","catch","isExpo","expoNotificationsLib","getDevicePushTokenAsync","devicePushToken","subscription","addPushTokenListener","remove","addEventListener","removeEventListener"],"sourceRoot":"../../../../src","sources":["utils/push/ios.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SAASC,uBAAuB,QAAQ,uBAAuB;AAC/D,SAEEC,uBAAuB,EACvBC,uCAAuC,EACvCC,yBAAyB,QAEpB,QAAQ;AACf,SAA4BC,iBAAiB,QAAQ,yBAAyB;AAC9E,SAASC,qBAAqB,QAAQ,gCAAgC;AAEtE,SAASC,aAAa,QAAQ,kBAAkB;AAKhD,IAAIC,YAAY,GAAG;EAAEC,KAAK,EAAE,EAAE;EAAEC,MAAM,EAAE;AAAG,CAAC;AAE5C,SAASC,0CAA0CA,CACjDC,aAAgC,E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,sBAAsB,CAAC,MAAM;QAC3BrC,MAAM,CAACyB,KAAK,CAAC,mCAAmC,CAAC;QACjD8B,YAAY,CAACE,MAAM,CAAC,CAAC;MACvB,CAAC,CAAC;IACJ;EACF,CAAC,MAAM;IACL,MAAM7B,sBAAsB,GAAGzC,yBAAyB,CAAC,CAAC;IAC1DyC,sBAAsB,CAAC8B,gBAAgB,CAAC,UAAU,EAAGlE,KAAK,IAAK;MAC7DQ,MAAM,CAACyB,KAAK,CACV,wEAAwE,EACxEjC,KACF,CAAC;MACDgD,cAAc,CAAChD,KAAK,CAAC;IACvB,CAAC,CAAC;IACF6C,sBAAsB,CAAC,MAAM;MAC3BrC,MAAM,CAACyB,KAAK,CAAC,wDAAwD,CAAC;MACtEG,sBAAsB,CAAC+B,mBAAmB,CAAC,UAAU,CAAC;IACxD,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ let callkeep;
2
+ try {
3
+ callkeep = require('react-native-callkeep').default;
4
+ } catch {}
5
+ export function getCallKeepLib() {
6
+ if (!callkeep) {
7
+ throw Error('react-native-callkeep library is not installed. Please see https://github.com/react-native-webrtc/react-native-callkeep#Installation for installation instructions');
8
+ }
9
+ return callkeep;
10
+ }
11
+ //# sourceMappingURL=callkeep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["callkeep","require","default","getCallKeepLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/callkeep.ts"],"mappings":"AAEA,IAAIA,QAAoC;AAExC,IAAI;EACFA,QAAQ,GAAGC,OAAO,CAAC,uBAAuB,CAAC,CAACC,OAAO;AACrD,CAAC,CAAC,MAAM,CAAC;AAET,OAAO,SAASC,cAAcA,CAAA,EAAG;EAC/B,IAAI,CAACH,QAAQ,EAAE;IACb,MAAMI,KAAK,CACT,oKACF,CAAC;EACH;EACA,OAAOJ,QAAQ;AACjB","ignoreList":[]}
@@ -1,8 +1,9 @@
1
1
  export * from './expoNotifications';
2
2
  export * from './firebaseMessaging';
3
3
  export * from './iosPushNotification';
4
+ export * from './voipPushNotification';
5
+ export * from './callkeep';
4
6
  export * from './notifee';
5
- export * from './callingx';
6
7
 
7
8
  /*
8
9
  NOTE: must keep each libs in different files
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["utils/push/libs/index.ts"],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,uBAAuB;AACrC,cAAc,WAAW;AACzB,cAAc,YAAY;;AAE1B;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["utils/push/libs/index.ts"],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,YAAY;AAC1B,cAAc,WAAW;;AAEzB;AACA;AACA;AACA","ignoreList":[]}
@@ -1,4 +1,6 @@
1
+ import { PermissionsAndroid } from 'react-native';
1
2
  import { lib } from './lib';
3
+ import { videoLoggerSystem } from '@stream-io/video-client';
2
4
  var AndroidForegroundServiceType = /*#__PURE__*/function (AndroidForegroundServiceType) {
3
5
  AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_CAMERA"] = 64] = "FOREGROUND_SERVICE_TYPE_CAMERA";
4
6
  AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE"] = 16] = "FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE";
@@ -25,8 +27,24 @@ export function getNotifeeLibThrowIfNotInstalledForPush() {
25
27
  return lib;
26
28
  }
27
29
  export function getNotifeeLibNoThrowForKeepCallAlive() {
30
+ if (!lib) {
31
+ const logger = videoLoggerSystem.getLogger('getNotifeeLibNoThrow');
32
+ logger.info(`${'@notifee/react-native library not installed. It is required to keep call alive in the background for Android. '}${INSTALLATION_INSTRUCTION}`);
33
+ }
28
34
  return lib;
29
35
  }
36
+ export async function getKeepCallAliveForegroundServiceTypes() {
37
+ const types = [AndroidForegroundServiceType.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK];
38
+ const hasCameraPermission = await PermissionsAndroid.check(PermissionsAndroid.PERMISSIONS.CAMERA);
39
+ if (hasCameraPermission) {
40
+ types.push(AndroidForegroundServiceType.FOREGROUND_SERVICE_TYPE_CAMERA);
41
+ }
42
+ const hasMicrophonePermission = await PermissionsAndroid.check(PermissionsAndroid.PERMISSIONS.RECORD_AUDIO);
43
+ if (hasMicrophonePermission) {
44
+ types.push(AndroidForegroundServiceType.FOREGROUND_SERVICE_TYPE_MICROPHONE);
45
+ }
46
+ return types;
47
+ }
30
48
  export function getIncomingCallForegroundServiceTypes() {
31
49
  const types = [AndroidForegroundServiceType.FOREGROUND_SERVICE_TYPE_SHORT_SERVICE];
32
50
  return types;
@@ -1 +1 @@
1
- {"version":3,"names":["lib","AndroidForegroundServiceType","INSTALLATION_INSTRUCTION","getNotifeeLibThrowIfNotInstalledForPush","Error","getNotifeeLibNoThrowForKeepCallAlive","getIncomingCallForegroundServiceTypes","types","FOREGROUND_SERVICE_TYPE_SHORT_SERVICE"],"sourceRoot":"../../../../../../src","sources":["utils/push/libs/notifee/index.ts"],"mappings":"AAAA,SAASA,GAAG,QAAmB,OAAO;AAAC,IAIlCC,4BAA4B,0BAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAAA,OAA5BA,4BAA4B;AAAA,EAA5BA,4BAA4B;AAkBjC,MAAMC,wBAAwB,GAC5B,6FAA6F;AAE/F,OAAO,SAASC,uCAAuCA,CAAA,EAAG;EACxD,IAAI,CAACH,GAAG,EAAE;IACR,MAAMI,KAAK,CACT,8FAA8F,GAC5FF,wBACJ,CAAC;EACH;EACA,OAAOF,GAAG;AACZ;AAEA,OAAO,SAASK,oCAAoCA,CAAA,EAAG;EACrD,OAAOL,GAAG;AACZ;AAEA,OAAO,SAASM,qCAAqCA,CAAA,EAAG;EACtD,MAAMC,KAAqC,GAAG,CAC5CN,4BAA4B,CAACO,qCAAqC,CACnE;EACD,OAAOD,KAAK;AACd","ignoreList":[]}
1
+ {"version":3,"names":["PermissionsAndroid","lib","videoLoggerSystem","AndroidForegroundServiceType","INSTALLATION_INSTRUCTION","getNotifeeLibThrowIfNotInstalledForPush","Error","getNotifeeLibNoThrowForKeepCallAlive","logger","getLogger","info","getKeepCallAliveForegroundServiceTypes","types","FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK","hasCameraPermission","check","PERMISSIONS","CAMERA","push","FOREGROUND_SERVICE_TYPE_CAMERA","hasMicrophonePermission","RECORD_AUDIO","FOREGROUND_SERVICE_TYPE_MICROPHONE","getIncomingCallForegroundServiceTypes","FOREGROUND_SERVICE_TYPE_SHORT_SERVICE"],"sourceRoot":"../../../../../../src","sources":["utils/push/libs/notifee/index.ts"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,cAAc;AACjD,SAASC,GAAG,QAAmB,OAAO;AACtC,SAASC,iBAAiB,QAAQ,yBAAyB;AAAC,IAIvDC,4BAA4B,0BAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;E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B,GAAG,MAAMpB,kBAAkB,CAACe,KAAK,CAC5Df,kBAAkB,CAACgB,WAAW,CAACK,YACjC,CAAC;EACD,IAAID,uBAAuB,EAAE;IAC3BR,KAAK,CAACM,IAAI,CAACf,4BAA4B,CAACmB,kCAAkC,CAAC;EAC7E;EACA,OAAOV,KAAK;AACd;AAEA,OAAO,SAASW,qCAAqCA,CAAA,EAAG;EACtD,MAAMX,KAAqC,GAAG,CAC5CT,4BAA4B,CAACqB,qCAAqC,CACnE;EACD,OAAOZ,KAAK;AACd","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ let voipPushNotification;
2
+ try {
3
+ voipPushNotification = require('react-native-voip-push-notification').default;
4
+ } catch {}
5
+ export function getVoipPushNotificationLib() {
6
+ if (!voipPushNotification) {
7
+ throw Error("react-native-voip-push-notification library is not installed. Please install it using 'yarn add react-native-voip-push-notification' or 'npm i react-native-voip-push-notification --save'");
8
+ }
9
+ return voipPushNotification;
10
+ }
11
+ //# sourceMappingURL=voipPushNotification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["voipPushNotification","require","default","getVoipPushNotificationLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/voipPushNotification.ts"],"mappings":"AAGA,IAAIA,oBAA0D;AAE9D,IAAI;EACFA,oBAAoB,GAAGC,OAAO,CAAC,qCAAqC,CAAC,CAACC,OAAO;AAC/E,CAAC,CAAC,MAAM,CAAC;AAET,OAAO,SAASC,0BAA0BA,CAAA,EAAG;EAC3C,IAAI,CAACH,oBAAoB,EAAE;IACzB,MAAMI,KAAK,CACT,4LACF,CAAC;EACH;EACA,OAAOJ,oBAAoB;AAC7B","ignoreList":[]}