@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
@@ -1,4 +1,3 @@
1
- import { getLogger } from '@stream-io/video-client';
2
1
  import React from 'react';
3
2
  import {
4
3
  type HostComponent,
@@ -7,6 +6,7 @@ import {
7
6
  StyleSheet,
8
7
  UIManager,
9
8
  } from 'react-native';
9
+ import { videoLoggerSystem } from '@stream-io/video-client';
10
10
 
11
11
  const COMPONENT_NAME = 'RTCViewPip';
12
12
 
@@ -23,7 +23,7 @@ const NativeComponent: HostComponent<RTCViewPipNativeProps> =
23
23
  requireNativeComponent(COMPONENT_NAME);
24
24
 
25
25
  export function onNativeCallClosed(reactTag: number) {
26
- getLogger(['RTCViewPipNative'])('debug', 'onNativeCallClosed');
26
+ videoLoggerSystem.getLogger('RTCViewPipNative').debug('onNativeCallClosed');
27
27
  const commandId =
28
28
  UIManager.getViewManagerConfig(COMPONENT_NAME).Commands.onCallClosed;
29
29
  if (!commandId) return;
@@ -35,10 +35,12 @@ export function onNativeDimensionsUpdated(
35
35
  width: number,
36
36
  height: number,
37
37
  ) {
38
- getLogger(['RTCViewPipNative'])('debug', 'onNativeDimensionsUpdated', {
39
- width,
40
- height,
41
- });
38
+ videoLoggerSystem
39
+ .getLogger('RTCViewPipNative')
40
+ .debug('onNativeDimensionsUpdated', {
41
+ width,
42
+ height,
43
+ });
42
44
  const commandId =
43
45
  UIManager.getViewManagerConfig(COMPONENT_NAME).Commands
44
46
  .setPreferredContentSize;
@@ -1,9 +1,9 @@
1
1
  import { useCall } from '@stream-io/video-react-bindings';
2
- import { getLogger } from '@stream-io/video-client';
3
2
  import React, { useState } from 'react';
4
3
  import { CallControlsButton } from './CallControlsButton';
5
4
  import { IconWrapper, Phone } from '../../../icons';
6
5
  import { useTheme } from '../../../contexts/ThemeContext';
6
+ import { videoLoggerSystem } from '@stream-io/video-client';
7
7
 
8
8
  /**
9
9
  * The props for the Accept Call button.
@@ -52,8 +52,8 @@ export const AcceptCallButton = ({
52
52
  onAcceptCallHandler();
53
53
  }
54
54
  } catch (error) {
55
- const logger = getLogger(['AcceptCallButton']);
56
- logger('error', 'Error joining Call', error);
55
+ const logger = videoLoggerSystem.getLogger('AcceptCallButton');
56
+ logger.error('Error joining Call', error);
57
57
  } finally {
58
58
  setIsLoading(false);
59
59
  }
@@ -1,10 +1,9 @@
1
1
  import React from 'react';
2
- import { getLogger } from '@stream-io/video-client';
3
2
  import { CallControlsButton } from './CallControlsButton';
4
3
  import { PhoneDown } from '../../../icons';
5
4
  import { ButtonTestIds } from '../../../constants/TestIds';
6
5
  import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
7
- import { CallingState } from '@stream-io/video-client';
6
+ import { CallingState, videoLoggerSystem } from '@stream-io/video-client';
8
7
  import { useTheme } from '../../../contexts/ThemeContext';
9
8
  import { IconWrapper } from '../../../icons/IconWrapper';
10
9
 
@@ -60,8 +59,8 @@ export const HangUpCallButton = ({
60
59
  onHangupCallHandler();
61
60
  }
62
61
  } catch (error) {
63
- const logger = getLogger(['HangUpCallButton']);
64
- logger('error', 'Error leaving Call', error);
62
+ const logger = videoLoggerSystem.getLogger('HangUpCallButton');
63
+ logger.error('Error leaving Call', error);
65
64
  }
66
65
  };
67
66
 
@@ -2,7 +2,7 @@ import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
2
2
  import React, { useState } from 'react';
3
3
  import { CallControlsButton } from './CallControlsButton';
4
4
  import { IconWrapper, PhoneDown } from '../../../icons';
5
- import { CallingState, getLogger } from '@stream-io/video-client';
5
+ import { CallingState, videoLoggerSystem } from '@stream-io/video-client';
6
6
  import { useTheme } from '../../../contexts/ThemeContext';
7
7
 
8
8
  /**
@@ -27,7 +27,7 @@ type RejectCallButtonProps = {
27
27
  /**
28
28
  * Optional: Reason for rejecting the call.
29
29
  * Pass a predefined or a custom reason.
30
- * There are four predefined reasons for rejecting the call:
30
+ * There are four predefined reasons for rejecting the call:
31
31
  - `busy` - when the callee is busy and cannot accept the call.
32
32
  - `decline` - when the callee intentionally declines the call.
33
33
  - `cancel` - when the caller cancels the call.
@@ -74,8 +74,8 @@ export const RejectCallButton = ({
74
74
  onRejectCallHandler();
75
75
  }
76
76
  } catch (error) {
77
- const logger = getLogger(['RejectCallButton']);
78
- logger('error', 'Error rejecting Call', error);
77
+ const logger = videoLoggerSystem.getLogger('RejectCallButton');
78
+ logger.error('Error rejecting Call', error);
79
79
  } finally {
80
80
  setIsLoading(false);
81
81
  }
@@ -7,7 +7,10 @@ import {
7
7
  StyleSheet,
8
8
  } from 'react-native';
9
9
  import { useCall } from '@stream-io/video-react-bindings';
10
- import { getLogger, type SendReactionRequest } from '@stream-io/video-client';
10
+ import {
11
+ type SendReactionRequest,
12
+ videoLoggerSystem,
13
+ } from '@stream-io/video-client';
11
14
  import { ComponentTestIds } from '../../../../constants/TestIds';
12
15
  import { useTheme } from '../../../../contexts/ThemeContext';
13
16
  import type { ReactionsButtonProps } from '../ReactionsButton';
@@ -82,8 +85,8 @@ export const ReactionsPicker = ({
82
85
  const onClose = (reaction?: SendReactionRequest) => {
83
86
  if (reaction) {
84
87
  call?.sendReaction(reaction).catch((e) => {
85
- const logger = getLogger(['ReactionsPicker']);
86
- logger('error', 'Error on onClose-sendReaction', e, reaction);
88
+ const logger = videoLoggerSystem.getLogger('ReactionsPicker');
89
+ logger.error('Error on onClose-sendReaction', e, reaction);
87
90
  });
88
91
  }
89
92
  Animated.timing(elasticAnimRef.current, {
@@ -3,7 +3,7 @@ import { type LobbyProps } from './Lobby';
3
3
  import { Pressable, StyleSheet, Text } from 'react-native';
4
4
  import { useCall, useI18n } from '@stream-io/video-react-bindings';
5
5
  import { useTheme } from '../../../contexts/ThemeContext';
6
- import { getLogger } from '@stream-io/video-client';
6
+ import { videoLoggerSystem } from '@stream-io/video-client';
7
7
 
8
8
  /**
9
9
  * Props for the Join Call Button in the Lobby component.
@@ -39,8 +39,8 @@ export const JoinCallButton = ({
39
39
  onJoinCallHandler();
40
40
  }
41
41
  } catch (error) {
42
- const logger = getLogger(['JoinCallButton']);
43
- logger('error', 'Error joining call:', error);
42
+ const logger = videoLoggerSystem.getLogger('JoinCallButton');
43
+ logger.error('Error joining call:', error);
44
44
  } finally {
45
45
  setIsLoading(false);
46
46
  }
@@ -13,7 +13,7 @@ import {
13
13
  } from 'react-native';
14
14
  import { useTheme } from '../../../contexts';
15
15
  import { EndBroadcastIcon, StartStreamIcon } from '../../../icons';
16
- import { SfuModels, getLogger } from '@stream-io/video-client';
16
+ import { SfuModels, videoLoggerSystem } from '@stream-io/video-client';
17
17
 
18
18
  /**
19
19
  * Props for the HostStartStreamButton component.
@@ -79,8 +79,8 @@ export const HostStartStreamButton = ({
79
79
  onStartStreamHandler();
80
80
  }
81
81
  } catch (error) {
82
- const logger = getLogger(['HostStartStreamButton']);
83
- logger('error', 'Error starting livestream', error);
82
+ const logger = videoLoggerSystem.getLogger('HostStartStreamButton');
83
+ logger.error('Error starting livestream', error);
84
84
  }
85
85
  };
86
86
 
@@ -102,8 +102,8 @@ export const HostStartStreamButton = ({
102
102
  onEndStreamHandler();
103
103
  }
104
104
  } catch (error) {
105
- const logger = getLogger(['HostStartStreamButton']);
106
- logger('error', 'Error stopping livestream', error);
105
+ const logger = videoLoggerSystem.getLogger('HostStartStreamButton');
106
+ logger.error('Error stopping livestream', error);
107
107
  }
108
108
  };
109
109
 
@@ -3,7 +3,7 @@ import { ActivityIndicator, Pressable, StyleSheet, View } from 'react-native';
3
3
  import { useTheme } from '../../../contexts';
4
4
  import { PhoneDown } from '../../../icons';
5
5
  import { useCall } from '@stream-io/video-react-bindings';
6
- import { getLogger } from '@stream-io/video-client';
6
+ import { videoLoggerSystem } from '@stream-io/video-client';
7
7
 
8
8
  /**
9
9
  * Props for the ViewerLeaveStreamButton component.
@@ -43,8 +43,8 @@ export const ViewerLeaveStreamButton = ({
43
43
  await call?.leave();
44
44
  setIsAwaitingResponse(false);
45
45
  } catch (error) {
46
- const logger = getLogger(['ViewerLeaveStreamButton']);
47
- logger('error', 'Error stopping livestream', error);
46
+ const logger = videoLoggerSystem.getLogger('ViewerLeaveStreamButton');
47
+ logger.error('Error stopping livestream', error);
48
48
  }
49
49
  };
50
50
 
@@ -3,7 +3,7 @@ import {
3
3
  ViewerLivestream as DefaultViewerLivestream,
4
4
  type ViewerLivestreamProps,
5
5
  } from '../ViewerLivestream';
6
- import { Call, CallingState, getLogger } from '@stream-io/video-client';
6
+ import { Call, CallingState, videoLoggerSystem } from '@stream-io/video-client';
7
7
  import { StreamCall } from '../../../providers/StreamCall';
8
8
  import { useStreamVideoClient } from '@stream-io/video-react-bindings';
9
9
 
@@ -56,8 +56,8 @@ export const LivestreamPlayer = ({
56
56
  return () => {
57
57
  if (myCall.state.callingState !== CallingState.LEFT) {
58
58
  myCall.leave().catch((e) => {
59
- const logger = getLogger(['LivestreamPlayer']);
60
- logger('error', 'Error leaving call:', e);
59
+ const logger = videoLoggerSystem.getLogger('LivestreamPlayer');
60
+ logger.error('Error leaving call:', e);
61
61
  });
62
62
  }
63
63
  setCall(undefined);
@@ -69,8 +69,8 @@ export const LivestreamPlayer = ({
69
69
  // this handles unmount on metro reloads
70
70
  if (call?.state.callingState !== CallingState.LEFT) {
71
71
  call?.leave().catch((e) => {
72
- const logger = getLogger(['LivestreamPlayer']);
73
- logger('error', 'Error leaving call:', e);
72
+ const logger = videoLoggerSystem.getLogger('LivestreamPlayer');
73
+ logger.error('Error leaving call:', e);
74
74
  });
75
75
  }
76
76
  };
@@ -12,8 +12,7 @@ import {
12
12
  View,
13
13
  } from 'react-native';
14
14
  import { useTheme } from '../../../contexts';
15
- import { CallingState } from '@stream-io/video-client';
16
- import { getLogger } from '@stream-io/video-client';
15
+ import { CallingState, videoLoggerSystem } from '@stream-io/video-client';
17
16
 
18
17
  type LobbyProps = {
19
18
  isLive: boolean;
@@ -68,8 +67,8 @@ export const ViewerLobby = ({ isLive }: LobbyProps) => {
68
67
  await call.get();
69
68
  } catch (err) {
70
69
  if (err instanceof Error) {
71
- const logger = getLogger(['ViewerLobby']);
72
- logger('error', 'Error getting call:', err);
70
+ const logger = videoLoggerSystem.getLogger('ViewerLobby');
71
+ logger.error('Error getting call:', err);
73
72
  setError(err);
74
73
  }
75
74
  }
@@ -14,7 +14,7 @@ import {
14
14
  getClosestSnapAlignment,
15
15
  getSnapAlignments,
16
16
  } from './common';
17
- import { getLogger } from '@stream-io/video-client';
17
+ import { videoLoggerSystem } from '@stream-io/video-client';
18
18
 
19
19
  const AnimatedFloatingView = ({
20
20
  initialAlignment,
@@ -115,9 +115,8 @@ const AnimatedFloatingView = ({
115
115
  ).current;
116
116
 
117
117
  useEffect(() => {
118
- const logger = getLogger(['AnimatedFloatingView']);
119
- logger(
120
- 'info',
118
+ const logger = videoLoggerSystem.getLogger('AnimatedFloatingView');
119
+ logger.info(
121
120
  'react-native-reanimated and/or react-native-gesture-handler libraries are not installed. Please install them to get a more performant draggable local video component',
122
121
  );
123
122
  }, []);
@@ -6,7 +6,7 @@ import {
6
6
  View,
7
7
  type ViewStyle,
8
8
  } from 'react-native';
9
- import { FLOATING_VIDEO_VIEW_STYLE, Z_INDEX } from '../../../constants';
9
+ import { Z_INDEX } from '../../../constants';
10
10
  import { ComponentTestIds } from '../../../constants/TestIds';
11
11
  import { VideoSlash } from '../../../icons';
12
12
  import FloatingView from './FloatingView';
@@ -21,6 +21,7 @@ import {
21
21
  type ParticipantViewProps,
22
22
  } from '../ParticipantView';
23
23
  import { useTheme } from '../../../contexts/ThemeContext';
24
+ import { useFloatingVideoDimensions } from './useFloatingVideoDimensions';
24
25
  import { type StreamVideoParticipant } from '@stream-io/video-client';
25
26
 
26
27
  export type FloatingParticipantViewAlignment =
@@ -104,7 +105,11 @@ export const FloatingParticipantView = ({
104
105
  objectFit,
105
106
  }: FloatingParticipantViewProps) => {
106
107
  const {
107
- theme: { colors, floatingParticipantsView },
108
+ theme: {
109
+ colors,
110
+ floatingParticipantsView,
111
+ variants: { spacingSizes },
112
+ },
108
113
  } = useTheme();
109
114
 
110
115
  const floatingAlignmentMap: Record<
@@ -122,6 +127,12 @@ export const FloatingParticipantView = ({
122
127
  height: number;
123
128
  }>();
124
129
 
130
+ const floatingVideoDimensions = useFloatingVideoDimensions(
131
+ containerDimensions,
132
+ participant,
133
+ 'videoTrack',
134
+ );
135
+
125
136
  const participantViewProps: ParticipantViewComponentProps = {
126
137
  ParticipantLabel: null,
127
138
  ParticipantNetworkQualityIndicator,
@@ -158,7 +169,7 @@ export const FloatingParticipantView = ({
158
169
  });
159
170
  }}
160
171
  >
161
- {containerDimensions && (
172
+ {containerDimensions && floatingVideoDimensions && (
162
173
  <FloatingView
163
174
  containerHeight={containerDimensions.height}
164
175
  containerWidth={containerDimensions.width}
@@ -171,6 +182,12 @@ export const FloatingParticipantView = ({
171
182
  trackType="videoTrack"
172
183
  style={[
173
184
  styles.participantViewContainer,
185
+ {
186
+ width: floatingVideoDimensions.width,
187
+ height: floatingVideoDimensions.height,
188
+ borderRadius: floatingVideoDimensions.width * 0.1,
189
+ marginHorizontal: spacingSizes.md,
190
+ },
174
191
  participantViewStyle,
175
192
  { shadowColor: colors.sheetPrimary },
176
193
  floatingParticipantsView.participantViewContainer,
@@ -197,9 +214,6 @@ const styles = StyleSheet.create({
197
214
  flex: 1,
198
215
  },
199
216
  participantViewContainer: {
200
- height: FLOATING_VIDEO_VIEW_STYLE.height,
201
- width: FLOATING_VIDEO_VIEW_STYLE.width,
202
- borderRadius: FLOATING_VIDEO_VIEW_STYLE.borderRadius,
203
217
  shadowOffset: {
204
218
  width: 0,
205
219
  height: 2,
@@ -0,0 +1,36 @@
1
+ import {
2
+ StreamVideoParticipant,
3
+ VideoTrackType,
4
+ } from '@stream-io/video-client';
5
+ import { useTrackDimensions } from '../../../hooks/useTrackDimensions';
6
+
7
+ export const useFloatingVideoDimensions = (
8
+ containerDimensions:
9
+ | {
10
+ width: number;
11
+ height: number;
12
+ }
13
+ | undefined,
14
+ participant: StreamVideoParticipant | undefined,
15
+ trackType: VideoTrackType,
16
+ ) => {
17
+ const containerWidth = containerDimensions?.width ?? 0;
18
+ const { width, height } = useTrackDimensions(participant, trackType);
19
+
20
+ if (width === 0 || height === 0 || containerWidth === 0) {
21
+ return undefined;
22
+ }
23
+
24
+ const aspectRatio = width / height;
25
+
26
+ // based on Android AOSP PiP mode default dimensions algorithm
27
+ // 23% of the container width
28
+ const floatingVideoWidth = containerWidth * 0.23;
29
+ // the height is calculated based on the aspect ratio
30
+ const floatingVideoHeight = floatingVideoWidth / aspectRatio;
31
+
32
+ return {
33
+ width: floatingVideoWidth,
34
+ height: floatingVideoHeight,
35
+ };
36
+ };
@@ -1,11 +1,5 @@
1
1
  import { type StreamReactionType } from '../components';
2
2
 
3
- export const FLOATING_VIDEO_VIEW_STYLE = {
4
- height: 140,
5
- width: 80,
6
- borderRadius: 10,
7
- };
8
-
9
3
  export const defaultEmojiReactions: StreamReactionType[] = [
10
4
  {
11
5
  type: 'reaction',
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  StreamVideoParticipant,
3
+ videoLoggerSystem,
3
4
  type VideoTrackType,
4
- getLogger,
5
5
  } from '@stream-io/video-client';
6
6
  import React, {
7
7
  createContext,
@@ -85,20 +85,20 @@ export const ScreenshotIosContextProvider = ({
85
85
  `${participant.userId}-${videoTrackType}`,
86
86
  );
87
87
  if (!ref || !ref.current) {
88
- getLogger(['ScreenshotIosContextProvider'])(
89
- 'error',
90
- 'Cannot take snapshot: No registered view for this participant',
91
- );
88
+ videoLoggerSystem
89
+ .getLogger('ScreenshotIosContextProvider')
90
+ .error(
91
+ 'Cannot take snapshot: No registered view for this participant',
92
+ );
92
93
  return null;
93
94
  }
94
95
 
95
96
  // Get the native handle for the view
96
97
  const tag = findNodeHandle(ref.current);
97
98
  if (!tag) {
98
- getLogger(['ScreenshotIosContextProvider'])(
99
- 'error',
100
- 'Cannot take snapshot: Cannot get native handle for view',
101
- );
99
+ videoLoggerSystem
100
+ .getLogger('ScreenshotIosContextProvider')
101
+ .error('Cannot take snapshot: Cannot get native handle for view');
102
102
  return null;
103
103
  }
104
104
 
@@ -107,11 +107,9 @@ export const ScreenshotIosContextProvider = ({
107
107
 
108
108
  return base64Image;
109
109
  } catch (error) {
110
- getLogger(['ScreenshotIosContextProvider'])(
111
- 'error',
112
- 'Error taking participant snapshot:',
113
- error,
114
- );
110
+ videoLoggerSystem
111
+ .getLogger('ScreenshotIosContextProvider')
112
+ .error('Error taking participant snapshot:', error);
115
113
  return null;
116
114
  }
117
115
  },
@@ -5,7 +5,7 @@ import {
5
5
  import { useEffect } from 'react';
6
6
  import { StreamVideoRN } from '../../utils';
7
7
  import { initAndroidPushToken } from '../../utils/push/android';
8
- import { getLogger } from '@stream-io/video-client';
8
+ import { videoLoggerSystem } from '@stream-io/video-client';
9
9
 
10
10
  /**
11
11
  * This hook is used to initialize the push token for Android.
@@ -23,11 +23,9 @@ export const useInitAndroidTokenAndRest = () => {
23
23
  initAndroidPushToken(client, pushConfig, (unsubscribeListener) => {
24
24
  unsubscribe = unsubscribeListener;
25
25
  }).catch((error) => {
26
- getLogger(['useInitAndroidTokenAndRest'])(
27
- 'warn',
28
- 'Error in initializing android push token',
29
- error,
30
- );
26
+ videoLoggerSystem
27
+ .getLogger('useInitAndroidTokenAndRest')
28
+ .warn('Error in initializing android push token', error);
31
29
  });
32
30
  return () => {
33
31
  unsubscribe();
@@ -1,4 +1,8 @@
1
- import { CallingState, getLogger, RxUtils } from '@stream-io/video-client';
1
+ import {
2
+ CallingState,
3
+ RxUtils,
4
+ videoLoggerSystem,
5
+ } from '@stream-io/video-client';
2
6
  import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
3
7
  import { NativeModules, Platform } from 'react-native';
4
8
  import { useEffect, useState } from 'react';
@@ -38,9 +42,11 @@ const unsubscribeCallkeepEvents = async (activeCallCid: string | undefined) => {
38
42
  );
39
43
  };
40
44
 
41
- const logger = getLogger(['useIosCallkeepWithCallingStateEffect']);
45
+ const logger = videoLoggerSystem.getLogger(
46
+ 'useIosCallkeepWithCallingStateEffect',
47
+ );
42
48
  const log = (message: string) => {
43
- logger('warn', message);
49
+ logger.warn(message);
44
50
  };
45
51
 
46
52
  /**
@@ -9,9 +9,9 @@ import {
9
9
  useStreamVideoClient,
10
10
  } from '@stream-io/video-react-bindings';
11
11
  import { setPushLogoutCallback } from '../../utils/internal/pushLogoutCallback';
12
- import { getLogger, StreamVideoClient } from '@stream-io/video-client';
12
+ import { StreamVideoClient, videoLoggerSystem } from '@stream-io/video-client';
13
13
 
14
- const logger = getLogger(['useIosVoipPushEventsSetupEffect']);
14
+ const logger = videoLoggerSystem.getLogger('useIosVoipPushEventsSetupEffect');
15
15
 
16
16
  /* VoipPushNotificationLib has support for only one listener type at a time
17
17
  hence to support login and logout scenario of multiple users we keep of the last count of the listener that was added
@@ -29,7 +29,7 @@ function setLogoutCallback(
29
29
  try {
30
30
  await client.removeDevice(token);
31
31
  } catch (err) {
32
- logger('warn', 'PushLogoutCallback - Failed to remove voip token', err);
32
+ logger.warn('PushLogoutCallback - Failed to remove voip token', err);
33
33
  }
34
34
  });
35
35
  }
@@ -66,15 +66,14 @@ export const useIosVoipPushEventsSetupEffect = () => {
66
66
 
67
67
  if (!tokenToSend) return;
68
68
 
69
- logger(
70
- 'debug',
69
+ logger.debug(
71
70
  `Sending voip token as user logged in after token was received, token: ${tokenToSend}`,
72
71
  );
73
72
 
74
73
  client
75
74
  .addVoipDevice(tokenToSend, 'apn', pushProviderName)
76
75
  .then(() => {
77
- logger('debug', `Sent voip token: ${tokenToSend}`);
76
+ logger.debug(`Sent voip token: ${tokenToSend}`);
78
77
  setLogoutCallback(client, tokenToSend, lastVoipTokenRef);
79
78
  lastVoipTokenRef.current = {
80
79
  token: tokenToSend,
@@ -83,7 +82,7 @@ export const useIosVoipPushEventsSetupEffect = () => {
83
82
  setUnsentToken(undefined);
84
83
  })
85
84
  .catch((error) => {
86
- logger('warn', 'Error in sending unsent voip token', error);
85
+ logger.warn('Error in sending unsent voip token', error);
87
86
  });
88
87
  }, [client, connectedUserId, unsentToken]);
89
88
 
@@ -95,8 +94,7 @@ export const useIosVoipPushEventsSetupEffect = () => {
95
94
  }
96
95
  if (!pushConfig.android.incomingCallChannel) {
97
96
  // TODO: remove this check and find a better way once we have telecom integration for android
98
- logger(
99
- 'debug',
97
+ logger.debug(
100
98
  'android incomingCallChannel is not defined, so skipping the useIosVoipPushEventsSetupEffect',
101
99
  );
102
100
  return;
@@ -117,32 +115,30 @@ export const useIosVoipPushEventsSetupEffect = () => {
117
115
  : !token
118
116
  ? 'no token was present (possibly using a simulator)'
119
117
  : 'no user id was present';
120
- logger('debug', `Skipped sending voip token: ${reason}`);
118
+ logger.debug(`Skipped sending voip token: ${reason}`);
121
119
  setUnsentToken(token);
122
120
  return;
123
121
  }
124
122
 
125
123
  const lastVoipToken = lastVoipTokenRef.current;
126
124
  if (lastVoipToken.token === token && lastVoipToken.userId === userId) {
127
- logger(
128
- 'debug',
125
+ logger.debug(
129
126
  `Skipped sending voip token as it is same as last token - token: ${token}, userId: ${userId}`,
130
127
  );
131
128
  return;
132
129
  }
133
130
 
134
- logger('debug', `Sending voip token: ${token} userId: ${userId}`);
131
+ logger.debug(`Sending voip token: ${token} userId: ${userId}`);
135
132
  client
136
133
  .addVoipDevice(token, 'apn', pushProviderName)
137
134
  .then(() => {
138
- logger('debug', `Sent voip token: ${token} userId: ${userId}`);
135
+ logger.debug(`Sent voip token: ${token} userId: ${userId}`);
139
136
  setLogoutCallback(client, token, lastVoipTokenRef);
140
137
  lastVoipTokenRef.current = { token, userId };
141
138
  })
142
139
  .catch((err) => {
143
140
  setUnsentToken(token);
144
- logger(
145
- 'warn',
141
+ logger.warn(
146
142
  `Failed to send voip token: ${token} userId: ${userId}`,
147
143
  err,
148
144
  );
@@ -173,13 +169,12 @@ export const useIosVoipPushEventsSetupEffect = () => {
173
169
  return () => {
174
170
  const userId = client.streamClient._user?.id;
175
171
  if (currentListenerCount !== lastListener.count) {
176
- logger(
177
- 'debug',
172
+ logger.debug(
178
173
  `Skipped removing voip event listeners for user: ${userId}`,
179
174
  );
180
175
  return;
181
176
  }
182
- logger('debug', `Voip event listeners are removed for user: ${userId}`);
177
+ logger.debug(`Voip event listeners are removed for user: ${userId}`);
183
178
  voipPushNotification.removeEventListener('didLoadWithEvents');
184
179
  voipPushNotification.removeEventListener('register');
185
180
  };
@@ -13,7 +13,7 @@ import {
13
13
  import { BehaviorSubject } from 'rxjs';
14
14
  import { distinctUntilChanged, filter } from 'rxjs/operators';
15
15
  import { processCallFromPush } from '../../utils/push/internal/utils';
16
- import { getLogger, StreamVideoClient } from '@stream-io/video-client';
16
+ import { StreamVideoClient, videoLoggerSystem } from '@stream-io/video-client';
17
17
  import type { StreamVideoConfig } from '../../utils/StreamVideoRN/types';
18
18
 
19
19
  /**
@@ -32,10 +32,11 @@ export const useProcessPushCallEffect = () => {
32
32
  return;
33
33
  }
34
34
 
35
- getLogger(['useProcessPushCallEffect'])(
36
- 'debug',
37
- `Adding subscriptions to process incoming call from push notification`,
38
- );
35
+ videoLoggerSystem
36
+ .getLogger('useProcessPushCallEffect')
37
+ .debug(
38
+ `Adding subscriptions to process incoming call from push notification`,
39
+ );
39
40
 
40
41
  // if the user accepts the call from push notification we join the call
41
42
  const acceptedCallSubscription = createCallSubscription(
@@ -96,10 +97,11 @@ const createCallSubscription = (
96
97
  return behaviourSubjectWithCallCid
97
98
  .pipe(distinctUntilChanged(), filter(cidIsNotUndefined))
98
99
  .subscribe(async (callCId) => {
99
- getLogger(['useProcessPushCallEffect'])(
100
- 'debug',
101
- `Processing call from push notification with action: ${action} and callCId: ${callCId}`,
102
- );
100
+ videoLoggerSystem
101
+ .getLogger('useProcessPushCallEffect')
102
+ .debug(
103
+ `Processing call from push notification with action: ${action} and callCId: ${callCId}`,
104
+ );
103
105
  await processCallFromPush(client, callCId, action, pushConfig);
104
106
  behaviourSubjectWithCallCid.next(undefined); // remove the current call id to avoid processing again
105
107
  });