@stream-io/video-react-native-sdk 1.10.16 → 1.10.18

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 (318) hide show
  1. package/CHANGELOG.md +726 -684
  2. package/dist/commonjs/components/Call/CallContent/RTCViewPipIOS.js +1 -0
  3. package/dist/commonjs/components/Call/CallContent/RTCViewPipIOS.js.map +1 -1
  4. package/dist/commonjs/components/Call/CallContent/RTCViewPipNative.js +5 -5
  5. package/dist/commonjs/components/Call/CallContent/RTCViewPipNative.js.map +1 -1
  6. package/dist/commonjs/components/Call/Lobby/Lobby.js.map +1 -1
  7. package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js +1 -1
  8. package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js.map +1 -1
  9. package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js +5 -3
  10. package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js.map +1 -1
  11. package/dist/commonjs/contexts/BackgroundFilters.js +1 -1
  12. package/dist/commonjs/contexts/BackgroundFilters.js.map +1 -1
  13. package/dist/commonjs/hooks/internal/useCallMediaStreamCleanup.js +0 -1
  14. package/dist/commonjs/hooks/internal/useCallMediaStreamCleanup.js.map +1 -1
  15. package/dist/commonjs/hooks/push/useInitAndroidTokenAndRest.js +3 -0
  16. package/dist/commonjs/hooks/push/useInitAndroidTokenAndRest.js.map +1 -1
  17. package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js +19 -7
  18. package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -1
  19. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js +22 -6
  20. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  21. package/dist/commonjs/hooks/useScreenShareButton.js +1 -3
  22. package/dist/commonjs/hooks/useScreenShareButton.js.map +1 -1
  23. package/dist/commonjs/hooks/useTrackDimensions.js +1 -1
  24. package/dist/commonjs/hooks/useTrackDimensions.js.map +1 -1
  25. package/dist/commonjs/providers/StreamCall/DeviceStats.js +2 -2
  26. package/dist/commonjs/providers/StreamCall/DeviceStats.js.map +1 -1
  27. package/dist/commonjs/utils/internal/optionallibs/gestureHandler.js +1 -1
  28. package/dist/commonjs/utils/internal/optionallibs/gestureHandler.js.map +1 -1
  29. package/dist/commonjs/utils/internal/optionallibs/reanimated.js +1 -1
  30. package/dist/commonjs/utils/internal/optionallibs/reanimated.js.map +1 -1
  31. package/dist/commonjs/utils/internal/pushLogoutCallback.js +1 -1
  32. package/dist/commonjs/utils/internal/pushLogoutCallback.js.map +1 -1
  33. package/dist/commonjs/utils/push/android.js +22 -15
  34. package/dist/commonjs/utils/push/android.js.map +1 -1
  35. package/dist/commonjs/utils/push/internal/ios.js +104 -0
  36. package/dist/commonjs/utils/push/internal/ios.js.map +1 -0
  37. package/dist/commonjs/utils/push/ios.js +15 -107
  38. package/dist/commonjs/utils/push/ios.js.map +1 -1
  39. package/dist/commonjs/utils/push/libs/callkeep.js +1 -1
  40. package/dist/commonjs/utils/push/libs/callkeep.js.map +1 -1
  41. package/dist/commonjs/utils/push/libs/expoNotifications.js +10 -2
  42. package/dist/commonjs/utils/push/libs/expoNotifications.js.map +1 -1
  43. package/dist/commonjs/utils/push/libs/firebaseMessaging/index.js +1 -1
  44. package/dist/commonjs/utils/push/libs/firebaseMessaging/index.js.map +1 -1
  45. package/dist/commonjs/utils/push/libs/firebaseMessaging/lib.js +1 -1
  46. package/dist/commonjs/utils/push/libs/firebaseMessaging/lib.js.map +1 -1
  47. package/dist/commonjs/utils/push/libs/iosPushNotification.js +1 -1
  48. package/dist/commonjs/utils/push/libs/iosPushNotification.js.map +1 -1
  49. package/dist/commonjs/utils/push/libs/notifee/lib.js +1 -1
  50. package/dist/commonjs/utils/push/libs/notifee/lib.js.map +1 -1
  51. package/dist/commonjs/utils/push/libs/voipPushNotification.js +1 -1
  52. package/dist/commonjs/utils/push/libs/voipPushNotification.js.map +1 -1
  53. package/dist/commonjs/utils/push/setupIosCallKeepEvents.js +7 -2
  54. package/dist/commonjs/utils/push/setupIosCallKeepEvents.js.map +1 -1
  55. package/dist/commonjs/utils/push/setupIosVoipPushEvents.js +7 -2
  56. package/dist/commonjs/utils/push/setupIosVoipPushEvents.js.map +1 -1
  57. package/dist/commonjs/version.js +1 -1
  58. package/dist/module/components/Call/CallContent/CallContent.js +2 -2
  59. package/dist/module/components/Call/CallContent/CallContent.js.map +1 -1
  60. package/dist/module/components/Call/CallContent/RTCViewPipIOS.js +2 -1
  61. package/dist/module/components/Call/CallContent/RTCViewPipIOS.js.map +1 -1
  62. package/dist/module/components/Call/CallContent/RTCViewPipNative.js +6 -6
  63. package/dist/module/components/Call/CallContent/RTCViewPipNative.js.map +1 -1
  64. package/dist/module/components/Call/CallControls/internal/ReactionsPicker.js +1 -1
  65. package/dist/module/components/Call/CallControls/internal/ReactionsPicker.js.map +1 -1
  66. package/dist/module/components/Call/Lobby/Lobby.js.map +1 -1
  67. package/dist/module/components/Call/Lobby/LobbyFooter.js +1 -1
  68. package/dist/module/components/Call/Lobby/LobbyFooter.js.map +1 -1
  69. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js +4 -4
  70. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js.map +1 -1
  71. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js +7 -5
  72. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js.map +1 -1
  73. package/dist/module/components/Participant/ParticipantView/ParticipantReaction.js +1 -1
  74. package/dist/module/components/Participant/ParticipantView/ParticipantReaction.js.map +1 -1
  75. package/dist/module/components/Participant/ParticipantView/SpeechIndicator.js +1 -1
  76. package/dist/module/components/Participant/ParticipantView/SpeechIndicator.js.map +1 -1
  77. package/dist/module/contexts/BackgroundFilters.js +1 -1
  78. package/dist/module/contexts/BackgroundFilters.js.map +1 -1
  79. package/dist/module/hooks/internal/useCallMediaStreamCleanup.js +0 -1
  80. package/dist/module/hooks/internal/useCallMediaStreamCleanup.js.map +1 -1
  81. package/dist/module/hooks/push/useInitAndroidTokenAndRest.js +3 -0
  82. package/dist/module/hooks/push/useInitAndroidTokenAndRest.js.map +1 -1
  83. package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js +19 -7
  84. package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -1
  85. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +23 -7
  86. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  87. package/dist/module/hooks/push/useProcessPushCallEffect.js +1 -1
  88. package/dist/module/hooks/push/useProcessPushCallEffect.js.map +1 -1
  89. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +2 -2
  90. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  91. package/dist/module/hooks/usePermissionRequest.js +1 -1
  92. package/dist/module/hooks/usePermissionRequest.js.map +1 -1
  93. package/dist/module/hooks/useScreenShareButton.js +3 -5
  94. package/dist/module/hooks/useScreenShareButton.js.map +1 -1
  95. package/dist/module/hooks/useTrackDimensions.js +2 -2
  96. package/dist/module/hooks/useTrackDimensions.js.map +1 -1
  97. package/dist/module/providers/StreamCall/DeviceStats.js +4 -4
  98. package/dist/module/providers/StreamCall/DeviceStats.js.map +1 -1
  99. package/dist/module/utils/internal/optionallibs/gestureHandler.js +1 -1
  100. package/dist/module/utils/internal/optionallibs/gestureHandler.js.map +1 -1
  101. package/dist/module/utils/internal/optionallibs/reanimated.js +1 -1
  102. package/dist/module/utils/internal/optionallibs/reanimated.js.map +1 -1
  103. package/dist/module/utils/internal/pushLogoutCallback.js +1 -1
  104. package/dist/module/utils/internal/pushLogoutCallback.js.map +1 -1
  105. package/dist/module/utils/push/android.js +25 -18
  106. package/dist/module/utils/push/android.js.map +1 -1
  107. package/dist/module/utils/push/internal/ios.js +97 -0
  108. package/dist/module/utils/push/internal/ios.js.map +1 -0
  109. package/dist/module/utils/push/internal/utils.js +1 -1
  110. package/dist/module/utils/push/internal/utils.js.map +1 -1
  111. package/dist/module/utils/push/ios.js +18 -109
  112. package/dist/module/utils/push/ios.js.map +1 -1
  113. package/dist/module/utils/push/libs/callkeep.js +1 -1
  114. package/dist/module/utils/push/libs/callkeep.js.map +1 -1
  115. package/dist/module/utils/push/libs/expoNotifications.js +9 -2
  116. package/dist/module/utils/push/libs/expoNotifications.js.map +1 -1
  117. package/dist/module/utils/push/libs/firebaseMessaging/index.js +1 -1
  118. package/dist/module/utils/push/libs/firebaseMessaging/index.js.map +1 -1
  119. package/dist/module/utils/push/libs/firebaseMessaging/lib.js +1 -1
  120. package/dist/module/utils/push/libs/firebaseMessaging/lib.js.map +1 -1
  121. package/dist/module/utils/push/libs/iosPushNotification.js +1 -1
  122. package/dist/module/utils/push/libs/iosPushNotification.js.map +1 -1
  123. package/dist/module/utils/push/libs/notifee/index.js.map +1 -1
  124. package/dist/module/utils/push/libs/notifee/lib.js +1 -1
  125. package/dist/module/utils/push/libs/notifee/lib.js.map +1 -1
  126. package/dist/module/utils/push/libs/voipPushNotification.js +1 -1
  127. package/dist/module/utils/push/libs/voipPushNotification.js.map +1 -1
  128. package/dist/module/utils/push/setupIosCallKeepEvents.js +8 -4
  129. package/dist/module/utils/push/setupIosCallKeepEvents.js.map +1 -1
  130. package/dist/module/utils/push/setupIosVoipPushEvents.js +7 -2
  131. package/dist/module/utils/push/setupIosVoipPushEvents.js.map +1 -1
  132. package/dist/module/version.js +1 -1
  133. package/dist/typescript/components/Call/CallContent/CallContent.d.ts.map +1 -1
  134. package/dist/typescript/components/Call/CallContent/RTCViewPipIOS.d.ts.map +1 -1
  135. package/dist/typescript/components/Call/CallContent/RTCViewPipNative.d.ts.map +1 -1
  136. package/dist/typescript/components/Call/CallControls/AcceptCallButton.d.ts.map +1 -1
  137. package/dist/typescript/components/Call/CallControls/CallControls.d.ts.map +1 -1
  138. package/dist/typescript/components/Call/CallControls/CallControlsButton.d.ts.map +1 -1
  139. package/dist/typescript/components/Call/CallControls/HangupCallButton.d.ts.map +1 -1
  140. package/dist/typescript/components/Call/CallControls/IncomingCallControls.d.ts.map +1 -1
  141. package/dist/typescript/components/Call/CallControls/OutgoingCallControls.d.ts.map +1 -1
  142. package/dist/typescript/components/Call/CallControls/ReactionsButton.d.ts.map +1 -1
  143. package/dist/typescript/components/Call/CallControls/RejectCallButton.d.ts.map +1 -1
  144. package/dist/typescript/components/Call/CallControls/ScreenShareToggleButton.d.ts.map +1 -1
  145. package/dist/typescript/components/Call/CallControls/ToggleAudioPreviewButton.d.ts.map +1 -1
  146. package/dist/typescript/components/Call/CallControls/ToggleAudioPublishingButton.d.ts.map +1 -1
  147. package/dist/typescript/components/Call/CallControls/ToggleCameraFaceButton.d.ts.map +1 -1
  148. package/dist/typescript/components/Call/CallControls/ToggleVideoPreviewButton.d.ts.map +1 -1
  149. package/dist/typescript/components/Call/CallControls/ToggleVideoPublishingButton.d.ts.map +1 -1
  150. package/dist/typescript/components/Call/CallControls/internal/ReactionsPicker.d.ts.map +1 -1
  151. package/dist/typescript/components/Call/CallLayout/CallParticipantsGrid.d.ts.map +1 -1
  152. package/dist/typescript/components/Call/CallLayout/CallParticipantsSpotlight.d.ts.map +1 -1
  153. package/dist/typescript/components/Call/CallParticipantsList/CallParticipantsList.d.ts.map +1 -1
  154. package/dist/typescript/components/Call/Lobby/JoinCallButton.d.ts.map +1 -1
  155. package/dist/typescript/components/Call/Lobby/Lobby.d.ts.map +1 -1
  156. package/dist/typescript/components/Call/Lobby/LobbyFooter.d.ts.map +1 -1
  157. package/dist/typescript/components/Call/RingingCallContent/CallLeftIndicator.d.ts.map +1 -1
  158. package/dist/typescript/components/Call/RingingCallContent/CallPreparingIndicator.d.ts.map +1 -1
  159. package/dist/typescript/components/Call/RingingCallContent/IncomingCall.d.ts.map +1 -1
  160. package/dist/typescript/components/Call/RingingCallContent/OutgoingCall.d.ts.map +1 -1
  161. package/dist/typescript/components/Call/RingingCallContent/RingingCallContent.d.ts.map +1 -1
  162. package/dist/typescript/components/Call/RingingCallContent/TextBasedIndicator.d.ts.map +1 -1
  163. package/dist/typescript/components/Call/RingingCallContent/UserInfo.d.ts.map +1 -1
  164. package/dist/typescript/components/Livestream/HostLivestream/HostLivestream.d.ts.map +1 -1
  165. package/dist/typescript/components/Livestream/LivestreamControls/HostLivestreamControls.d.ts.map +1 -1
  166. package/dist/typescript/components/Livestream/LivestreamControls/HostStartStreamButton.d.ts.map +1 -1
  167. package/dist/typescript/components/Livestream/LivestreamControls/LivestreamMediaControls.d.ts.map +1 -1
  168. package/dist/typescript/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.d.ts.map +1 -1
  169. package/dist/typescript/components/Livestream/LivestreamControls/ViewerLivestreamControls.d.ts.map +1 -1
  170. package/dist/typescript/components/Livestream/LivestreamLayout/LivestreamLayout.d.ts.map +1 -1
  171. package/dist/typescript/components/Livestream/LivestreamPlayer/LivestreamPlayer.d.ts.map +1 -1
  172. package/dist/typescript/components/Livestream/LivestreamTopView/DurationBadge.d.ts.map +1 -1
  173. package/dist/typescript/components/Livestream/LivestreamTopView/FollowerCount.d.ts.map +1 -1
  174. package/dist/typescript/components/Livestream/LivestreamTopView/HostLivestreamTopView.d.ts.map +1 -1
  175. package/dist/typescript/components/Livestream/LivestreamTopView/LiveIndicator.d.ts.map +1 -1
  176. package/dist/typescript/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.d.ts.map +1 -1
  177. package/dist/typescript/components/Livestream/ViewerLivestream/ViewerLivestream.d.ts.map +1 -1
  178. package/dist/typescript/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.d.ts.map +1 -1
  179. package/dist/typescript/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.d.ts.map +1 -1
  180. package/dist/typescript/components/Participant/FloatingParticipantView/index.d.ts.map +1 -1
  181. package/dist/typescript/components/Participant/ParticipantView/ParticipantLabel.d.ts.map +1 -1
  182. package/dist/typescript/components/Participant/ParticipantView/ParticipantNetworkQualityIndicator.d.ts.map +1 -1
  183. package/dist/typescript/components/Participant/ParticipantView/ParticipantReaction.d.ts.map +1 -1
  184. package/dist/typescript/components/Participant/ParticipantView/ParticipantVideoFallback.d.ts.map +1 -1
  185. package/dist/typescript/components/Participant/ParticipantView/ParticipantView.d.ts.map +1 -1
  186. package/dist/typescript/components/Participant/ParticipantView/SpeechIndicator.d.ts.map +1 -1
  187. package/dist/typescript/components/Participant/ParticipantView/VideoRenderer.d.ts.map +1 -1
  188. package/dist/typescript/components/utility/Avatar.d.ts.map +1 -1
  189. package/dist/typescript/components/utility/ScreenShareOverlay.d.ts.map +1 -1
  190. package/dist/typescript/contexts/BackgroundFilters.d.ts.map +1 -1
  191. package/dist/typescript/contexts/ThemeContext.d.ts.map +1 -1
  192. package/dist/typescript/hooks/internal/useCallMediaStreamCleanup.d.ts.map +1 -1
  193. package/dist/typescript/hooks/push/useInitAndroidTokenAndRest.d.ts.map +1 -1
  194. package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts.map +1 -1
  195. package/dist/typescript/hooks/push/useIosVoipPushEventsSetupEffect.d.ts.map +1 -1
  196. package/dist/typescript/hooks/usePaginatedLayoutSortPreset.d.ts.map +1 -1
  197. package/dist/typescript/hooks/usePermissionNotification.d.ts.map +1 -1
  198. package/dist/typescript/hooks/useScreenShareButton.d.ts +21 -1
  199. package/dist/typescript/hooks/useScreenShareButton.d.ts.map +1 -1
  200. package/dist/typescript/icons/Back.d.ts.map +1 -1
  201. package/dist/typescript/icons/CameraSwitch.d.ts.map +1 -1
  202. package/dist/typescript/icons/IconWrapper.d.ts.map +1 -1
  203. package/dist/typescript/icons/Lock.d.ts.map +1 -1
  204. package/dist/typescript/icons/Mic.d.ts.map +1 -1
  205. package/dist/typescript/icons/MicOff.d.ts.map +1 -1
  206. package/dist/typescript/icons/Phone.d.ts.map +1 -1
  207. package/dist/typescript/icons/PhoneDown.d.ts.map +1 -1
  208. package/dist/typescript/icons/PinVertical.d.ts.map +1 -1
  209. package/dist/typescript/icons/Reaction.d.ts.map +1 -1
  210. package/dist/typescript/icons/ScreenShare.d.ts.map +1 -1
  211. package/dist/typescript/icons/ScreenShareIndicator.d.ts.map +1 -1
  212. package/dist/typescript/icons/Settings.d.ts.map +1 -1
  213. package/dist/typescript/icons/Spotlight.d.ts.map +1 -1
  214. package/dist/typescript/icons/StopScreenShare.d.ts.map +1 -1
  215. package/dist/typescript/icons/ThreeDots.d.ts.map +1 -1
  216. package/dist/typescript/icons/TopViewBackground.d.ts.map +1 -1
  217. package/dist/typescript/icons/Video.d.ts.map +1 -1
  218. package/dist/typescript/icons/VideoSlash.d.ts.map +1 -1
  219. package/dist/typescript/providers/StreamCall/index.d.ts.map +1 -1
  220. package/dist/typescript/providers/StreamVideo.d.ts.map +1 -1
  221. package/dist/typescript/utils/StreamVideoRN/types.d.ts +2 -2
  222. package/dist/typescript/utils/hooks/usePrevious.d.ts.map +1 -1
  223. package/dist/typescript/utils/index.d.ts.map +1 -1
  224. package/dist/typescript/utils/internal/optionallibs/gestureHandler.d.ts.map +1 -1
  225. package/dist/typescript/utils/internal/optionallibs/reanimated.d.ts.map +1 -1
  226. package/dist/typescript/utils/internal/pushLogoutCallback.d.ts +1 -1
  227. package/dist/typescript/utils/internal/pushLogoutCallback.d.ts.map +1 -1
  228. package/dist/typescript/utils/push/android.d.ts +2 -2
  229. package/dist/typescript/utils/push/android.d.ts.map +1 -1
  230. package/dist/typescript/utils/push/internal/ios.d.ts +3 -0
  231. package/dist/typescript/utils/push/internal/ios.d.ts.map +1 -0
  232. package/dist/typescript/utils/push/internal/utils.d.ts.map +1 -1
  233. package/dist/typescript/utils/push/ios.d.ts +0 -1
  234. package/dist/typescript/utils/push/ios.d.ts.map +1 -1
  235. package/dist/typescript/utils/push/libs/expoNotifications.d.ts +2 -1
  236. package/dist/typescript/utils/push/libs/expoNotifications.d.ts.map +1 -1
  237. package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
  238. package/dist/typescript/utils/push/libs/iosPushNotification.d.ts +1 -1
  239. package/dist/typescript/utils/push/libs/iosPushNotification.d.ts.map +1 -1
  240. package/dist/typescript/utils/push/libs/notifee/index.d.ts.map +1 -1
  241. package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts.map +1 -1
  242. package/dist/typescript/utils/push/setupIosVoipPushEvents.d.ts.map +1 -1
  243. package/dist/typescript/version.d.ts +1 -1
  244. package/expo-config-plugin/dist/withAndroidManifest.js +0 -1
  245. package/expo-config-plugin/dist/withAppDelegate.js +1 -1
  246. package/expo-config-plugin/dist/withIosScreenCapture/withPlistUpdates.js +1 -1
  247. package/expo-config-plugin/dist/withiOSInfoPlist.js +3 -1
  248. package/package.json +21 -23
  249. package/src/components/Call/CallContent/CallContent.tsx +3 -3
  250. package/src/components/Call/CallContent/RTCViewPipIOS.tsx +6 -4
  251. package/src/components/Call/CallContent/RTCViewPipNative.tsx +5 -5
  252. package/src/components/Call/CallControls/CallControlsButton.tsx +1 -1
  253. package/src/components/Call/CallControls/LobbyControls.tsx +1 -1
  254. package/src/components/Call/CallControls/ScreenShareToggleButton.tsx +1 -1
  255. package/src/components/Call/CallControls/internal/ReactionsPicker.tsx +4 -4
  256. package/src/components/Call/CallLayout/CallParticipantsSpotlight.tsx +1 -1
  257. package/src/components/Call/CallParticipantsList/CallParticipantsList.tsx +5 -5
  258. package/src/components/Call/Lobby/JoinCallButton.tsx +1 -1
  259. package/src/components/Call/Lobby/Lobby.tsx +2 -2
  260. package/src/components/Call/Lobby/LobbyFooter.tsx +2 -2
  261. package/src/components/Call/RingingCallContent/UserInfo.tsx +1 -1
  262. package/src/components/Livestream/HostLivestream/HostLivestream.tsx +1 -1
  263. package/src/components/Livestream/LivestreamControls/LivestreamScreenShareToggleButton.tsx +1 -1
  264. package/src/components/Livestream/LivestreamLayout/LivestreamLayout.tsx +1 -1
  265. package/src/components/Livestream/LivestreamTopView/DurationBadge.tsx +1 -1
  266. package/src/components/Livestream/ViewerLivestream/ViewerLivestream.tsx +1 -1
  267. package/src/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.tsx +10 -10
  268. package/src/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.tsx +15 -13
  269. package/src/components/Participant/ParticipantView/ParticipantLabel.tsx +1 -1
  270. package/src/components/Participant/ParticipantView/ParticipantNetworkQualityIndicator.tsx +1 -1
  271. package/src/components/Participant/ParticipantView/ParticipantReaction.tsx +3 -3
  272. package/src/components/Participant/ParticipantView/ParticipantView.tsx +1 -1
  273. package/src/components/Participant/ParticipantView/SpeechIndicator.tsx +3 -3
  274. package/src/components/Participant/ParticipantView/VideoRenderer.tsx +1 -1
  275. package/src/contexts/BackgroundFilters.tsx +7 -7
  276. package/src/contexts/StreamVideoContext.tsx +3 -3
  277. package/src/contexts/ThemeContext.tsx +2 -2
  278. package/src/hooks/internal/useCallMediaStreamCleanup.ts +2 -6
  279. package/src/hooks/push/useInitAndroidTokenAndRest.ts +7 -0
  280. package/src/hooks/push/useIosCallkeepWithCallingStateEffect.ts +55 -28
  281. package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +46 -17
  282. package/src/hooks/push/useProcessPushCallEffect.ts +8 -8
  283. package/src/hooks/push/useProcessPushNonRingingCallEffect.ts +1 -1
  284. package/src/hooks/useAndroidKeepCallAliveEffect.ts +10 -10
  285. package/src/hooks/useAutoEnterPiPEffect.tsx +2 -2
  286. package/src/hooks/useIsIosScreenshareBroadcastStarted.ts +2 -2
  287. package/src/hooks/usePaginatedLayoutSortPreset.ts +1 -1
  288. package/src/hooks/usePermissionNotification.tsx +1 -1
  289. package/src/hooks/usePermissionRequest.tsx +4 -4
  290. package/src/hooks/useScreenShareButton.ts +9 -10
  291. package/src/hooks/useTrackDimensions.ts +3 -3
  292. package/src/providers/StreamCall/AppStateListener.tsx +6 -6
  293. package/src/providers/StreamCall/DeviceStats.tsx +8 -8
  294. package/src/providers/StreamVideo.tsx +1 -1
  295. package/src/utils/StreamVideoRN/index.ts +4 -4
  296. package/src/utils/StreamVideoRN/types.ts +4 -4
  297. package/src/utils/enterPiPAndroid.ts +1 -1
  298. package/src/utils/index.ts +2 -2
  299. package/src/utils/internal/newNotificationCallbacks.ts +3 -3
  300. package/src/utils/internal/optionallibs/gestureHandler.ts +1 -1
  301. package/src/utils/internal/optionallibs/reanimated.ts +1 -1
  302. package/src/utils/internal/pushLogoutCallback.ts +1 -1
  303. package/src/utils/push/android.ts +63 -52
  304. package/src/utils/push/internal/ios.ts +133 -0
  305. package/src/utils/push/internal/utils.ts +10 -10
  306. package/src/utils/push/ios.ts +38 -164
  307. package/src/utils/push/libs/callkeep.ts +2 -2
  308. package/src/utils/push/libs/expoNotifications.ts +15 -4
  309. package/src/utils/push/libs/firebaseMessaging/index.ts +4 -4
  310. package/src/utils/push/libs/firebaseMessaging/lib.ts +1 -1
  311. package/src/utils/push/libs/iosPushNotification.ts +4 -4
  312. package/src/utils/push/libs/notifee/index.ts +7 -7
  313. package/src/utils/push/libs/notifee/lib.ts +1 -1
  314. package/src/utils/push/libs/voipPushNotification.ts +2 -2
  315. package/src/utils/push/setupIosCallKeepEvents.ts +24 -17
  316. package/src/utils/push/setupIosVoipPushEvents.ts +12 -4
  317. package/src/utils/push/utils.ts +2 -2
  318. package/src/version.ts +1 -1
@@ -4,17 +4,16 @@ import {
4
4
  OwnCapability,
5
5
  } from '@stream-io/video-client';
6
6
  import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
7
- import React, { useRef, useEffect } from 'react';
8
- import { Platform, findNodeHandle, NativeModules } from 'react-native';
7
+ import React, { useEffect, useRef } from 'react';
8
+ import { findNodeHandle, NativeModules, Platform } from 'react-native';
9
9
  import { usePrevious } from '../utils/hooks';
10
10
  import { useIsIosScreenshareBroadcastStarted } from './useIsIosScreenshareBroadcastStarted';
11
11
 
12
12
  // ios >= 14.0 or android - platform restrictions
13
13
  const CanDeviceScreenShare =
14
14
  (Platform.OS === 'ios' &&
15
- // @ts-ignore
16
- Number.parseInt(Platform.Version.split('.')[0], 10) >= 14,
17
- 10) || Platform.OS === 'android';
15
+ Number.parseInt(Platform.Version.split('.')[0], 10) >= 14) ||
16
+ Platform.OS === 'android';
18
17
 
19
18
  export const useScreenShareButton = (
20
19
  /**
@@ -36,7 +35,7 @@ export const useScreenShareButton = (
36
35
  * Handler to be called when the permissions to stream screen share media is missing
37
36
  *
38
37
  */
39
- onMissingScreenShareStreamPermission?: () => void
38
+ onMissingScreenShareStreamPermission?: () => void,
40
39
  ) => {
41
40
  const call = useCall();
42
41
  const { useLocalParticipant, useCallSettings, useOwnCapabilities } =
@@ -44,7 +43,7 @@ export const useScreenShareButton = (
44
43
  const callSettings = useCallSettings();
45
44
  const ownCapabilities = useOwnCapabilities();
46
45
  const hasScreenSharingPermissions = ownCapabilities?.includes(
47
- OwnCapability.SCREENSHARE
46
+ OwnCapability.SCREENSHARE,
48
47
  );
49
48
  const isScreenSharingEnabledInCall = callSettings?.screensharing.enabled;
50
49
 
@@ -55,7 +54,7 @@ export const useScreenShareButton = (
55
54
 
56
55
  const iosScreenShareStartedFromSystem = useIsIosScreenshareBroadcastStarted();
57
56
  const prevIosScreenShareStartedFromSystem = usePrevious(
58
- iosScreenShareStartedFromSystem
57
+ iosScreenShareStartedFromSystem,
59
58
  );
60
59
 
61
60
  const localParticipant = useLocalParticipant();
@@ -91,7 +90,7 @@ export const useScreenShareButton = (
91
90
  const logger = getLogger(['useScreenShareButton']);
92
91
  logger(
93
92
  'info',
94
- 'User does not have permissions to stream the screen share media, calling onMissingScreenShareStreamPermission handler if present'
93
+ 'User does not have permissions to stream the screen share media, calling onMissingScreenShareStreamPermission handler if present',
95
94
  );
96
95
  onMissingScreenShareStreamPermission?.();
97
96
  }
@@ -111,7 +110,7 @@ export const useScreenShareButton = (
111
110
  logger(
112
111
  'info',
113
112
  'User opted to not give permissions to start a screen share stream',
114
- error
113
+ error,
115
114
  );
116
115
  }
117
116
  }
@@ -3,7 +3,7 @@ import {
3
3
  type VideoTrackType,
4
4
  } from '@stream-io/video-client';
5
5
  import { useCall } from '@stream-io/video-react-bindings';
6
- import { useState, useEffect } from 'react';
6
+ import { useEffect, useState } from 'react';
7
7
 
8
8
  /**
9
9
  * This is a utility hook to get the dimensions of the video track of the participant.
@@ -12,7 +12,7 @@ import { useState, useEffect } from 'react';
12
12
  */
13
13
  export function useTrackDimensions(
14
14
  participant: StreamVideoParticipant,
15
- trackType: VideoTrackType
15
+ trackType: VideoTrackType,
16
16
  ) {
17
17
  const [trackDimensions, setTrackDimensions] = useState({
18
18
  width: 0,
@@ -28,7 +28,7 @@ export function useTrackDimensions(
28
28
  const stream =
29
29
  trackType === 'screenShareTrack' ? screenShareStream : videoStream;
30
30
  if (!stream) return;
31
- const [track] = stream?.getVideoTracks();
31
+ const [track] = stream.getVideoTracks();
32
32
  if (!track) return;
33
33
  const { width = 0, height = 0 } = track.getSettings();
34
34
  setTrackDimensions((prev) => {
@@ -44,20 +44,20 @@ export const AppStateListener = () => {
44
44
  logger(
45
45
  'debug',
46
46
  'Initial PiP mode on mount (after asking native module) set to ',
47
- !!isInPiP
47
+ !!isInPiP,
48
48
  );
49
- }
49
+ },
50
50
  );
51
51
 
52
52
  const eventEmitter = new NativeEventEmitter(
53
- NativeModules.StreamVideoReactNative
53
+ NativeModules.StreamVideoReactNative,
54
54
  );
55
55
 
56
56
  const subscriptionPiPChange = eventEmitter.addListener(
57
57
  PIP_CHANGE_EVENT,
58
58
  (isInPiPMode: boolean) => {
59
59
  isInPiPModeAndroid$.next(isInPiPMode);
60
- }
60
+ },
61
61
  );
62
62
 
63
63
  return () => {
@@ -83,7 +83,7 @@ export const AppStateListener = () => {
83
83
  });
84
84
  logger(
85
85
  'debug',
86
- 'Disable and reenable camera as app came to foreground'
86
+ 'Disable and reenable camera as app came to foreground',
87
87
  );
88
88
  } else {
89
89
  if (cameraDisabledByAppState.current) {
@@ -124,7 +124,7 @@ export const AppStateListener = () => {
124
124
  }
125
125
  disableCameraIfNeeded();
126
126
  }
127
- }
127
+ },
128
128
  );
129
129
  } else {
130
130
  disableCameraIfNeeded();
@@ -2,10 +2,10 @@ import { useCallStateHooks } from '@stream-io/video-react-bindings';
2
2
  import { useEffect } from 'react';
3
3
  import {
4
4
  CallingState,
5
- setThermalState,
6
5
  setPowerState,
6
+ setThermalState,
7
7
  } from '@stream-io/video-client';
8
- import { NativeModules, Platform, NativeEventEmitter } from 'react-native';
8
+ import { NativeEventEmitter, NativeModules, Platform } from 'react-native';
9
9
 
10
10
  const eventEmitter = NativeModules?.StreamVideoReactNative
11
11
  ? new NativeEventEmitter(NativeModules?.StreamVideoReactNative)
@@ -24,21 +24,21 @@ export const DeviceStats = () => {
24
24
  }
25
25
 
26
26
  NativeModules?.StreamVideoReactNative.isLowPowerModeEnabled().then(
27
- (initialPowerMode: boolean) => setPowerState(initialPowerMode)
27
+ (initialPowerMode: boolean) => setPowerState(initialPowerMode),
28
28
  );
29
29
 
30
- let powerModeSubscription = eventEmitter?.addListener(
30
+ const powerModeSubscription = eventEmitter?.addListener(
31
31
  'isLowPowerModeEnabled',
32
- (isLowPowerMode: boolean) => setPowerState(isLowPowerMode)
32
+ (isLowPowerMode: boolean) => setPowerState(isLowPowerMode),
33
33
  );
34
34
 
35
35
  NativeModules?.StreamVideoReactNative.currentThermalState().then(
36
- (initialState: string) => setThermalState(initialState)
36
+ (initialState: string) => setThermalState(initialState),
37
37
  );
38
38
 
39
- let thermalStateSubscription = eventEmitter?.addListener(
39
+ const thermalStateSubscription = eventEmitter?.addListener(
40
40
  'thermalStateDidChange',
41
- (thermalState: string) => setThermalState(thermalState)
41
+ (thermalState: string) => setThermalState(thermalState),
42
42
  );
43
43
 
44
44
  // on android we need to explicitly start and stop the thermal status updates
@@ -24,7 +24,7 @@ export const StreamVideo = (
24
24
  StreamI18nProviderProps & {
25
25
  style?: DeepPartial<Theme>;
26
26
  }
27
- >
27
+ >,
28
28
  ) => {
29
29
  const {
30
30
  client,
@@ -42,7 +42,7 @@ export class StreamVideoRN {
42
42
  static updateAndroidIncomingCallChannel(
43
43
  updateChannel: Partial<
44
44
  NonNullable<StreamVideoConfig['push']>['android']['incomingCallChannel']
45
- >
45
+ >,
46
46
  ) {
47
47
  const prevChannel = this.config.push?.android?.incomingCallChannel;
48
48
  if (prevChannel) {
@@ -80,7 +80,7 @@ export class StreamVideoRN {
80
80
  throw new Error(
81
81
  `Support for navigateAcceptCall or navigateToIncomingCall in pushConfig has been removed.
82
82
  Please watch for incoming and outgoing calls in the root component of your app.
83
- Please see https://getstream.io/video/docs/react-native/advanced/ringing-calls/#watch-for-incoming-and-outgoing-calls for more information.`
83
+ Please see https://getstream.io/video/docs/react-native/advanced/ringing-calls/#watch-for-incoming-and-outgoing-calls for more information.`,
84
84
  );
85
85
  }
86
86
 
@@ -101,7 +101,7 @@ export class StreamVideoRN {
101
101
  static onPushLogout() {
102
102
  if (pushLogoutCallbacks.current) {
103
103
  return Promise.all(
104
- pushLogoutCallbacks.current.map((callback) => callback())
104
+ pushLogoutCallbacks.current.map((callback) => callback()),
105
105
  ).then(() => {});
106
106
  }
107
107
  return Promise.resolve();
@@ -117,7 +117,7 @@ export class StreamVideoRN {
117
117
  * @returns Unsubscribe function
118
118
  */
119
119
  static addOnNewCallNotificationListener(
120
- callback: NewCallNotificationCallback
120
+ callback: NewCallNotificationCallback,
121
121
  ) {
122
122
  if (!newNotificationCallbacks.current) {
123
123
  newNotificationCallbacks.current = [callback];
@@ -39,8 +39,8 @@ export type StreamVideoConfig = {
39
39
  */
40
40
  smallIcon?: string;
41
41
  /**
42
- * The name for the alias of push provider used for Android
43
- * Pass undefined if you will not be using stream's push notifications but still want to use the functionality of the SDK
42
+ * The name for the alias of push provider used for Android.
43
+ * Pass undefined if you will not be using stream's push notifications but still want to use the functionality of the SDK.
44
44
  * @example "production-fcm-video" or "staging-fcm-video" based on the environment
45
45
  */
46
46
  pushProviderName?: string;
@@ -101,7 +101,7 @@ export type StreamVideoConfig = {
101
101
  callNotificationTextGetters?: {
102
102
  getTitle: (
103
103
  type: NonRingingPushEvent,
104
- createdUserName: string
104
+ createdUserName: string,
105
105
  ) => string;
106
106
  getBody: (type: NonRingingPushEvent, createdUserName: string) => string;
107
107
  };
@@ -134,7 +134,7 @@ export type StreamVideoConfig = {
134
134
  /** Callback that is called when a non ringing push notification was tapped */
135
135
  onTapNonRingingCallNotification?: (
136
136
  call_cid: string,
137
- type: NonRingingPushEvent
137
+ type: NonRingingPushEvent,
138
138
  ) => void;
139
139
  };
140
140
  foregroundService: {
@@ -6,6 +6,6 @@ export function enterPiPAndroid(width?: number, height?: number) {
6
6
  }
7
7
  return NativeModules?.StreamVideoReactNative?.enterPipMode(
8
8
  width ? Math.floor(width) : 0,
9
- height ? Math.floor(height) : 0
9
+ height ? Math.floor(height) : 0,
10
10
  );
11
11
  }
@@ -1,11 +1,11 @@
1
1
  // Utility to join strings with commas and 'and'
2
2
  export const generateCallTitle = (
3
3
  memberUserIds: string[],
4
- totalMembersToShow?: number
4
+ totalMembersToShow?: number,
5
5
  ) => {
6
6
  const supportedAmountOfMemberUserIds = memberUserIds.slice(
7
7
  0,
8
- totalMembersToShow
8
+ totalMembersToShow,
9
9
  );
10
10
  if (
11
11
  totalMembersToShow &&
@@ -3,7 +3,7 @@ import { type NonRingingPushEvent } from '../StreamVideoRN/types';
3
3
 
4
4
  export type NewCallNotificationCallback = (
5
5
  call: Call,
6
- notificationType: NonRingingPushEvent
6
+ notificationType: NonRingingPushEvent,
7
7
  ) => void;
8
8
 
9
9
  type NewNotificationCallbacks = {
@@ -16,11 +16,11 @@ const newNotificationCallbacks: NewNotificationCallbacks = {};
16
16
 
17
17
  export const onNewCallNotification: NewCallNotificationCallback = (
18
18
  call,
19
- notificationType
19
+ notificationType,
20
20
  ) => {
21
21
  if (newNotificationCallbacks.current && lastCid !== call.cid) {
22
22
  newNotificationCallbacks.current.forEach((callback) =>
23
- callback(call, notificationType)
23
+ callback(call, notificationType),
24
24
  );
25
25
  lastCid = call.cid;
26
26
  }
@@ -4,7 +4,7 @@ let gestureHandler: GestureHandlerType | undefined;
4
4
 
5
5
  try {
6
6
  gestureHandler = require('react-native-gesture-handler');
7
- } catch (e) {}
7
+ } catch {}
8
8
 
9
9
  export const getGestureHandlerLib = (onPackageNotFound = () => {}) => {
10
10
  if (!gestureHandler) {
@@ -4,7 +4,7 @@ let reanimated: ReanimatedType | undefined;
4
4
 
5
5
  try {
6
6
  reanimated = require('react-native-reanimated');
7
- } catch (e) {}
7
+ } catch {}
8
8
 
9
9
  export const getReanimatedLib = (onPackageNotFound = () => {}) => {
10
10
  if (!reanimated) {
@@ -4,7 +4,7 @@ type PushLogoutCallbacks = {
4
4
  current?: Callback[];
5
5
  };
6
6
 
7
- let pushLogoutCallbacks: PushLogoutCallbacks = {};
7
+ const pushLogoutCallbacks: PushLogoutCallbacks = {};
8
8
 
9
9
  export const setPushLogoutCallback = (callback: Callback) => {
10
10
  if (!pushLogoutCallbacks.current) {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Call,
3
3
  CallingState,
4
+ getLogger,
4
5
  RxUtils,
5
6
  StreamVideoClient,
6
- getLogger,
7
7
  } from '@stream-io/video-client';
8
8
  import { AppState, Platform } from 'react-native';
9
9
  import type {
@@ -11,20 +11,22 @@ import type {
11
11
  StreamVideoConfig,
12
12
  } from '../StreamVideoRN/types';
13
13
  import {
14
- getFirebaseMessagingLib,
14
+ type FirebaseMessagingTypes,
15
15
  getExpoNotificationsLib,
16
+ getExpoNotificationsLibNoThrow,
17
+ getFirebaseMessagingLib,
18
+ getFirebaseMessagingLibNoThrow,
19
+ getIncomingCallForegroundServiceTypes,
16
20
  getNotifeeLibThrowIfNotInstalledForPush,
17
21
  type NotifeeLib,
18
- type FirebaseMessagingTypes,
19
- getIncomingCallForegroundServiceTypes,
20
22
  } from './libs';
21
23
  import {
22
24
  pushAcceptedIncomingCallCId$,
25
+ pushAndroidBackgroundDeliveredIncomingCallCId$,
26
+ pushNonRingingCallData$,
23
27
  pushRejectedIncomingCallCId$,
24
28
  pushTappedIncomingCallCId$,
25
- pushNonRingingCallData$,
26
29
  pushUnsubscriptionCallbacks$,
27
- pushAndroidBackgroundDeliveredIncomingCallCId$,
28
30
  } from './internal/rxSubjects';
29
31
  import {
30
32
  canAddPushWSSubscriptionsRef,
@@ -49,24 +51,25 @@ type Event = Parameters<onBackgroundEventFunctionParams>[0];
49
51
 
50
52
  let lastFirebaseToken = { token: '', userId: '' };
51
53
 
52
- /** Send token to stream, create notification channel, */
54
+ /** Send token to stream */
53
55
  export async function initAndroidPushToken(
54
56
  client: StreamVideoClient,
55
57
  pushConfig: PushConfig,
56
- setUnsubscribeListener: (unsubscribe: () => void) => void
58
+ setUnsubscribeListener: (unsubscribe: () => void) => void,
57
59
  ) {
58
60
  if (Platform.OS !== 'android' || !pushConfig.android.pushProviderName) {
59
61
  return;
60
62
  }
63
+ const logger = getLogger(['initAndroidPushToken']);
61
64
  const setDeviceToken = async (token: string) => {
62
65
  const userId = client.streamClient._user?.id ?? '';
63
66
  if (
64
67
  lastFirebaseToken.token === token &&
65
68
  lastFirebaseToken.userId === userId
66
69
  ) {
67
- getLogger(['initAndroidPushToken'])(
70
+ logger(
68
71
  'debug',
69
- `Skipping setting the same token again for userId: ${userId} and token: ${token}`
72
+ `Skipping setting the same token again for userId: ${userId} and token: ${token}`,
70
73
  );
71
74
  return;
72
75
  }
@@ -74,35 +77,43 @@ export async function initAndroidPushToken(
74
77
  setPushLogoutCallback(async () => {
75
78
  lastFirebaseToken = { token: '', userId: '' };
76
79
  try {
77
- getLogger(['initAndroidPushToken'])(
78
- 'debug',
79
- `Logout removeDeviceToken: ${token}`
80
- );
80
+ logger('debug', `Logout removeDeviceToken: ${token}`);
81
81
  await client.removeDevice(token);
82
82
  } catch (err) {
83
- const logger = getLogger(['initAndroidPushToken']);
84
83
  logger('warn', 'Failed to remove firebase token from stream', err);
85
84
  }
86
85
  });
87
86
  const push_provider_name = pushConfig.android.pushProviderName;
87
+ logger('debug', `sending token from firebase: ${token}`);
88
88
  await client.addDevice(token, 'firebase', push_provider_name);
89
89
  };
90
90
  if (pushConfig.isExpo) {
91
- const expoNotificationsLib = getExpoNotificationsLib();
92
- const subscription = expoNotificationsLib.addPushTokenListener(
93
- (devicePushToken) => {
94
- setDeviceToken(devicePushToken.data);
95
- }
96
- );
97
- setUnsubscribeListener(() => subscription.remove());
98
- const devicePushToken =
99
- await expoNotificationsLib.getDevicePushTokenAsync();
100
- const token = devicePushToken.data;
101
- await setDeviceToken(token);
102
- } else {
103
- const messaging = getFirebaseMessagingLib();
91
+ const expoNotificationsLib = pushConfig.onTapNonRingingCallNotification
92
+ ? getExpoNotificationsLib()
93
+ : getExpoNotificationsLibNoThrow();
94
+ if (expoNotificationsLib) {
95
+ logger('debug', `setting expo notification token listeners`);
96
+ const subscription = expoNotificationsLib.addPushTokenListener(
97
+ (devicePushToken) => {
98
+ setDeviceToken(devicePushToken.data);
99
+ },
100
+ );
101
+ setUnsubscribeListener(() => subscription.remove());
102
+ const devicePushToken =
103
+ await expoNotificationsLib.getDevicePushTokenAsync();
104
+ const token = devicePushToken.data;
105
+ await setDeviceToken(token);
106
+ }
107
+ }
108
+ // TODO: remove the incomingCallChannel check and find a better way once we have telecom integration for android
109
+ const messaging =
110
+ pushConfig.isExpo && !pushConfig.android.incomingCallChannel
111
+ ? getFirebaseMessagingLibNoThrow(true)
112
+ : getFirebaseMessagingLib();
113
+ if (messaging) {
114
+ logger('debug', `setting firebase token listeners`);
104
115
  const unsubscribe = messaging().onTokenRefresh((refreshedToken) =>
105
- setDeviceToken(refreshedToken)
116
+ setDeviceToken(refreshedToken),
106
117
  );
107
118
  setUnsubscribeListener(unsubscribe);
108
119
  const token = await messaging().getToken();
@@ -115,7 +126,7 @@ export async function initAndroidPushToken(
115
126
  * For Ringing and Non-Ringing calls.
116
127
  */
117
128
  export const firebaseDataHandler = async (
118
- data: FirebaseMessagingTypes.RemoteMessage['data']
129
+ data: FirebaseMessagingTypes.RemoteMessage['data'],
119
130
  ) => {
120
131
  if (Platform.OS !== 'android') return;
121
132
  /* Example data from firebase
@@ -144,7 +155,7 @@ export const firebaseDataHandler = async (
144
155
  const logger = getLogger(['firebaseDataHandler']);
145
156
  logger(
146
157
  'debug',
147
- `Notification permission not granted, unable to post ${data.type} notifications`
158
+ `Notification permission not granted, unable to post ${data.type} notifications`,
148
159
  );
149
160
  return;
150
161
  }
@@ -158,7 +169,7 @@ export const firebaseDataHandler = async (
158
169
  const { mustEndCall } = shouldCallBeEnded(
159
170
  callToCheck,
160
171
  created_by_id,
161
- receiver_id
172
+ receiver_id,
162
173
  );
163
174
  return mustEndCall;
164
175
  };
@@ -177,7 +188,7 @@ export const firebaseDataHandler = async (
177
188
  if (!client) {
178
189
  getLogger(['firebaseMessagingOnMessageHandler'])(
179
190
  'debug',
180
- `Closing fg service as there is no client to create from push config`
191
+ `Closing fg service as there is no client to create from push config`,
181
192
  );
182
193
  notifee.stopForegroundService();
183
194
  return;
@@ -187,7 +198,7 @@ export const firebaseDataHandler = async (
187
198
  if (_shouldCallBeClosed) {
188
199
  getLogger(['firebaseMessagingOnMessageHandler'])(
189
200
  'debug',
190
- `Closing fg service callCid: ${call_cid} shouldCallBeClosed: ${_shouldCallBeClosed}`
201
+ `Closing fg service callCid: ${call_cid} shouldCallBeClosed: ${_shouldCallBeClosed}`,
191
202
  );
192
203
  notifee.stopForegroundService();
193
204
  return;
@@ -200,7 +211,7 @@ export const firebaseDataHandler = async (
200
211
  getLogger(['firebaseMessagingOnMessageHandler'])(
201
212
  'debug',
202
213
  `Closing fg service from event callCid: ${call_cid} canListenToWS: ${_canListenToWS}`,
203
- { event }
214
+ { event },
204
215
  );
205
216
  unsubscribeFunctions.forEach((fn) => fn());
206
217
  notifee.stopForegroundService();
@@ -211,7 +222,7 @@ export const firebaseDataHandler = async (
211
222
  getLogger(['firebaseMessagingOnMessageHandler'])(
212
223
  'debug',
213
224
  `Closing fg service from event callCid: ${call_cid} canListenToWS: ${_canListenToWS} shouldCallBeClosed: ${_shouldCallBeClosed}`,
214
- { event }
225
+ { event },
215
226
  );
216
227
  unsubscribeFunctions.forEach((fn) => fn());
217
228
  notifee.stopForegroundService();
@@ -227,7 +238,7 @@ export const firebaseDataHandler = async (
227
238
  unsubscribeFunctions.forEach((fn) => fn());
228
239
  notifee.stopForegroundService();
229
240
  }
230
- }
241
+ },
231
242
  );
232
243
  unsubscribeFunctions.push(unsubscribe);
233
244
  unsubscribeFunctions.push(() => subscription.unsubscribe());
@@ -246,8 +257,8 @@ export const firebaseDataHandler = async (
246
257
  if (!incomingCallChannel || !incomingCallNotificationTextGetters) {
247
258
  const logger = getLogger(['firebaseMessagingOnMessageHandler']);
248
259
  logger(
249
- 'info',
250
- "Can't show incoming call notification as either or both incomingCallChannel and incomingCallNotificationTextGetters were not provided"
260
+ 'error',
261
+ "Can't show incoming call notification as either or both incomingCallChannel and incomingCallNotificationTextGetters were not provided",
251
262
  );
252
263
  return;
253
264
  }
@@ -268,7 +279,7 @@ export const firebaseDataHandler = async (
268
279
 
269
280
  getLogger(['firebaseMessagingOnMessageHandler'])(
270
281
  'debug',
271
- `Displaying incoming call notification with callCid: ${call_cid} title: ${title} body: ${body} asForegroundService: ${asForegroundService}`
282
+ `Displaying incoming call notification with callCid: ${call_cid} title: ${title} body: ${body} asForegroundService: ${asForegroundService}`,
272
283
  );
273
284
 
274
285
  const channelId = incomingCallChannel.id;
@@ -329,7 +340,7 @@ export const firebaseDataHandler = async (
329
340
  if (shouldCallBeClosed(callFromPush)) {
330
341
  getLogger(['firebaseMessagingOnMessageHandler'])(
331
342
  'debug',
332
- `Removing incoming call notification immediately with callCid: ${call_cid} as it should be closed`
343
+ `Removing incoming call notification immediately with callCid: ${call_cid} as it should be closed`,
333
344
  );
334
345
  notifee.cancelDisplayedNotification(call_cid);
335
346
  }
@@ -342,7 +353,7 @@ export const firebaseDataHandler = async (
342
353
  const logger = getLogger(['firebaseMessagingOnMessageHandler']);
343
354
  logger(
344
355
  'debug',
345
- "Can't show call notification as either or both callChannel and callNotificationTextGetters is not provided"
356
+ "Can't show call notification as either or both callChannel and callNotificationTextGetters is not provided",
346
357
  );
347
358
  return;
348
359
  }
@@ -358,7 +369,7 @@ export const firebaseDataHandler = async (
358
369
 
359
370
  getLogger(['firebaseMessagingOnMessageHandler'])(
360
371
  'debug',
361
- `Displaying NonRingingPushEvent ${type} notification with title: ${title} body: ${body}`
372
+ `Displaying NonRingingPushEvent ${type} notification with title: ${title} body: ${body}`,
362
373
  );
363
374
  await notifee.displayNotification({
364
375
  title: getTitle(type, createdUserName),
@@ -433,7 +444,7 @@ export const onAndroidNotifeeEvent = async ({
433
444
  ) {
434
445
  getLogger(['onAndroidNotifeeEvent'])(
435
446
  'debug',
436
- `clearPushWSEventSubscriptions for callCId: ${call_cid} mustAccept: ${mustAccept} mustDecline: ${mustDecline}`
447
+ `clearPushWSEventSubscriptions for callCId: ${call_cid} mustAccept: ${mustAccept} mustDecline: ${mustDecline}`,
437
448
  );
438
449
  clearPushWSEventSubscriptions();
439
450
  notifee.stopForegroundService();
@@ -442,41 +453,41 @@ export const onAndroidNotifeeEvent = async ({
442
453
  if (mustAccept) {
443
454
  getLogger(['onAndroidNotifeeEvent'])(
444
455
  'debug',
445
- `pushAcceptedIncomingCallCId$ added with callCId: ${call_cid}`
456
+ `pushAcceptedIncomingCallCId$ added with callCId: ${call_cid}`,
446
457
  );
447
458
  pushAcceptedIncomingCallCId$.next(call_cid);
448
459
  // NOTE: accept will be handled by the app with rxjs observers as the app will go to foreground always
449
460
  } else if (mustDecline) {
450
461
  getLogger(['onAndroidNotifeeEvent'])(
451
462
  'debug',
452
- `pushRejectedIncomingCallCId$ added with callCId: ${call_cid}`
463
+ `pushRejectedIncomingCallCId$ added with callCId: ${call_cid}`,
453
464
  );
454
465
  pushRejectedIncomingCallCId$.next(call_cid);
455
466
  if (hasObservers) {
456
467
  // if we had observers we can return here as the observers will handle the call as the app is in the foreground state
457
468
  getLogger(['onAndroidNotifeeEvent'])(
458
469
  'debug',
459
- `Skipped processCallFromPushInBackground for Declining call with callCId: ${call_cid} as the app is in the foreground state`
470
+ `Skipped processCallFromPushInBackground for Declining call with callCId: ${call_cid} as the app is in the foreground state`,
460
471
  );
461
472
  return;
462
473
  }
463
474
  getLogger(['onAndroidNotifeeEvent'])(
464
475
  'debug',
465
- `start processCallFromPushInBackground - Declining call with callCId: ${call_cid}`
476
+ `start processCallFromPushInBackground - Declining call with callCId: ${call_cid}`,
466
477
  );
467
478
  await processCallFromPushInBackground(pushConfig, call_cid, 'decline');
468
479
  } else {
469
480
  if (type === notifeeLib.EventType.PRESS) {
470
481
  getLogger(['onAndroidNotifeeEvent'])(
471
482
  'debug',
472
- `pushTappedIncomingCallCId$ added with callCId: ${call_cid}`
483
+ `pushTappedIncomingCallCId$ added with callCId: ${call_cid}`,
473
484
  );
474
485
  pushTappedIncomingCallCId$.next(call_cid);
475
486
  // pressed state will be handled by the app with rxjs observers as the app will go to foreground always
476
487
  } else if (isBackground && type === notifeeLib.EventType.DELIVERED) {
477
488
  getLogger(['onAndroidNotifeeEvent'])(
478
489
  'debug',
479
- `pushAndroidBackgroundDeliveredIncomingCallCId$ added with callCId: ${call_cid}`
490
+ `pushAndroidBackgroundDeliveredIncomingCallCId$ added with callCId: ${call_cid}`,
480
491
  );
481
492
  pushAndroidBackgroundDeliveredIncomingCallCId$.next(call_cid);
482
493
  // background delivered state will be handled by the app with rxjs observers as processing needs to happen only when app is opened
@@ -487,11 +498,11 @@ export const onAndroidNotifeeEvent = async ({
487
498
  if (type === notifeeLib.EventType.PRESS) {
488
499
  getLogger(['onAndroidNotifeeEvent'])(
489
500
  'debug',
490
- `onTapNonRingingCallNotification with callCId: ${call_cid}`
501
+ `onTapNonRingingCallNotification with callCId: ${call_cid}`,
491
502
  );
492
503
  pushConfig.onTapNonRingingCallNotification?.(
493
504
  call_cid,
494
- data.type as NonRingingPushEvent
505
+ data.type as NonRingingPushEvent,
495
506
  );
496
507
  }
497
508
  }