@stream-io/video-react-native-sdk 1.28.1 → 1.29.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/android/src/main/AndroidManifest.xml +8 -1
  2. package/android/src/main/AndroidManifestNew.xml +11 -0
  3. package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNativeModule.kt +42 -5
  4. package/android/src/main/java/com/streamvideo/reactnative/keepalive/KeepAliveNotification.kt +83 -0
  5. package/android/src/main/java/com/streamvideo/reactnative/keepalive/StreamCallKeepAliveHeadlessService.kt +134 -0
  6. package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js +235 -0
  7. package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js.map +1 -0
  8. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js +18 -31
  9. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  10. package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js +60 -97
  11. package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  12. package/dist/commonjs/index.js +1 -0
  13. package/dist/commonjs/index.js.map +1 -1
  14. package/dist/commonjs/modules/call-manager/CallManager.js +20 -0
  15. package/dist/commonjs/modules/call-manager/CallManager.js.map +1 -1
  16. package/dist/commonjs/providers/StreamCall/index.js +6 -6
  17. package/dist/commonjs/providers/StreamCall/index.js.map +1 -1
  18. package/dist/commonjs/utils/StreamVideoRN/index.js +33 -21
  19. package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
  20. package/dist/commonjs/utils/internal/registerSDKGlobals.js +47 -3
  21. package/dist/commonjs/utils/internal/registerSDKGlobals.js.map +1 -1
  22. package/dist/commonjs/utils/keepCallAliveHeadlessTask.js +48 -0
  23. package/dist/commonjs/utils/keepCallAliveHeadlessTask.js.map +1 -0
  24. package/dist/commonjs/utils/push/android.js +145 -200
  25. package/dist/commonjs/utils/push/android.js.map +1 -1
  26. package/dist/commonjs/utils/push/internal/ios.js +16 -34
  27. package/dist/commonjs/utils/push/internal/ios.js.map +1 -1
  28. package/dist/commonjs/utils/push/internal/rxSubjects.js +1 -20
  29. package/dist/commonjs/utils/push/internal/rxSubjects.js.map +1 -1
  30. package/dist/commonjs/utils/push/internal/utils.js +17 -1
  31. package/dist/commonjs/utils/push/internal/utils.js.map +1 -1
  32. package/dist/commonjs/utils/push/ios.js.map +1 -1
  33. package/dist/commonjs/utils/push/libs/callingx.js +75 -0
  34. package/dist/commonjs/utils/push/libs/callingx.js.map +1 -0
  35. package/dist/commonjs/utils/push/libs/index.js +8 -19
  36. package/dist/commonjs/utils/push/libs/index.js.map +1 -1
  37. package/dist/commonjs/utils/push/libs/notifee/index.js +0 -19
  38. package/dist/commonjs/utils/push/libs/notifee/index.js.map +1 -1
  39. package/dist/commonjs/utils/push/setupCallingExpEvents.js +75 -0
  40. package/dist/commonjs/utils/push/setupCallingExpEvents.js.map +1 -0
  41. package/dist/commonjs/utils/push/setupIosVoipPushEvents.js +7 -6
  42. package/dist/commonjs/utils/push/setupIosVoipPushEvents.js.map +1 -1
  43. package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js +228 -0
  44. package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js.map +1 -0
  45. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +18 -31
  46. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  47. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +62 -99
  48. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  49. package/dist/module/index.js +1 -0
  50. package/dist/module/index.js.map +1 -1
  51. package/dist/module/modules/call-manager/CallManager.js +20 -0
  52. package/dist/module/modules/call-manager/CallManager.js.map +1 -1
  53. package/dist/module/providers/StreamCall/index.js +6 -6
  54. package/dist/module/providers/StreamCall/index.js.map +1 -1
  55. package/dist/module/utils/StreamVideoRN/index.js +33 -21
  56. package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
  57. package/dist/module/utils/internal/registerSDKGlobals.js +48 -4
  58. package/dist/module/utils/internal/registerSDKGlobals.js.map +1 -1
  59. package/dist/module/utils/keepCallAliveHeadlessTask.js +42 -0
  60. package/dist/module/utils/keepCallAliveHeadlessTask.js.map +1 -0
  61. package/dist/module/utils/push/android.js +147 -202
  62. package/dist/module/utils/push/android.js.map +1 -1
  63. package/dist/module/utils/push/internal/ios.js +16 -34
  64. package/dist/module/utils/push/internal/ios.js.map +1 -1
  65. package/dist/module/utils/push/internal/rxSubjects.js +0 -19
  66. package/dist/module/utils/push/internal/rxSubjects.js.map +1 -1
  67. package/dist/module/utils/push/internal/utils.js +14 -0
  68. package/dist/module/utils/push/internal/utils.js.map +1 -1
  69. package/dist/module/utils/push/ios.js.map +1 -1
  70. package/dist/module/utils/push/libs/callingx.js +67 -0
  71. package/dist/module/utils/push/libs/callingx.js.map +1 -0
  72. package/dist/module/utils/push/libs/index.js +1 -2
  73. package/dist/module/utils/push/libs/index.js.map +1 -1
  74. package/dist/module/utils/push/libs/notifee/index.js +0 -18
  75. package/dist/module/utils/push/libs/notifee/index.js.map +1 -1
  76. package/dist/module/utils/push/setupCallingExpEvents.js +69 -0
  77. package/dist/module/utils/push/setupCallingExpEvents.js.map +1 -0
  78. package/dist/module/utils/push/setupIosVoipPushEvents.js +7 -6
  79. package/dist/module/utils/push/setupIosVoipPushEvents.js.map +1 -1
  80. package/dist/typescript/hooks/push/useCallingExpWithCallingStateEffect.d.ts +5 -0
  81. package/dist/typescript/hooks/push/useCallingExpWithCallingStateEffect.d.ts.map +1 -0
  82. package/dist/typescript/hooks/push/useIosVoipPushEventsSetupEffect.d.ts.map +1 -1
  83. package/dist/typescript/hooks/useAndroidKeepCallAliveEffect.d.ts.map +1 -1
  84. package/dist/typescript/index.d.ts +1 -0
  85. package/dist/typescript/index.d.ts.map +1 -1
  86. package/dist/typescript/modules/call-manager/CallManager.d.ts.map +1 -1
  87. package/dist/typescript/utils/StreamVideoRN/index.d.ts +20 -2
  88. package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
  89. package/dist/typescript/utils/StreamVideoRN/types.d.ts +54 -29
  90. package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
  91. package/dist/typescript/utils/internal/registerSDKGlobals.d.ts.map +1 -1
  92. package/dist/typescript/utils/keepCallAliveHeadlessTask.d.ts +10 -0
  93. package/dist/typescript/utils/keepCallAliveHeadlessTask.d.ts.map +1 -0
  94. package/dist/typescript/utils/push/android.d.ts +1 -2
  95. package/dist/typescript/utils/push/android.d.ts.map +1 -1
  96. package/dist/typescript/utils/push/internal/ios.d.ts.map +1 -1
  97. package/dist/typescript/utils/push/internal/rxSubjects.d.ts +0 -12
  98. package/dist/typescript/utils/push/internal/rxSubjects.d.ts.map +1 -1
  99. package/dist/typescript/utils/push/internal/utils.d.ts +4 -0
  100. package/dist/typescript/utils/push/internal/utils.d.ts.map +1 -1
  101. package/dist/typescript/utils/push/ios.d.ts +1 -2
  102. package/dist/typescript/utils/push/ios.d.ts.map +1 -1
  103. package/dist/typescript/utils/push/libs/callingx.d.ts +9 -0
  104. package/dist/typescript/utils/push/libs/callingx.d.ts.map +1 -0
  105. package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts +16 -2
  106. package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
  107. package/dist/typescript/utils/push/libs/index.d.ts +1 -2
  108. package/dist/typescript/utils/push/libs/index.d.ts.map +1 -1
  109. package/dist/typescript/utils/push/libs/notifee/index.d.ts +0 -1
  110. package/dist/typescript/utils/push/libs/notifee/index.d.ts.map +1 -1
  111. package/dist/typescript/utils/push/setupCallingExpEvents.d.ts +8 -0
  112. package/dist/typescript/utils/push/setupCallingExpEvents.d.ts.map +1 -0
  113. package/dist/typescript/utils/push/setupIosVoipPushEvents.d.ts.map +1 -1
  114. package/expo-config-plugin/dist/withAndroidManifest.js +1 -33
  115. package/expo-config-plugin/dist/withAndroidPermissions.js +2 -7
  116. package/expo-config-plugin/dist/withAppDelegate.js +19 -197
  117. package/expo-config-plugin/dist/withMainActivity.js +1 -1
  118. package/expo-config-plugin/dist/withiOSInfoPlist.js +2 -3
  119. package/ios/StreamInCallManager.swift +4 -0
  120. package/ios/StreamVideoReactNative.h +7 -4
  121. package/ios/StreamVideoReactNative.m +191 -82
  122. package/package.json +10 -15
  123. package/src/hooks/push/useCallingExpWithCallingStateEffect.ts +361 -0
  124. package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +21 -34
  125. package/src/hooks/useAndroidKeepCallAliveEffect.ts +95 -120
  126. package/src/index.ts +1 -0
  127. package/src/modules/call-manager/CallManager.ts +30 -0
  128. package/src/providers/StreamCall/index.tsx +6 -6
  129. package/src/utils/StreamVideoRN/index.ts +40 -30
  130. package/src/utils/StreamVideoRN/types.ts +56 -29
  131. package/src/utils/internal/registerSDKGlobals.ts +42 -4
  132. package/src/utils/keepCallAliveHeadlessTask.ts +54 -0
  133. package/src/utils/push/android.ts +223 -308
  134. package/src/utils/push/internal/ios.ts +25 -46
  135. package/src/utils/push/internal/rxSubjects.ts +0 -29
  136. package/src/utils/push/internal/utils.ts +25 -0
  137. package/src/utils/push/ios.ts +1 -6
  138. package/src/utils/push/libs/callingx.ts +90 -0
  139. package/src/utils/push/libs/index.ts +1 -2
  140. package/src/utils/push/libs/notifee/index.ts +0 -27
  141. package/src/utils/push/setupCallingExpEvents.ts +100 -0
  142. package/src/utils/push/setupIosVoipPushEvents.ts +11 -7
  143. package/CHANGELOG.md +0 -3089
  144. package/android/src/main/java/com/streamvideo/reactnative/util/CallAliveServiceChecker.kt +0 -95
  145. package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js +0 -160
  146. package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +0 -1
  147. package/dist/commonjs/utils/push/libs/callkeep.js +0 -17
  148. package/dist/commonjs/utils/push/libs/callkeep.js.map +0 -1
  149. package/dist/commonjs/utils/push/libs/voipPushNotification.js +0 -17
  150. package/dist/commonjs/utils/push/libs/voipPushNotification.js.map +0 -1
  151. package/dist/commonjs/utils/push/setupIosCallKeepEvents.js +0 -205
  152. package/dist/commonjs/utils/push/setupIosCallKeepEvents.js.map +0 -1
  153. package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js +0 -153
  154. package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +0 -1
  155. package/dist/module/utils/push/libs/callkeep.js +0 -11
  156. package/dist/module/utils/push/libs/callkeep.js.map +0 -1
  157. package/dist/module/utils/push/libs/voipPushNotification.js +0 -11
  158. package/dist/module/utils/push/libs/voipPushNotification.js.map +0 -1
  159. package/dist/module/utils/push/setupIosCallKeepEvents.js +0 -199
  160. package/dist/module/utils/push/setupIosCallKeepEvents.js.map +0 -1
  161. package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts +0 -5
  162. package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts.map +0 -1
  163. package/dist/typescript/utils/push/libs/callkeep.d.ts +0 -3
  164. package/dist/typescript/utils/push/libs/callkeep.d.ts.map +0 -1
  165. package/dist/typescript/utils/push/libs/voipPushNotification.d.ts +0 -3
  166. package/dist/typescript/utils/push/libs/voipPushNotification.d.ts.map +0 -1
  167. package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts +0 -6
  168. package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts.map +0 -1
  169. package/src/hooks/push/useIosCallkeepWithCallingStateEffect.ts +0 -235
  170. package/src/utils/push/libs/callkeep.ts +0 -16
  171. package/src/utils/push/libs/voipPushNotification.ts +0 -17
  172. package/src/utils/push/setupIosCallKeepEvents.ts +0 -252
@@ -1,153 +0,0 @@
1
- import { CallingState, RxUtils, videoLoggerSystem } from '@stream-io/video-client';
2
- import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
3
- import { NativeModules, Platform } from 'react-native';
4
- import { useEffect, useState } from 'react';
5
- import { StreamVideoRN } from '../../utils';
6
- import { getCallKeepLib } from '../../utils/push/libs';
7
- import { voipCallkeepAcceptedCallOnNativeDialerMap$, voipCallkeepCallOnForegroundMap$, voipPushNotificationCallCId$ } from '../../utils/push/internal/rxSubjects';
8
- const isNonActiveCallingState = callingState => {
9
- return callingState === CallingState.IDLE || callingState === CallingState.UNKNOWN || callingState === CallingState.LEFT;
10
- };
11
- const isAcceptedCallingState = callingState => {
12
- return callingState === CallingState.JOINING || callingState === CallingState.JOINED;
13
- };
14
- const unsubscribeCallkeepEvents = async activeCallCid => {
15
- const voipPushNotificationCallCId = RxUtils.getCurrentValue(voipPushNotificationCallCId$);
16
- if (activeCallCid && activeCallCid === voipPushNotificationCallCId) {
17
- // callkeep events should not be listened anymore so clear the call cid
18
- voipPushNotificationCallCId$.next(undefined);
19
- }
20
- return await NativeModules.StreamVideoReactNative?.removeIncomingCall(activeCallCid);
21
- };
22
- const logger = videoLoggerSystem.getLogger('useIosCallkeepWithCallingStateEffect');
23
- const log = message => {
24
- logger.warn(message);
25
- };
26
-
27
- /**
28
- * This hook is used to inform the callkeep library that the call has been joined or ended.
29
- */
30
- export const useIosCallkeepWithCallingStateEffect = () => {
31
- const activeCall = useCall();
32
- const {
33
- useCallCallingState
34
- } = useCallStateHooks();
35
- const callingState = useCallCallingState();
36
- const [acceptedForegroundCallkeepMap, setAcceptedForegroundCallkeepMap] = useState();
37
- useEffect(() => {
38
- return () => {
39
- const pushConfig = StreamVideoRN.getConfig().push;
40
- if (Platform.OS !== 'ios' || !pushConfig || !pushConfig.ios?.pushProviderName) {
41
- return;
42
- }
43
- if (!pushConfig.android.incomingCallChannel) {
44
- // TODO: remove this check and find a better way once we have telecom integration for android
45
- return;
46
- }
47
- const callkeep = getCallKeepLib();
48
- // if the component is unmounted and the callID was not reported to callkeep, then report it now
49
- if (acceptedForegroundCallkeepMap) {
50
- log(`Ending call in callkeep: ${acceptedForegroundCallkeepMap.cid}, reason: component unmounted and call was present in acceptedForegroundCallkeepMap`);
51
- unsubscribeCallkeepEvents(acceptedForegroundCallkeepMap.cid).then(() => callkeep.endCall(acceptedForegroundCallkeepMap.uuid));
52
- }
53
- };
54
- }, [acceptedForegroundCallkeepMap]);
55
- const activeCallCid = activeCall?.cid;
56
- useEffect(() => {
57
- return () => {
58
- const pushConfig = StreamVideoRN.getConfig().push;
59
- if (Platform.OS !== 'ios' || !pushConfig || !pushConfig.ios?.pushProviderName || !activeCallCid) {
60
- return;
61
- }
62
- if (!pushConfig.android.incomingCallChannel) {
63
- // TODO: remove this check and find a better way once we have telecom integration for android
64
- return;
65
- }
66
- const nativeDialerAcceptedCallMap = RxUtils.getCurrentValue(voipCallkeepAcceptedCallOnNativeDialerMap$);
67
- const foregroundIncomingCallkeepMap = RxUtils.getCurrentValue(voipCallkeepCallOnForegroundMap$);
68
- const callkeep = getCallKeepLib();
69
- if (activeCallCid === nativeDialerAcceptedCallMap?.cid) {
70
- log(`Ending call in callkeep: ${activeCallCid}, reason: activeCallCid changed or was removed and call was present in nativeDialerAcceptedCallMap`);
71
- unsubscribeCallkeepEvents(activeCallCid).then(() => callkeep.endCall(nativeDialerAcceptedCallMap.uuid));
72
- // no need to keep this reference anymore
73
- voipCallkeepAcceptedCallOnNativeDialerMap$.next(undefined);
74
- } else if (activeCallCid === foregroundIncomingCallkeepMap?.cid) {
75
- log(`Ending call in callkeep: ${activeCallCid}, reason: activeCallCid changed or was removed and call was present in foregroundIncomingCallkeepMap`);
76
- unsubscribeCallkeepEvents(activeCallCid).then(() => callkeep.endCall(foregroundIncomingCallkeepMap.uuid));
77
- }
78
- };
79
- }, [activeCallCid]);
80
- const pushConfig = StreamVideoRN.getConfig().push;
81
- if (Platform.OS !== 'ios' || !pushConfig || !pushConfig.ios.pushProviderName || !activeCallCid) {
82
- return;
83
- }
84
- if (!pushConfig.android.incomingCallChannel) {
85
- // TODO: remove this check and find a better way once we have telecom integration for android
86
- return;
87
- }
88
-
89
- /**
90
- * Check if current call is still needed to be accepted in callkeep
91
- */
92
- if (isAcceptedCallingState(callingState) && acceptedForegroundCallkeepMap?.cid !== activeCallCid) {
93
- const callkeep = getCallKeepLib();
94
- // push notification was displayed
95
- // but the call has been accepted through the app and not through the native dialer
96
- const foregroundCallkeepMap = RxUtils.getCurrentValue(voipCallkeepCallOnForegroundMap$);
97
- if (foregroundCallkeepMap && foregroundCallkeepMap.cid === activeCallCid) {
98
- log(
99
- // @ts-expect-error - types issue
100
- `Accepting call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in foregroundCallkeepMap`);
101
- // no need to keep this reference anymore
102
- voipCallkeepCallOnForegroundMap$.next(undefined);
103
- NativeModules.StreamVideoReactNative?.removeIncomingCall(activeCallCid).then(() => callkeep.answerIncomingCall(foregroundCallkeepMap.uuid));
104
- // this call should be accepted in callkeep
105
- setAcceptedForegroundCallkeepMap(foregroundCallkeepMap);
106
- }
107
- }
108
-
109
- /**
110
- * Check if current call is still needed to be ended in callkeep
111
- */
112
- if (isNonActiveCallingState(callingState)) {
113
- const callkeep = getCallKeepLib();
114
-
115
- // this was a previously joined call which had push notification displayed
116
- // the call was accepted through the app and not through native dialer
117
- // the call was left using the leave button in the app and not through native dialer
118
- if (activeCallCid === acceptedForegroundCallkeepMap?.cid) {
119
- log(
120
- // @ts-expect-error - types issue
121
- `Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in acceptedForegroundCallkeepMap`);
122
- unsubscribeCallkeepEvents(activeCallCid).then(() => callkeep.endCall(acceptedForegroundCallkeepMap.uuid));
123
- setAcceptedForegroundCallkeepMap(undefined);
124
- return;
125
- }
126
- // this was a call which had push notification displayed but never joined
127
- // the user rejected in the app and not from native dialer
128
- const foregroundIncomingCallkeepMap = RxUtils.getCurrentValue(voipCallkeepCallOnForegroundMap$);
129
- if (activeCallCid === foregroundIncomingCallkeepMap?.cid) {
130
- log(
131
- // @ts-expect-error - types issue
132
- `Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in foregroundIncomingCallkeepMap`);
133
- unsubscribeCallkeepEvents(activeCallCid).then(() => callkeep.endCall(foregroundIncomingCallkeepMap.uuid));
134
- // no need to keep this reference anymore
135
- voipCallkeepCallOnForegroundMap$.next(undefined);
136
- return;
137
- }
138
- // this was a previously joined call
139
- // it was an accepted call from native dialer and not from the app
140
- // the user left using the leave button in the app
141
- const nativeDialerAcceptedCallMap = RxUtils.getCurrentValue(voipCallkeepAcceptedCallOnNativeDialerMap$);
142
- if (activeCallCid === nativeDialerAcceptedCallMap?.cid) {
143
- log(
144
- // @ts-expect-error - types issue
145
- `Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in nativeDialerAcceptedCallMap`);
146
- unsubscribeCallkeepEvents(activeCallCid).then(() => callkeep.endCall(nativeDialerAcceptedCallMap.uuid));
147
- // no need to keep this reference anymore
148
- voipCallkeepAcceptedCallOnNativeDialerMap$.next(undefined);
149
- return;
150
- }
151
- }
152
- };
153
- //# sourceMappingURL=useIosCallkeepWithCallingStateEffect.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CallingState","RxUtils","videoLoggerSystem","useCall","useCallStateHooks","NativeModules","Platform","useEffect","useState","StreamVideoRN","getCallKeepLib","voipCallkeepAcceptedCallOnNativeDialerMap$","voipCallkeepCallOnForegroundMap$","voipPushNotificationCallCId$","isNonActiveCallingState","callingState","IDLE","UNKNOWN","LEFT","isAcceptedCallingState","JOINING","JOINED","unsubscribeCallkeepEvents","activeCallCid","voipPushNotificationCallCId","getCurrentValue","next","undefined","StreamVideoReactNative","removeIncomingCall","logger","getLogger","log","message","warn","useIosCallkeepWithCallingStateEffect","activeCall","useCallCallingState","acceptedForegroundCallkeepMap","setAcceptedForegroundCallkeepMap","pushConfig","getConfig","push","OS","ios","pushProviderName","android","incomingCallChannel","callkeep","cid","then","endCall","uuid","nativeDialerAcceptedCallMap","foregroundIncomingCallkeepMap","foregroundCallkeepMap","answerIncomingCall"],"sourceRoot":"../../../../src","sources":["hooks/push/useIosCallkeepWithCallingStateEffect.ts"],"mappings":"AAAA,SACEA,YAAY,EACZC,OAAO,EACPC,iBAAiB,QACZ,yBAAyB;AAChC,SAASC,OAAO,EAAEC,iBAAiB,QAAQ,iCAAiC;AAC5E,SAASC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AACtD,SAASC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,aAAa,QAAQ,aAAa;AAC3C,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SACEC,0CAA0C,EAC1CC,gCAAgC,EAChCC,4BAA4B,QACvB,sCAAsC;AAE7C,MAAMC,uBAAuB,GAAIC,YAA0B,IAAK;EAC9D,OACEA,YAAY,KAAKf,YAAY,CAACgB,IAAI,IAClCD,YAAY,KAAKf,YAAY,CAACiB,OAAO,IACrCF,YAAY,KAAKf,YAAY,CAACkB,IAAI;AAEtC,CAAC;AAED,MAAMC,sBAAsB,GAAIJ,YAA0B,IAAK;EAC7D,OACEA,YAAY,KAAKf,YAAY,CAACoB,OAAO,IACrCL,YAAY,KAAKf,YAAY,CAACqB,MAAM;AAExC,CAAC;AAED,MAAMC,yBAAyB,GAAG,MAAOC,aAAiC,IAAK;EAC7E,MAAMC,2BAA2B,GAAGvB,OAAO,CAACwB,eAAe,CACzDZ,4BACF,CAAC;EACD,IAAIU,aAAa,IAAIA,aAAa,KAAKC,2BAA2B,EAAE;IAClE;IACAX,4BAA4B,CAACa,IAAI,CAACC,SAAS,CAAC;EAC9C;EACA,OAAO,MAAMtB,aAAa,CAACuB,sBAAsB,EAAEC,kBAAkB,CACnEN,aACF,CAAC;AACH,CAAC;AAED,MAAMO,MAAM,GAAG5B,iBAAiB,CAAC6B,SAAS,CACxC,sCACF,CAAC;AACD,MAAMC,GAAG,GAAIC,OAAe,IAAK;EAC/BH,MAAM,CAACI,IAAI,CAACD,OAAO,CAAC;AACtB,CAAC;;AA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,IAAI,CAAC,MAC5CF,QAAQ,CAACG,OAAO,CAACG,6BAA6B,CAACF,IAAI,CACrD,CAAC;MACD;MACAxC,gCAAgC,CAACc,IAAI,CAACC,SAAS,CAAC;MAChD;IACF;IACA;IACA;IACA;IACA,MAAM0B,2BAA2B,GAAGpD,OAAO,CAACwB,eAAe,CACzDd,0CACF,CAAC;IACD,IAAIY,aAAa,KAAK8B,2BAA2B,EAAEJ,GAAG,EAAE;MACtDjB,GAAG;MACD;MACA,4BAA4BT,aAAa,kCAAkCvB,YAAY,CAACe,YAAY,CAAC,sDACvG,CAAC;MACDO,yBAAyB,CAACC,aAAa,CAAC,CAAC2B,IAAI,CAAC,MAC5CF,QAAQ,CAACG,OAAO,CAACE,2BAA2B,CAACD,IAAI,CACnD,CAAC;MACD;MACAzC,0CAA0C,CAACe,IAAI,CAACC,SAAS,CAAC;MAC1D;IACF;EACF;AACF,CAAC","ignoreList":[]}
@@ -1,11 +0,0 @@
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
@@ -1 +0,0 @@
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,11 +0,0 @@
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
@@ -1 +0,0 @@
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":[]}
@@ -1,199 +0,0 @@
1
- import { pushAcceptedIncomingCallCId$, voipCallkeepAcceptedCallOnNativeDialerMap$, voipCallkeepCallOnForegroundMap$, voipPushNotificationCallCId$ } from './internal/rxSubjects';
2
- import { RxUtils, videoLoggerSystem } from '@stream-io/video-client';
3
- import { getCallKeepLib, getVoipPushNotificationLib } from './libs';
4
- import { clearPushWSEventSubscriptions, processCallFromPushInBackground } from './internal/utils';
5
- import { AppState, NativeModules, Platform } from 'react-native';
6
- import { RTCAudioSession } from '@stream-io/react-native-webrtc';
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
- if (!pushConfig.android.incomingCallChannel) {
16
- // TODO: remove this check and find a better way once we have telecom integration for android
17
- videoLoggerSystem.getLogger('setupIosCallKeepEvents').debug('android incomingCallChannel is not defined, so skipping the setupIosCallKeepEvents');
18
- return;
19
- }
20
- const logger = videoLoggerSystem.getLogger('setupIosCallKeepEvents');
21
- const callkeep = getCallKeepLib();
22
- async function getCallCid(callUUID) {
23
- try {
24
- const call_cid = await NativeModules.StreamVideoReactNative.getIncomingCallCid(callUUID);
25
- // in a case that voipPushNotificationCallCId$ is empty (this should not happen as voipPushNotificationCallCId$ is updated in push reception)]
26
- // update it with this call_cid
27
- const voipPushNotificationCallCId = RxUtils.getCurrentValue(voipPushNotificationCallCId$);
28
- if (!voipPushNotificationCallCId) {
29
- logger.debug(`voipPushNotificationCallCId$ is empty, updating it with the call_cid: ${call_cid} for callUUID: ${callUUID}`);
30
- voipPushNotificationCallCId$.next(call_cid);
31
- }
32
- return call_cid;
33
- } catch {
34
- logger.debug(`Error in getting call cid from native module for callUUID: ${callUUID} - probably the call was already processed, so ignoring this callkeep event`);
35
- }
36
- return undefined;
37
- }
38
- function answerCall(callUUID) {
39
- getCallCid(callUUID).then(call_cid => {
40
- logger.debug(`answerCall event with call_cid: ${call_cid}`);
41
- iosCallkeepAcceptCall(call_cid, callUUID);
42
- });
43
- }
44
- function endCall(callUUID) {
45
- getCallCid(callUUID).then(call_cid => {
46
- logger.debug(`endCall event with call_cid: ${call_cid}`);
47
- iosCallkeepRejectCall(call_cid, callUUID, pushConfig);
48
- });
49
- }
50
-
51
- /**
52
- * CallKeep / CallKit audio-session events -> WebRTC (iOS)
53
- *
54
- * iOS CallKit is the authority that *activates* and *deactivates* the underlying `AVAudioSession`
55
- * when a call is answered/ended from the system UI (lock screen, Call UI, Bluetooth, etc).
56
- *
57
- * WebRTC on iOS wraps `AVAudioSession` with `RTCAudioSession` and its AudioDeviceModule relies on
58
- * being notified of those lifecycle transitions to correctly start/stop audio I/O and keep its
59
- * internal activation state consistent (e.g. activation count, playout/recording start).
60
- *
61
- * If these callbacks don’t reach WebRTC, answering via the native dialer UI can result in:
62
- * - no microphone capture / one-way audio
63
- * - silent playout until the app forces an audio reconfiguration
64
- * - flaky audio routing (speaker/earpiece/Bluetooth) across subsequent calls
65
- *
66
- * We forward CallKeep’s `didActivateAudioSession` / `didDeactivateAudioSession` events to WebRTC’s
67
- * `RTCAudioSession.audioSessionDidActivate()` / `audioSessionDidDeactivate()` methods.
68
- */
69
- function didActivateAudioSession() {
70
- logger.debug('didActivateAudioSession');
71
- RTCAudioSession.audioSessionDidActivate();
72
- }
73
- function didDeactivateAudioSession() {
74
- logger.debug('didDeactivateAudioSession');
75
- RTCAudioSession.audioSessionDidDeactivate();
76
- }
77
- function didDisplayIncomingCall(callUUID, payload) {
78
- const voipPushNotification = getVoipPushNotificationLib();
79
- // @ts-expect-error - call_cid is not part of RNCallKeepEventPayload
80
- const call_cid = payload?.call_cid;
81
- logger.debug(`didDisplayIncomingCall event with callUUID: ${callUUID} call_cid: ${call_cid}`);
82
- if (call_cid) {
83
- if (AppState.currentState === 'background') {
84
- processCallFromPushInBackground(pushConfig, call_cid, 'backgroundDelivered');
85
- }
86
- voipCallkeepCallOnForegroundMap$.next({
87
- uuid: callUUID,
88
- cid: call_cid
89
- });
90
- }
91
- voipPushNotification.onVoipNotificationCompleted(callUUID);
92
- }
93
- const {
94
- remove: removeAnswerCall
95
- } = callkeep.addEventListener('answerCall', ({
96
- callUUID
97
- }) => {
98
- answerCall(callUUID);
99
- });
100
- const {
101
- remove: removeEndCall
102
- } = callkeep.addEventListener('endCall', ({
103
- callUUID
104
- }) => {
105
- endCall(callUUID);
106
- });
107
- const {
108
- remove: removeDisplayIncomingCall
109
- } = callkeep.addEventListener('didDisplayIncomingCall', ({
110
- callUUID,
111
- payload
112
- }) => {
113
- didDisplayIncomingCall(callUUID, payload);
114
- });
115
- const {
116
- remove: removeDidActivateAudioSession
117
- } = callkeep.addEventListener('didActivateAudioSession', () => {
118
- didActivateAudioSession();
119
- });
120
- const {
121
- remove: removeDidDeactivateAudioSession
122
- } = callkeep.addEventListener('didDeactivateAudioSession', () => {
123
- didDeactivateAudioSession();
124
- });
125
- const {
126
- remove: removeDidLoadWithEvents
127
- } = callkeep.addEventListener('didLoadWithEvents', events => {
128
- if (!events || !Array.isArray(events) || events.length < 1) {
129
- return;
130
- }
131
- events.forEach(event => {
132
- const {
133
- name,
134
- data
135
- } = event;
136
- if (name === 'RNCallKeepDidDisplayIncomingCall') {
137
- didDisplayIncomingCall(data.callUUID, data.payload);
138
- } else if (name === 'RNCallKeepPerformAnswerCallAction') {
139
- answerCall(data.callUUID);
140
- } else if (name === 'RNCallKeepPerformEndCallAction') {
141
- endCall(data.callUUID);
142
- } else if (name === 'RNCallKeepDidActivateAudioSession') {
143
- didActivateAudioSession();
144
- } else if (name === 'RNCallKeepDidDeactivateAudioSession') {
145
- didDeactivateAudioSession();
146
- }
147
- });
148
- });
149
- setPushLogoutCallback(async () => {
150
- removeAnswerCall();
151
- removeEndCall();
152
- removeDisplayIncomingCall();
153
- removeDidActivateAudioSession();
154
- removeDidDeactivateAudioSession();
155
- removeDidLoadWithEvents();
156
- });
157
- }
158
- const iosCallkeepAcceptCall = (call_cid, callUUIDFromCallkeep) => {
159
- if (!shouldProcessCallFromCallkeep(call_cid, callUUIDFromCallkeep)) {
160
- return;
161
- }
162
- clearPushWSEventSubscriptions(call_cid);
163
- // to call end callkeep later if ended in app and not through callkeep
164
- voipCallkeepAcceptedCallOnNativeDialerMap$.next({
165
- uuid: callUUIDFromCallkeep,
166
- cid: call_cid
167
- });
168
- // to process the call in the app
169
- pushAcceptedIncomingCallCId$.next(call_cid);
170
- // no need to keep these references anymore
171
- voipCallkeepCallOnForegroundMap$.next(undefined);
172
- };
173
- const iosCallkeepRejectCall = async (call_cid, callUUIDFromCallkeep, pushConfig) => {
174
- if (!shouldProcessCallFromCallkeep(call_cid, callUUIDFromCallkeep)) {
175
- return;
176
- }
177
- clearPushWSEventSubscriptions(call_cid);
178
- // remove the references if the call_cid matches
179
- const voipPushNotificationCallCId = RxUtils.getCurrentValue(voipPushNotificationCallCId$);
180
- if (voipPushNotificationCallCId === call_cid) {
181
- voipCallkeepAcceptedCallOnNativeDialerMap$.next(undefined);
182
- voipCallkeepCallOnForegroundMap$.next(undefined);
183
- voipPushNotificationCallCId$.next(undefined);
184
- }
185
- await processCallFromPushInBackground(pushConfig, call_cid, 'decline');
186
- await NativeModules.StreamVideoReactNative?.removeIncomingCall(call_cid);
187
- };
188
-
189
- /**
190
- * Helper function to determine if the answer/end call event from callkeep must be processed
191
- * Just checks if we have a valid call_cid and acts as a type guard for call_cid
192
- */
193
- const shouldProcessCallFromCallkeep = (call_cid, callUUIDFromCallkeep) => {
194
- if (!call_cid || !callUUIDFromCallkeep) {
195
- return false;
196
- }
197
- return true;
198
- };
199
- //# sourceMappingURL=setupIosCallKeepEvents.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["pushAcceptedIncomingCallCId$","voipCallkeepAcceptedCallOnNativeDialerMap$","voipCallkeepCallOnForegroundMap$","voipPushNotificationCallCId$","RxUtils","videoLoggerSystem","getCallKeepLib","getVoipPushNotificationLib","clearPushWSEventSubscriptions","processCallFromPushInBackground","AppState","NativeModules","Platform","RTCAudioSession","setPushLogoutCallback","setupIosCallKeepEvents","pushConfig","OS","ios","pushProviderName","android","incomingCallChannel","getLogger","debug","logger","callkeep","getCallCid","callUUID","call_cid","StreamVideoReactNative","getIncomingCallCid","voipPushNotificationCallCId","getCurrentValue","next","undefined","answerCall","then","iosCallkeepAcceptCall","endCall","iosCallkeepRejectCall","didActivateAudioSession","audioSessionDidActivate","didDeactivateAudioSession","audioSessionDidDeactivate","didDisplayIncomingCall","payload","voipPushNotification","currentState","uuid","cid","onVoipNotificationCompleted","remove","removeAnswerCall","addEventListener","removeEndCall","removeDisplayIncomingCall","removeDidActivateAudioSession","removeDidDeactivateAudioSession","removeDidLoadWithEvents","events","Array","isArray","length","forEach","event","name","data","callUUIDFromCallkeep","shouldProcessCallFromCallkeep","removeIncomingCall"],"sourceRoot":"../../../../src","sources":["utils/push/setupIosCallKe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IAAI,EAAEmB,oBAAoB;IAC1BlB,GAAG,EAAErB;EACP,CAAC,CAAC;EACF;EACA5B,4BAA4B,CAACiC,IAAI,CAACL,QAAQ,CAAC;EAC3C;EACA1B,gCAAgC,CAAC+B,IAAI,CAACC,SAAS,CAAC;AAClD,CAAC;AAED,MAAMK,qBAAqB,GAAG,MAAAA,CAC5BX,QAA4B,EAC5BuC,oBAA4B,EAC5BnD,UAAsB,KACnB;EACH,IAAI,CAACoD,6BAA6B,CAACxC,QAAQ,EAAEuC,oBAAoB,CAAC,EAAE;IAClE;EACF;EACA3D,6BAA6B,CAACoB,QAAQ,CAAC;EACvC;EACA,MAAMG,2BAA2B,GAAG3B,OAAO,CAAC4B,eAAe,CACzD7B,4BACF,CAAC;EACD,IAAI4B,2BAA2B,KAAKH,QAAQ,EAAE;IAC5C3B,0CAA0C,CAACgC,IAAI,CAACC,SAAS,CAAC;IAC1DhC,gCAAgC,CAAC+B,IAAI,CAACC,SAAS,CAAC;IAChD/B,4BAA4B,CAAC8B,IAAI,CAACC,SAAS,CAAC;EAC9C;EAEA,MAAMzB,+BAA+B,CAACO,UAAU,EAAEY,QAAQ,EAAE,SAAS,CAAC;EACtE,MAAMjB,aAAa,CAACkB,sBAAsB,EAAEwC,kBAAkB,CAACzC,QAAQ,CAAC;AAC1E,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMwC,6BAA6B,GAAGA,CACpCxC,QAA4B,EAC5BuC,oBAA4B,KACL;EACvB,IAAI,CAACvC,QAAQ,IAAI,CAACuC,oBAAoB,EAAE;IACtC,OAAO,KAAK;EACd;EACA,OAAO,IAAI;AACb,CAAC","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- /**
2
- * This hook is used to inform the callkeep library that the call has been joined or ended.
3
- */
4
- export declare const useIosCallkeepWithCallingStateEffect: () => void;
5
- //# sourceMappingURL=useIosCallkeepWithCallingStateEffect.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useIosCallkeepWithCallingStateEffect.d.ts","sourceRoot":"","sources":["../../../../src/hooks/push/useIosCallkeepWithCallingStateEffect.ts"],"names":[],"mappings":"AAmDA;;GAEG;AACH,eAAO,MAAM,oCAAoC,YAoLhD,CAAC"}
@@ -1,3 +0,0 @@
1
- export type RNCallKeepType = typeof import('react-native-callkeep').default;
2
- export declare function getCallKeepLib(): typeof import("react-native-callkeep").default;
3
- //# sourceMappingURL=callkeep.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"callkeep.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/callkeep.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,cAAc,uBAAuB,EAAE,OAAO,CAAC;AAQ5E,wBAAgB,cAAc,mDAO7B"}
@@ -1,3 +0,0 @@
1
- export type VoipPushNotificationType = typeof import('react-native-voip-push-notification').default;
2
- export declare function getVoipPushNotificationLib(): typeof import("react-native-voip-push-notification").default;
3
- //# sourceMappingURL=voipPushNotification.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"voipPushNotification.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/voipPushNotification.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAClC,cAAc,qCAAqC,EAAE,OAAO,CAAC;AAQ/D,wBAAgB,0BAA0B,iEAOzC"}
@@ -1,6 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"setupIosCallKeepEvents.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/setupIosCallKeepEvents.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAWhE;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,QA4KnD"}