@stream-io/video-react-native-sdk 1.22.3 → 1.24.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 (251) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/android/src/main/java/com/streamvideo/reactnative/callmanager/ProximityManager.kt +183 -0
  3. package/android/src/main/java/com/streamvideo/reactnative/callmanager/StreamInCallManagerModule.kt +12 -1
  4. package/dist/commonjs/components/Call/CallContent/CallContent.js +2 -2
  5. package/dist/commonjs/components/Call/CallContent/CallContent.js.map +1 -1
  6. package/dist/commonjs/components/Call/CallContent/RTCViewPipIOS.js +2 -2
  7. package/dist/commonjs/components/Call/CallContent/RTCViewPipIOS.js.map +1 -1
  8. package/dist/commonjs/components/Call/CallContent/RTCViewPipNative.js +3 -3
  9. package/dist/commonjs/components/Call/CallContent/RTCViewPipNative.js.map +1 -1
  10. package/dist/commonjs/components/Call/CallControls/AcceptCallButton.js +3 -3
  11. package/dist/commonjs/components/Call/CallControls/AcceptCallButton.js.map +1 -1
  12. package/dist/commonjs/components/Call/CallControls/HangupCallButton.js +3 -3
  13. package/dist/commonjs/components/Call/CallControls/HangupCallButton.js.map +1 -1
  14. package/dist/commonjs/components/Call/CallControls/RejectCallButton.js +2 -2
  15. package/dist/commonjs/components/Call/CallControls/RejectCallButton.js.map +1 -1
  16. package/dist/commonjs/components/Call/CallControls/internal/ReactionsPicker.js +2 -2
  17. package/dist/commonjs/components/Call/CallControls/internal/ReactionsPicker.js.map +1 -1
  18. package/dist/commonjs/components/Call/Lobby/JoinCallButton.js +2 -2
  19. package/dist/commonjs/components/Call/Lobby/JoinCallButton.js.map +1 -1
  20. package/dist/commonjs/components/Livestream/LivestreamControls/HostStartStreamButton.js +4 -4
  21. package/dist/commonjs/components/Livestream/LivestreamControls/HostStartStreamButton.js.map +1 -1
  22. package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js +2 -2
  23. package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js.map +1 -1
  24. package/dist/commonjs/components/Livestream/LivestreamPlayer/LivestreamPlayer.js +4 -4
  25. package/dist/commonjs/components/Livestream/LivestreamPlayer/LivestreamPlayer.js.map +1 -1
  26. package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLobby.js +2 -2
  27. package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLobby.js.map +1 -1
  28. package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js +2 -2
  29. package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js.map +1 -1
  30. package/dist/commonjs/components/Participant/FloatingParticipantView/index.js +13 -6
  31. package/dist/commonjs/components/Participant/FloatingParticipantView/index.js.map +1 -1
  32. package/dist/commonjs/components/Participant/FloatingParticipantView/useFloatingVideoDimensions.js +30 -0
  33. package/dist/commonjs/components/Participant/FloatingParticipantView/useFloatingVideoDimensions.js.map +1 -0
  34. package/dist/commonjs/constants/index.js +1 -6
  35. package/dist/commonjs/constants/index.js.map +1 -1
  36. package/dist/commonjs/contexts/internal/ScreenshotIosContext.js +3 -3
  37. package/dist/commonjs/contexts/internal/ScreenshotIosContext.js.map +1 -1
  38. package/dist/commonjs/hooks/push/useInitAndroidTokenAndRest.js +1 -1
  39. package/dist/commonjs/hooks/push/useInitAndroidTokenAndRest.js.map +1 -1
  40. package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js +2 -2
  41. package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -1
  42. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js +13 -13
  43. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  44. package/dist/commonjs/hooks/push/useProcessPushCallEffect.js +2 -2
  45. package/dist/commonjs/hooks/push/useProcessPushCallEffect.js.map +1 -1
  46. package/dist/commonjs/hooks/push/useProcessPushNonRingingCallEffect.js +1 -1
  47. package/dist/commonjs/hooks/push/useProcessPushNonRingingCallEffect.js.map +1 -1
  48. package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js +10 -10
  49. package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  50. package/dist/commonjs/hooks/usePermissionRequest.js +2 -2
  51. package/dist/commonjs/hooks/usePermissionRequest.js.map +1 -1
  52. package/dist/commonjs/hooks/useScreenShareButton.js +4 -4
  53. package/dist/commonjs/hooks/useScreenShareButton.js.map +1 -1
  54. package/dist/commonjs/hooks/useScreenshot.js +2 -2
  55. package/dist/commonjs/hooks/useScreenshot.js.map +1 -1
  56. package/dist/commonjs/hooks/useTrackDimensions.js +1 -1
  57. package/dist/commonjs/hooks/useTrackDimensions.js.map +1 -1
  58. package/dist/commonjs/modules/call-manager/PrevLibDetection.js +1 -1
  59. package/dist/commonjs/modules/call-manager/PrevLibDetection.js.map +1 -1
  60. package/dist/commonjs/providers/BusyTonePlayer.js +6 -6
  61. package/dist/commonjs/providers/BusyTonePlayer.js.map +1 -1
  62. package/dist/commonjs/providers/NoiseCancellation/NoiseCancellationProvider.js +2 -2
  63. package/dist/commonjs/providers/NoiseCancellation/NoiseCancellationProvider.js.map +1 -1
  64. package/dist/commonjs/providers/StreamCall/AppStateListener.js +7 -7
  65. package/dist/commonjs/providers/StreamCall/AppStateListener.js.map +1 -1
  66. package/dist/commonjs/utils/getAndroidDefaultRingtoneUrl.js +3 -3
  67. package/dist/commonjs/utils/getAndroidDefaultRingtoneUrl.js.map +1 -1
  68. package/dist/commonjs/utils/push/android.js +30 -30
  69. package/dist/commonjs/utils/push/android.js.map +1 -1
  70. package/dist/commonjs/utils/push/internal/ios.js +9 -9
  71. package/dist/commonjs/utils/push/internal/ios.js.map +1 -1
  72. package/dist/commonjs/utils/push/internal/utils.js +11 -11
  73. package/dist/commonjs/utils/push/internal/utils.js.map +1 -1
  74. package/dist/commonjs/utils/push/ios.js +21 -21
  75. package/dist/commonjs/utils/push/ios.js.map +1 -1
  76. package/dist/commonjs/utils/push/libs/expoNotifications.js +1 -1
  77. package/dist/commonjs/utils/push/libs/expoNotifications.js.map +1 -1
  78. package/dist/commonjs/utils/push/libs/firebaseMessaging/index.js +3 -3
  79. package/dist/commonjs/utils/push/libs/firebaseMessaging/index.js.map +1 -1
  80. package/dist/commonjs/utils/push/libs/notifee/index.js +3 -3
  81. package/dist/commonjs/utils/push/libs/notifee/index.js.map +1 -1
  82. package/dist/commonjs/utils/push/setupIosCallKeepEvents.js +7 -7
  83. package/dist/commonjs/utils/push/setupIosCallKeepEvents.js.map +1 -1
  84. package/dist/commonjs/utils/push/setupIosVoipPushEvents.js +4 -4
  85. package/dist/commonjs/utils/push/setupIosVoipPushEvents.js.map +1 -1
  86. package/dist/commonjs/version.js +1 -1
  87. package/dist/module/components/Call/CallContent/CallContent.js +3 -3
  88. package/dist/module/components/Call/CallContent/CallContent.js.map +1 -1
  89. package/dist/module/components/Call/CallContent/RTCViewPipIOS.js +3 -3
  90. package/dist/module/components/Call/CallContent/RTCViewPipIOS.js.map +1 -1
  91. package/dist/module/components/Call/CallContent/RTCViewPipNative.js +3 -3
  92. package/dist/module/components/Call/CallContent/RTCViewPipNative.js.map +1 -1
  93. package/dist/module/components/Call/CallControls/AcceptCallButton.js +3 -3
  94. package/dist/module/components/Call/CallControls/AcceptCallButton.js.map +1 -1
  95. package/dist/module/components/Call/CallControls/HangupCallButton.js +3 -4
  96. package/dist/module/components/Call/CallControls/HangupCallButton.js.map +1 -1
  97. package/dist/module/components/Call/CallControls/RejectCallButton.js +3 -3
  98. package/dist/module/components/Call/CallControls/RejectCallButton.js.map +1 -1
  99. package/dist/module/components/Call/CallControls/internal/ReactionsPicker.js +3 -3
  100. package/dist/module/components/Call/CallControls/internal/ReactionsPicker.js.map +1 -1
  101. package/dist/module/components/Call/Lobby/JoinCallButton.js +3 -3
  102. package/dist/module/components/Call/Lobby/JoinCallButton.js.map +1 -1
  103. package/dist/module/components/Livestream/LivestreamControls/HostStartStreamButton.js +5 -5
  104. package/dist/module/components/Livestream/LivestreamControls/HostStartStreamButton.js.map +1 -1
  105. package/dist/module/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js +3 -3
  106. package/dist/module/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js.map +1 -1
  107. package/dist/module/components/Livestream/LivestreamPlayer/LivestreamPlayer.js +5 -5
  108. package/dist/module/components/Livestream/LivestreamPlayer/LivestreamPlayer.js.map +1 -1
  109. package/dist/module/components/Livestream/ViewerLivestream/ViewerLobby.js +3 -4
  110. package/dist/module/components/Livestream/ViewerLivestream/ViewerLobby.js.map +1 -1
  111. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js +3 -3
  112. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js.map +1 -1
  113. package/dist/module/components/Participant/FloatingParticipantView/index.js +14 -7
  114. package/dist/module/components/Participant/FloatingParticipantView/index.js.map +1 -1
  115. package/dist/module/components/Participant/FloatingParticipantView/useFloatingVideoDimensions.js +23 -0
  116. package/dist/module/components/Participant/FloatingParticipantView/useFloatingVideoDimensions.js.map +1 -0
  117. package/dist/module/constants/index.js +0 -5
  118. package/dist/module/constants/index.js.map +1 -1
  119. package/dist/module/contexts/internal/ScreenshotIosContext.js +4 -4
  120. package/dist/module/contexts/internal/ScreenshotIosContext.js.map +1 -1
  121. package/dist/module/hooks/push/useInitAndroidTokenAndRest.js +2 -2
  122. package/dist/module/hooks/push/useInitAndroidTokenAndRest.js.map +1 -1
  123. package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js +3 -3
  124. package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -1
  125. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +14 -14
  126. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  127. package/dist/module/hooks/push/useProcessPushCallEffect.js +3 -3
  128. package/dist/module/hooks/push/useProcessPushCallEffect.js.map +1 -1
  129. package/dist/module/hooks/push/useProcessPushNonRingingCallEffect.js +2 -2
  130. package/dist/module/hooks/push/useProcessPushNonRingingCallEffect.js.map +1 -1
  131. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +11 -11
  132. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  133. package/dist/module/hooks/usePermissionRequest.js +3 -3
  134. package/dist/module/hooks/usePermissionRequest.js.map +1 -1
  135. package/dist/module/hooks/useScreenShareButton.js +5 -5
  136. package/dist/module/hooks/useScreenShareButton.js.map +1 -1
  137. package/dist/module/hooks/useScreenshot.js +3 -3
  138. package/dist/module/hooks/useScreenshot.js.map +1 -1
  139. package/dist/module/hooks/useTrackDimensions.js +1 -1
  140. package/dist/module/hooks/useTrackDimensions.js.map +1 -1
  141. package/dist/module/modules/call-manager/PrevLibDetection.js +2 -2
  142. package/dist/module/modules/call-manager/PrevLibDetection.js.map +1 -1
  143. package/dist/module/providers/BusyTonePlayer.js +7 -7
  144. package/dist/module/providers/BusyTonePlayer.js.map +1 -1
  145. package/dist/module/providers/NoiseCancellation/NoiseCancellationProvider.js +3 -3
  146. package/dist/module/providers/NoiseCancellation/NoiseCancellationProvider.js.map +1 -1
  147. package/dist/module/providers/StreamCall/AppStateListener.js +8 -8
  148. package/dist/module/providers/StreamCall/AppStateListener.js.map +1 -1
  149. package/dist/module/utils/getAndroidDefaultRingtoneUrl.js +3 -3
  150. package/dist/module/utils/getAndroidDefaultRingtoneUrl.js.map +1 -1
  151. package/dist/module/utils/push/android.js +31 -31
  152. package/dist/module/utils/push/android.js.map +1 -1
  153. package/dist/module/utils/push/internal/ios.js +9 -9
  154. package/dist/module/utils/push/internal/ios.js.map +1 -1
  155. package/dist/module/utils/push/internal/utils.js +12 -12
  156. package/dist/module/utils/push/internal/utils.js.map +1 -1
  157. package/dist/module/utils/push/ios.js +22 -22
  158. package/dist/module/utils/push/ios.js.map +1 -1
  159. package/dist/module/utils/push/libs/expoNotifications.js +2 -2
  160. package/dist/module/utils/push/libs/expoNotifications.js.map +1 -1
  161. package/dist/module/utils/push/libs/firebaseMessaging/index.js +3 -3
  162. package/dist/module/utils/push/libs/firebaseMessaging/index.js.map +1 -1
  163. package/dist/module/utils/push/libs/notifee/index.js +3 -3
  164. package/dist/module/utils/push/libs/notifee/index.js.map +1 -1
  165. package/dist/module/utils/push/setupIosCallKeepEvents.js +8 -8
  166. package/dist/module/utils/push/setupIosCallKeepEvents.js.map +1 -1
  167. package/dist/module/utils/push/setupIosVoipPushEvents.js +5 -5
  168. package/dist/module/utils/push/setupIosVoipPushEvents.js.map +1 -1
  169. package/dist/module/version.js +1 -1
  170. package/dist/typescript/components/Call/CallContent/CallContent.d.ts.map +1 -1
  171. package/dist/typescript/components/Call/CallContent/RTCViewPipIOS.d.ts.map +1 -1
  172. package/dist/typescript/components/Call/CallContent/RTCViewPipNative.d.ts.map +1 -1
  173. package/dist/typescript/components/Call/CallControls/AcceptCallButton.d.ts.map +1 -1
  174. package/dist/typescript/components/Call/CallControls/HangupCallButton.d.ts.map +1 -1
  175. package/dist/typescript/components/Call/CallControls/internal/ReactionsPicker.d.ts.map +1 -1
  176. package/dist/typescript/components/Livestream/ViewerLivestream/ViewerLobby.d.ts.map +1 -1
  177. package/dist/typescript/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.d.ts.map +1 -1
  178. package/dist/typescript/components/Participant/FloatingParticipantView/index.d.ts.map +1 -1
  179. package/dist/typescript/components/Participant/FloatingParticipantView/useFloatingVideoDimensions.d.ts +9 -0
  180. package/dist/typescript/components/Participant/FloatingParticipantView/useFloatingVideoDimensions.d.ts.map +1 -0
  181. package/dist/typescript/constants/index.d.ts +0 -5
  182. package/dist/typescript/constants/index.d.ts.map +1 -1
  183. package/dist/typescript/contexts/internal/ScreenshotIosContext.d.ts.map +1 -1
  184. package/dist/typescript/hooks/push/useInitAndroidTokenAndRest.d.ts.map +1 -1
  185. package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts.map +1 -1
  186. package/dist/typescript/hooks/push/useIosVoipPushEventsSetupEffect.d.ts.map +1 -1
  187. package/dist/typescript/hooks/push/useProcessPushCallEffect.d.ts.map +1 -1
  188. package/dist/typescript/hooks/push/useProcessPushNonRingingCallEffect.d.ts.map +1 -1
  189. package/dist/typescript/hooks/useAndroidKeepCallAliveEffect.d.ts.map +1 -1
  190. package/dist/typescript/hooks/useScreenShareButton.d.ts.map +1 -1
  191. package/dist/typescript/hooks/useScreenshot.d.ts.map +1 -1
  192. package/dist/typescript/hooks/useTrackDimensions.d.ts +1 -1
  193. package/dist/typescript/hooks/useTrackDimensions.d.ts.map +1 -1
  194. package/dist/typescript/modules/call-manager/PrevLibDetection.d.ts.map +1 -1
  195. package/dist/typescript/providers/BusyTonePlayer.d.ts.map +1 -1
  196. package/dist/typescript/providers/NoiseCancellation/NoiseCancellationProvider.d.ts.map +1 -1
  197. package/dist/typescript/providers/StreamCall/AppStateListener.d.ts.map +1 -1
  198. package/dist/typescript/utils/push/android.d.ts.map +1 -1
  199. package/dist/typescript/utils/push/internal/ios.d.ts.map +1 -1
  200. package/dist/typescript/utils/push/internal/utils.d.ts.map +1 -1
  201. package/dist/typescript/utils/push/ios.d.ts.map +1 -1
  202. package/dist/typescript/utils/push/libs/expoNotifications.d.ts.map +1 -1
  203. package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
  204. package/dist/typescript/utils/push/libs/notifee/index.d.ts.map +1 -1
  205. package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts.map +1 -1
  206. package/dist/typescript/utils/push/setupIosVoipPushEvents.d.ts.map +1 -1
  207. package/dist/typescript/version.d.ts +1 -1
  208. package/ios/StreamInCallManager.swift +112 -37
  209. package/package.json +3 -3
  210. package/src/components/Call/CallContent/CallContent.tsx +7 -9
  211. package/src/components/Call/CallContent/RTCViewPipIOS.tsx +7 -9
  212. package/src/components/Call/CallContent/RTCViewPipNative.tsx +8 -6
  213. package/src/components/Call/CallControls/AcceptCallButton.tsx +3 -3
  214. package/src/components/Call/CallControls/HangupCallButton.tsx +3 -4
  215. package/src/components/Call/CallControls/RejectCallButton.tsx +4 -4
  216. package/src/components/Call/CallControls/internal/ReactionsPicker.tsx +6 -3
  217. package/src/components/Call/Lobby/JoinCallButton.tsx +3 -3
  218. package/src/components/Livestream/LivestreamControls/HostStartStreamButton.tsx +5 -5
  219. package/src/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.tsx +3 -3
  220. package/src/components/Livestream/LivestreamPlayer/LivestreamPlayer.tsx +5 -5
  221. package/src/components/Livestream/ViewerLivestream/ViewerLobby.tsx +3 -4
  222. package/src/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.tsx +3 -4
  223. package/src/components/Participant/FloatingParticipantView/index.tsx +20 -6
  224. package/src/components/Participant/FloatingParticipantView/useFloatingVideoDimensions.tsx +36 -0
  225. package/src/constants/index.ts +0 -6
  226. package/src/contexts/internal/ScreenshotIosContext.tsx +12 -14
  227. package/src/hooks/push/useInitAndroidTokenAndRest.ts +4 -6
  228. package/src/hooks/push/useIosCallkeepWithCallingStateEffect.ts +9 -3
  229. package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +14 -19
  230. package/src/hooks/push/useProcessPushCallEffect.ts +11 -9
  231. package/src/hooks/push/useProcessPushNonRingingCallEffect.ts +6 -5
  232. package/src/hooks/useAndroidKeepCallAliveEffect.ts +17 -14
  233. package/src/hooks/usePermissionRequest.tsx +3 -3
  234. package/src/hooks/useScreenShareButton.ts +5 -7
  235. package/src/hooks/useScreenshot.ts +7 -11
  236. package/src/hooks/useTrackDimensions.ts +2 -2
  237. package/src/modules/call-manager/PrevLibDetection.ts +6 -5
  238. package/src/providers/BusyTonePlayer.tsx +7 -11
  239. package/src/providers/NoiseCancellation/NoiseCancellationProvider.tsx +7 -11
  240. package/src/providers/StreamCall/AppStateListener.tsx +8 -12
  241. package/src/utils/getAndroidDefaultRingtoneUrl.ts +3 -3
  242. package/src/utils/push/android.ts +93 -85
  243. package/src/utils/push/internal/ios.ts +9 -15
  244. package/src/utils/push/internal/utils.ts +28 -25
  245. package/src/utils/push/ios.ts +28 -32
  246. package/src/utils/push/libs/expoNotifications.ts +6 -5
  247. package/src/utils/push/libs/firebaseMessaging/index.ts +5 -4
  248. package/src/utils/push/libs/notifee/index.ts +3 -4
  249. package/src/utils/push/setupIosCallKeepEvents.ts +12 -14
  250. package/src/utils/push/setupIosVoipPushEvents.ts +7 -9
  251. package/src/version.ts +1 -1
@@ -8,7 +8,7 @@ import {
8
8
  getPushNotificationIosLib,
9
9
  type PushNotificationiOSType,
10
10
  } from './libs';
11
- import { getLogger, StreamVideoClient } from '@stream-io/video-client';
11
+ import { StreamVideoClient, videoLoggerSystem } from '@stream-io/video-client';
12
12
  import { setPushLogoutCallback } from '../internal/pushLogoutCallback';
13
13
  import type { Event } from '@notifee/react-native';
14
14
  import { StreamVideoRN } from '../StreamVideoRN';
@@ -27,8 +27,10 @@ function processNonRingingNotificationStreamPayload(
27
27
  ) {
28
28
  const cid = streamPayload.call_cid;
29
29
  const type = streamPayload.type;
30
- const logger = getLogger(['processNonRingingNotificationStreamPayload']);
31
- logger('trace', `cid, type - ${cid}, ${type}`);
30
+ const logger = videoLoggerSystem.getLogger(
31
+ 'processNonRingingNotificationStreamPayload',
32
+ );
33
+ logger.trace(`cid, type - ${cid}, ${type}`);
32
34
  pushNonRingingCallData$.next({ cid, type });
33
35
  return { cid, type };
34
36
  }
@@ -47,9 +49,10 @@ export const oniOSExpoNotificationEvent = (event: ExpoNotification) => {
47
49
  trigger.payload?.stream
48
50
  ) {
49
51
  const streamPayload = trigger.payload.stream as StreamPushPayload;
50
- const logger = getLogger(['processNonRingingNotificationStreamPayload']);
51
- logger(
52
- 'trace',
52
+ const logger = videoLoggerSystem.getLogger(
53
+ 'processNonRingingNotificationStreamPayload',
54
+ );
55
+ logger.trace(
53
56
  `processNonRingingNotificationStreamPayload - ${JSON.stringify(
54
57
  streamPayload,
55
58
  )}`,
@@ -75,9 +78,8 @@ export const oniOSNotifeeEvent = ({
75
78
  | undefined;
76
79
  const result = processNonRingingNotificationStreamPayload(streamPayload);
77
80
  if (result) {
78
- const logger = getLogger(['oniOSNotifeeEvent']);
79
- logger(
80
- 'debug',
81
+ const logger = videoLoggerSystem.getLogger('oniOSNotifeeEvent');
82
+ logger.debug(
81
83
  `onTapNonRingingCallNotification?.(${result.cid}, ${result.type})`,
82
84
  );
83
85
  pushConfig.onTapNonRingingCallNotification?.(result.cid, result.type);
@@ -91,10 +93,11 @@ export function onPushNotificationiOSStreamVideoEvent(
91
93
  const pushNotificationIosLib = getPushNotificationIosLib();
92
94
  const data = notification.getData();
93
95
  const streamPayload = data?.stream as StreamPushPayload;
94
- const logger = getLogger(['onPushNotificationiOSStreamVideoEvent']);
96
+ const logger = videoLoggerSystem.getLogger(
97
+ 'onPushNotificationiOSStreamVideoEvent',
98
+ );
95
99
  if (!streamPayload) {
96
- logger(
97
- 'trace',
100
+ logger.trace(
98
101
  `skipping process: no stream payload found in notification data - ${JSON.stringify(
99
102
  data,
100
103
  )}`,
@@ -104,8 +107,7 @@ export function onPushNotificationiOSStreamVideoEvent(
104
107
  const isClicked = data.userInteraction === 1;
105
108
  const pushConfig = StreamVideoRN.getConfig().push;
106
109
  if (!isClicked || !pushConfig) {
107
- logger(
108
- 'debug',
110
+ logger.debug(
109
111
  `notification.finish called and returning - isClicked: ${isClicked}, pushConfig: ${!!pushConfig}`,
110
112
  );
111
113
  notification.finish(pushNotificationIosLib.FetchResult.NoData);
@@ -114,8 +116,7 @@ export function onPushNotificationiOSStreamVideoEvent(
114
116
  // listen to foreground notifications
115
117
  const result = processNonRingingNotificationStreamPayload(streamPayload);
116
118
  if (result) {
117
- logger(
118
- 'debug',
119
+ logger.debug(
119
120
  `onTapNonRingingCallNotification?.(${result.cid}, ${result.type})`,
120
121
  );
121
122
  pushConfig.onTapNonRingingCallNotification?.(result.cid, result.type);
@@ -137,12 +138,11 @@ export async function initIosNonVoipToken(
137
138
  return;
138
139
  }
139
140
 
140
- const logger = getLogger(['initIosNonVoipToken']);
141
+ const logger = videoLoggerSystem.getLogger('initIosNonVoipToken');
141
142
  const setDeviceToken = async (token: string) => {
142
143
  const userId = client.streamClient._user?.id ?? '';
143
144
  if (lastApnToken.token === token && lastApnToken.userId === userId) {
144
- logger(
145
- 'debug',
145
+ logger.debug(
146
146
  'Skipped sending device token to stream as it was already sent',
147
147
  token,
148
148
  );
@@ -151,33 +151,31 @@ export async function initIosNonVoipToken(
151
151
  setPushLogoutCallback(async () => {
152
152
  lastApnToken = { token: '', userId: '' };
153
153
  try {
154
- logger('debug', 'Remove device token - setPushLogoutCallback', token);
154
+ logger.debug('Remove device token - setPushLogoutCallback', token);
155
155
  await client.removeDevice(token);
156
156
  } catch (err) {
157
- logger(
158
- 'warn',
157
+ logger.warn(
159
158
  'setPushLogoutCallback - Failed to remove apn token from stream',
160
159
  err,
161
160
  );
162
161
  }
163
162
  });
164
163
  const push_provider_name = pushConfig.ios.pushProviderName;
165
- logger('debug', 'Add device token to stream', token);
164
+ logger.debug('Add device token to stream', token);
166
165
  await client
167
166
  .addDevice(token, 'apn', push_provider_name)
168
167
  .then(() => {
169
168
  lastApnToken = { token, userId };
170
169
  })
171
170
  .catch((err) => {
172
- logger('warn', 'Failed to add apn token to stream', err);
171
+ logger.warn('Failed to add apn token to stream', err);
173
172
  });
174
173
  };
175
174
  if (pushConfig.isExpo) {
176
175
  const expoNotificationsLib = getExpoNotificationsLib();
177
176
  if (expoNotificationsLib) {
178
177
  expoNotificationsLib.getDevicePushTokenAsync().then((devicePushToken) => {
179
- logger(
180
- 'debug',
178
+ logger.debug(
181
179
  'Got device token - expoNotificationsLib.getDevicePushTokenAsync',
182
180
  devicePushToken.data,
183
181
  );
@@ -185,8 +183,7 @@ export async function initIosNonVoipToken(
185
183
  });
186
184
  const subscription = expoNotificationsLib.addPushTokenListener(
187
185
  (devicePushToken) => {
188
- logger(
189
- 'debug',
186
+ logger.debug(
190
187
  'Got device token - expoNotificationsLib.addPushTokenListener',
191
188
  devicePushToken.data,
192
189
  );
@@ -194,22 +191,21 @@ export async function initIosNonVoipToken(
194
191
  },
195
192
  );
196
193
  setUnsubscribeListener(() => {
197
- logger('debug', `removed expo addPushTokenListener`);
194
+ logger.debug(`removed expo addPushTokenListener`);
198
195
  subscription.remove();
199
196
  });
200
197
  }
201
198
  } else {
202
199
  const pushNotificationIosLib = getPushNotificationIosLib();
203
200
  pushNotificationIosLib.addEventListener('register', (token) => {
204
- logger(
205
- 'debug',
201
+ logger.debug(
206
202
  `Got device token - pushNotificationIosLib.addEventListener('register')`,
207
203
  token,
208
204
  );
209
205
  setDeviceToken(token);
210
206
  });
211
207
  setUnsubscribeListener(() => {
212
- logger('debug', `pushNotificationIosLib.removeEventListener('register')`);
208
+ logger.debug(`pushNotificationIosLib.removeEventListener('register')`);
213
209
  pushNotificationIosLib.removeEventListener('register');
214
210
  });
215
211
  }
@@ -1,5 +1,5 @@
1
- import { getLogger } from '@stream-io/video-client';
2
1
  import type { Notification } from 'expo-notifications';
2
+ import { videoLoggerSystem } from '@stream-io/video-client';
3
3
 
4
4
  export type ExpoNotificationsLib = typeof import('expo-notifications');
5
5
 
@@ -22,10 +22,11 @@ export function getExpoNotificationsLib() {
22
22
 
23
23
  export function getExpoNotificationsLibNoThrow() {
24
24
  if (!expoNotificationsLib) {
25
- getLogger(['getExpoNotificationsLibNoThrow'])(
26
- 'debug',
27
- 'expo-notifications library is not installed. It is required for non ringing push notifications and not for ringing',
28
- );
25
+ videoLoggerSystem
26
+ .getLogger('getExpoNotificationsLibNoThrow')
27
+ .debug(
28
+ 'expo-notifications library is not installed. It is required for non ringing push notifications and not for ringing',
29
+ );
29
30
  }
30
31
  return expoNotificationsLib;
31
32
  }
@@ -1,5 +1,5 @@
1
- import { getLogger } from '@stream-io/video-client';
2
1
  import { lib, type Type } from './lib';
2
+ import { videoLoggerSystem } from '@stream-io/video-client';
3
3
 
4
4
  export type { FirebaseMessagingTypes } from '@react-native-firebase/messaging';
5
5
  export type FirebaseMessagingType = Type;
@@ -19,9 +19,10 @@ export function getFirebaseMessagingLib() {
19
19
 
20
20
  export function getFirebaseMessagingLibNoThrow(isExpo: boolean) {
21
21
  if (!lib) {
22
- const logger = getLogger(['getFirebaseMessagingLibNoThrow']);
23
- logger(
24
- 'debug',
22
+ const logger = videoLoggerSystem.getLogger(
23
+ 'getFirebaseMessagingLibNoThrow',
24
+ );
25
+ logger.debug(
25
26
  `${
26
27
  isExpo
27
28
  ? 'In Expo, @react-native-firebase/messaging library is required to receive ringing notifications in app killed state for Android.'
@@ -1,6 +1,6 @@
1
- import { getLogger } from '@stream-io/video-client';
2
1
  import { PermissionsAndroid } from 'react-native';
3
2
  import { lib, type Type } from './lib';
3
+ import { videoLoggerSystem } from '@stream-io/video-client';
4
4
 
5
5
  export type NotifeeLib = Type;
6
6
 
@@ -37,9 +37,8 @@ export function getNotifeeLibThrowIfNotInstalledForPush() {
37
37
 
38
38
  export function getNotifeeLibNoThrowForKeepCallAlive() {
39
39
  if (!lib) {
40
- const logger = getLogger(['getNotifeeLibNoThrow']);
41
- logger(
42
- 'info',
40
+ const logger = videoLoggerSystem.getLogger('getNotifeeLibNoThrow');
41
+ logger.info(
43
42
  `${'@notifee/react-native library not installed. It is required to keep call alive in the background for Android. '}${INSTALLATION_INSTRUCTION}`,
44
43
  );
45
44
  }
@@ -4,7 +4,7 @@ import {
4
4
  voipCallkeepCallOnForegroundMap$,
5
5
  voipPushNotificationCallCId$,
6
6
  } from './internal/rxSubjects';
7
- import { getLogger, RxUtils } from '@stream-io/video-client';
7
+ import { RxUtils, videoLoggerSystem } from '@stream-io/video-client';
8
8
  import { getCallKeepLib, getVoipPushNotificationLib } from './libs';
9
9
  import type { StreamVideoConfig } from '../StreamVideoRN/types';
10
10
  import {
@@ -27,13 +27,14 @@ export function setupIosCallKeepEvents(
27
27
  }
28
28
  if (!pushConfig.android.incomingCallChannel) {
29
29
  // TODO: remove this check and find a better way once we have telecom integration for android
30
- getLogger(['setupIosCallKeepEvents'])(
31
- 'debug',
32
- 'android incomingCallChannel is not defined, so skipping the setupIosCallKeepEvents',
33
- );
30
+ videoLoggerSystem
31
+ .getLogger('setupIosCallKeepEvents')
32
+ .debug(
33
+ 'android incomingCallChannel is not defined, so skipping the setupIosCallKeepEvents',
34
+ );
34
35
  return;
35
36
  }
36
- const logger = getLogger(['setupIosCallKeepEvents']);
37
+ const logger = videoLoggerSystem.getLogger('setupIosCallKeepEvents');
37
38
  const callkeep = getCallKeepLib();
38
39
 
39
40
  async function getCallCid(callUUID: string): Promise<string | undefined> {
@@ -46,16 +47,14 @@ export function setupIosCallKeepEvents(
46
47
  voipPushNotificationCallCId$,
47
48
  );
48
49
  if (!voipPushNotificationCallCId) {
49
- logger(
50
- 'debug',
50
+ logger.debug(
51
51
  `voipPushNotificationCallCId$ is empty, updating it with the call_cid: ${call_cid} for callUUID: ${callUUID}`,
52
52
  );
53
53
  voipPushNotificationCallCId$.next(call_cid);
54
54
  }
55
55
  return call_cid;
56
56
  } catch {
57
- logger(
58
- 'debug',
57
+ logger.debug(
59
58
  `Error in getting call cid from native module for callUUID: ${callUUID} - probably the call was already processed, so ignoring this callkeep event`,
60
59
  );
61
60
  }
@@ -64,14 +63,14 @@ export function setupIosCallKeepEvents(
64
63
 
65
64
  function answerCall(callUUID: string) {
66
65
  getCallCid(callUUID).then((call_cid) => {
67
- logger('debug', `answerCall event with call_cid: ${call_cid}`);
66
+ logger.debug(`answerCall event with call_cid: ${call_cid}`);
68
67
  iosCallkeepAcceptCall(call_cid, callUUID);
69
68
  });
70
69
  }
71
70
 
72
71
  function endCall(callUUID: string) {
73
72
  getCallCid(callUUID).then((call_cid) => {
74
- logger('debug', `endCall event with call_cid: ${call_cid}`);
73
+ logger.debug(`endCall event with call_cid: ${call_cid}`);
75
74
  iosCallkeepRejectCall(call_cid, callUUID, pushConfig!);
76
75
  });
77
76
  }
@@ -80,8 +79,7 @@ export function setupIosCallKeepEvents(
80
79
  const voipPushNotification = getVoipPushNotificationLib();
81
80
  // @ts-expect-error - call_cid is not part of RNCallKeepEventPayload
82
81
  const call_cid = payload?.call_cid as string | undefined;
83
- logger(
84
- 'debug',
82
+ logger.debug(
85
83
  `didDisplayIncomingCall event with callUUID: ${callUUID} call_cid: ${call_cid}`,
86
84
  );
87
85
  if (call_cid) {
@@ -3,8 +3,8 @@ import { getVoipPushNotificationLib } from './libs';
3
3
  import { Platform } from 'react-native';
4
4
  import { onVoipNotificationReceived } from './internal/ios';
5
5
  import { setPushLogoutCallback } from '../internal/pushLogoutCallback';
6
- import { getLogger } from '@stream-io/video-client';
7
6
  import { StreamVideoConfig } from '../StreamVideoRN/types';
7
+ import { videoLoggerSystem } from '@stream-io/video-client';
8
8
 
9
9
  export function setupIosVoipPushEvents(
10
10
  pushConfig: NonNullable<StreamVideoConfig['push']>,
@@ -12,26 +12,24 @@ export function setupIosVoipPushEvents(
12
12
  if (Platform.OS !== 'ios' || !pushConfig.ios?.pushProviderName) {
13
13
  return;
14
14
  }
15
- const logger = getLogger(['setupIosVoipPushEvents']);
15
+ const logger = videoLoggerSystem.getLogger('setupIosVoipPushEvents');
16
16
  if (!pushConfig.ios.pushProviderName) {
17
17
  // TODO: remove this check and find a better way once we have telecom integration for android
18
- logger(
19
- 'debug',
18
+ logger.debug(
20
19
  'ios pushProviderName is not defined, so skipping the setupIosVoipPushEvents',
21
20
  );
22
21
  return;
23
22
  }
24
23
  const voipPushNotification = getVoipPushNotificationLib();
25
24
 
26
- logger('debug', 'notification event listener added');
25
+ logger.debug('notification event listener added');
27
26
  voipPushNotification.addEventListener('notification', (notification) => {
28
27
  onVoipNotificationReceived(notification, pushConfig);
29
28
  });
30
29
  setPushLogoutCallback(async () => {
31
- getLogger(['setPushLogoutCallback'])(
32
- 'debug',
33
- 'notification event listener removed',
34
- );
30
+ videoLoggerSystem
31
+ .getLogger('setPushLogoutCallback')
32
+ .debug('notification event listener removed');
35
33
  voipPushNotification.removeEventListener('notification');
36
34
  });
37
35
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '1.22.3';
1
+ export const version = '1.24.0';