@stream-io/video-react-native-sdk 1.10.17 → 1.10.19

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 (312) hide show
  1. package/CHANGELOG.md +728 -687
  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/contexts/ThemeContext.js +12 -3
  14. package/dist/commonjs/contexts/ThemeContext.js.map +1 -1
  15. package/dist/commonjs/hooks/internal/useCallMediaStreamCleanup.js +0 -1
  16. package/dist/commonjs/hooks/internal/useCallMediaStreamCleanup.js.map +1 -1
  17. package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js +4 -4
  18. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js +11 -5
  19. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  20. package/dist/commonjs/hooks/useScreenShareButton.js +1 -3
  21. package/dist/commonjs/hooks/useScreenShareButton.js.map +1 -1
  22. package/dist/commonjs/hooks/useTrackDimensions.js +1 -1
  23. package/dist/commonjs/hooks/useTrackDimensions.js.map +1 -1
  24. package/dist/commonjs/providers/StreamCall/DeviceStats.js +2 -2
  25. package/dist/commonjs/providers/StreamCall/DeviceStats.js.map +1 -1
  26. package/dist/commonjs/providers/StreamVideo.js +1 -1
  27. package/dist/commonjs/providers/StreamVideo.js.map +1 -1
  28. package/dist/commonjs/utils/internal/optionallibs/gestureHandler.js +1 -1
  29. package/dist/commonjs/utils/internal/optionallibs/gestureHandler.js.map +1 -1
  30. package/dist/commonjs/utils/internal/optionallibs/reanimated.js +1 -1
  31. package/dist/commonjs/utils/internal/optionallibs/reanimated.js.map +1 -1
  32. package/dist/commonjs/utils/internal/pushLogoutCallback.js +1 -1
  33. package/dist/commonjs/utils/internal/pushLogoutCallback.js.map +1 -1
  34. package/dist/commonjs/utils/push/internal/ios.js +104 -0
  35. package/dist/commonjs/utils/push/internal/ios.js.map +1 -0
  36. package/dist/commonjs/utils/push/ios.js +15 -107
  37. package/dist/commonjs/utils/push/ios.js.map +1 -1
  38. package/dist/commonjs/utils/push/libs/callkeep.js +1 -1
  39. package/dist/commonjs/utils/push/libs/callkeep.js.map +1 -1
  40. package/dist/commonjs/utils/push/libs/expoNotifications.js +1 -1
  41. package/dist/commonjs/utils/push/libs/expoNotifications.js.map +1 -1
  42. package/dist/commonjs/utils/push/libs/firebaseMessaging/lib.js +1 -1
  43. package/dist/commonjs/utils/push/libs/firebaseMessaging/lib.js.map +1 -1
  44. package/dist/commonjs/utils/push/libs/iosPushNotification.js +1 -1
  45. package/dist/commonjs/utils/push/libs/iosPushNotification.js.map +1 -1
  46. package/dist/commonjs/utils/push/libs/notifee/lib.js +1 -1
  47. package/dist/commonjs/utils/push/libs/notifee/lib.js.map +1 -1
  48. package/dist/commonjs/utils/push/libs/voipPushNotification.js +1 -1
  49. package/dist/commonjs/utils/push/libs/voipPushNotification.js.map +1 -1
  50. package/dist/commonjs/utils/push/setupIosCallKeepEvents.js +2 -2
  51. package/dist/commonjs/utils/push/setupIosCallKeepEvents.js.map +1 -1
  52. package/dist/commonjs/utils/push/setupIosVoipPushEvents.js +2 -2
  53. package/dist/commonjs/utils/push/setupIosVoipPushEvents.js.map +1 -1
  54. package/dist/commonjs/version.js +1 -1
  55. package/dist/module/components/Call/CallContent/CallContent.js +2 -2
  56. package/dist/module/components/Call/CallContent/CallContent.js.map +1 -1
  57. package/dist/module/components/Call/CallContent/RTCViewPipIOS.js +2 -1
  58. package/dist/module/components/Call/CallContent/RTCViewPipIOS.js.map +1 -1
  59. package/dist/module/components/Call/CallContent/RTCViewPipNative.js +6 -6
  60. package/dist/module/components/Call/CallContent/RTCViewPipNative.js.map +1 -1
  61. package/dist/module/components/Call/CallControls/internal/ReactionsPicker.js +1 -1
  62. package/dist/module/components/Call/CallControls/internal/ReactionsPicker.js.map +1 -1
  63. package/dist/module/components/Call/Lobby/Lobby.js.map +1 -1
  64. package/dist/module/components/Call/Lobby/LobbyFooter.js +1 -1
  65. package/dist/module/components/Call/Lobby/LobbyFooter.js.map +1 -1
  66. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js +4 -4
  67. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js.map +1 -1
  68. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js +7 -5
  69. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js.map +1 -1
  70. package/dist/module/components/Participant/ParticipantView/ParticipantReaction.js +1 -1
  71. package/dist/module/components/Participant/ParticipantView/ParticipantReaction.js.map +1 -1
  72. package/dist/module/components/Participant/ParticipantView/SpeechIndicator.js +1 -1
  73. package/dist/module/components/Participant/ParticipantView/SpeechIndicator.js.map +1 -1
  74. package/dist/module/contexts/BackgroundFilters.js +1 -1
  75. package/dist/module/contexts/BackgroundFilters.js.map +1 -1
  76. package/dist/module/contexts/ThemeContext.js +11 -1
  77. package/dist/module/contexts/ThemeContext.js.map +1 -1
  78. package/dist/module/hooks/internal/useCallMediaStreamCleanup.js +0 -1
  79. package/dist/module/hooks/internal/useCallMediaStreamCleanup.js.map +1 -1
  80. package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js +4 -4
  81. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +12 -6
  82. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  83. package/dist/module/hooks/push/useProcessPushCallEffect.js +1 -1
  84. package/dist/module/hooks/push/useProcessPushCallEffect.js.map +1 -1
  85. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +2 -2
  86. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  87. package/dist/module/hooks/usePermissionRequest.js +1 -1
  88. package/dist/module/hooks/usePermissionRequest.js.map +1 -1
  89. package/dist/module/hooks/useScreenShareButton.js +3 -5
  90. package/dist/module/hooks/useScreenShareButton.js.map +1 -1
  91. package/dist/module/hooks/useTrackDimensions.js +2 -2
  92. package/dist/module/hooks/useTrackDimensions.js.map +1 -1
  93. package/dist/module/providers/StreamCall/DeviceStats.js +4 -4
  94. package/dist/module/providers/StreamCall/DeviceStats.js.map +1 -1
  95. package/dist/module/providers/StreamVideo.js +2 -2
  96. package/dist/module/providers/StreamVideo.js.map +1 -1
  97. package/dist/module/utils/internal/optionallibs/gestureHandler.js +1 -1
  98. package/dist/module/utils/internal/optionallibs/gestureHandler.js.map +1 -1
  99. package/dist/module/utils/internal/optionallibs/reanimated.js +1 -1
  100. package/dist/module/utils/internal/optionallibs/reanimated.js.map +1 -1
  101. package/dist/module/utils/internal/pushLogoutCallback.js +1 -1
  102. package/dist/module/utils/internal/pushLogoutCallback.js.map +1 -1
  103. package/dist/module/utils/push/android.js +3 -3
  104. package/dist/module/utils/push/android.js.map +1 -1
  105. package/dist/module/utils/push/internal/ios.js +97 -0
  106. package/dist/module/utils/push/internal/ios.js.map +1 -0
  107. package/dist/module/utils/push/internal/utils.js +1 -1
  108. package/dist/module/utils/push/internal/utils.js.map +1 -1
  109. package/dist/module/utils/push/ios.js +18 -109
  110. package/dist/module/utils/push/ios.js.map +1 -1
  111. package/dist/module/utils/push/libs/callkeep.js +1 -1
  112. package/dist/module/utils/push/libs/callkeep.js.map +1 -1
  113. package/dist/module/utils/push/libs/expoNotifications.js +1 -1
  114. package/dist/module/utils/push/libs/expoNotifications.js.map +1 -1
  115. package/dist/module/utils/push/libs/firebaseMessaging/index.js.map +1 -1
  116. package/dist/module/utils/push/libs/firebaseMessaging/lib.js +1 -1
  117. package/dist/module/utils/push/libs/firebaseMessaging/lib.js.map +1 -1
  118. package/dist/module/utils/push/libs/iosPushNotification.js +1 -1
  119. package/dist/module/utils/push/libs/iosPushNotification.js.map +1 -1
  120. package/dist/module/utils/push/libs/notifee/index.js.map +1 -1
  121. package/dist/module/utils/push/libs/notifee/lib.js +1 -1
  122. package/dist/module/utils/push/libs/notifee/lib.js.map +1 -1
  123. package/dist/module/utils/push/libs/voipPushNotification.js +1 -1
  124. package/dist/module/utils/push/libs/voipPushNotification.js.map +1 -1
  125. package/dist/module/utils/push/setupIosCallKeepEvents.js +3 -4
  126. package/dist/module/utils/push/setupIosCallKeepEvents.js.map +1 -1
  127. package/dist/module/utils/push/setupIosVoipPushEvents.js +2 -2
  128. package/dist/module/utils/push/setupIosVoipPushEvents.js.map +1 -1
  129. package/dist/module/version.js +1 -1
  130. package/dist/typescript/components/Call/CallContent/CallContent.d.ts.map +1 -1
  131. package/dist/typescript/components/Call/CallContent/RTCViewPipIOS.d.ts.map +1 -1
  132. package/dist/typescript/components/Call/CallContent/RTCViewPipNative.d.ts.map +1 -1
  133. package/dist/typescript/components/Call/CallControls/AcceptCallButton.d.ts.map +1 -1
  134. package/dist/typescript/components/Call/CallControls/CallControls.d.ts.map +1 -1
  135. package/dist/typescript/components/Call/CallControls/CallControlsButton.d.ts.map +1 -1
  136. package/dist/typescript/components/Call/CallControls/HangupCallButton.d.ts.map +1 -1
  137. package/dist/typescript/components/Call/CallControls/IncomingCallControls.d.ts.map +1 -1
  138. package/dist/typescript/components/Call/CallControls/OutgoingCallControls.d.ts.map +1 -1
  139. package/dist/typescript/components/Call/CallControls/ReactionsButton.d.ts.map +1 -1
  140. package/dist/typescript/components/Call/CallControls/RejectCallButton.d.ts.map +1 -1
  141. package/dist/typescript/components/Call/CallControls/ScreenShareToggleButton.d.ts.map +1 -1
  142. package/dist/typescript/components/Call/CallControls/ToggleAudioPreviewButton.d.ts.map +1 -1
  143. package/dist/typescript/components/Call/CallControls/ToggleAudioPublishingButton.d.ts.map +1 -1
  144. package/dist/typescript/components/Call/CallControls/ToggleCameraFaceButton.d.ts.map +1 -1
  145. package/dist/typescript/components/Call/CallControls/ToggleVideoPreviewButton.d.ts.map +1 -1
  146. package/dist/typescript/components/Call/CallControls/ToggleVideoPublishingButton.d.ts.map +1 -1
  147. package/dist/typescript/components/Call/CallControls/internal/ReactionsPicker.d.ts.map +1 -1
  148. package/dist/typescript/components/Call/CallLayout/CallParticipantsGrid.d.ts.map +1 -1
  149. package/dist/typescript/components/Call/CallLayout/CallParticipantsSpotlight.d.ts.map +1 -1
  150. package/dist/typescript/components/Call/CallParticipantsList/CallParticipantsList.d.ts.map +1 -1
  151. package/dist/typescript/components/Call/Lobby/JoinCallButton.d.ts.map +1 -1
  152. package/dist/typescript/components/Call/Lobby/Lobby.d.ts.map +1 -1
  153. package/dist/typescript/components/Call/Lobby/LobbyFooter.d.ts.map +1 -1
  154. package/dist/typescript/components/Call/RingingCallContent/CallLeftIndicator.d.ts.map +1 -1
  155. package/dist/typescript/components/Call/RingingCallContent/CallPreparingIndicator.d.ts.map +1 -1
  156. package/dist/typescript/components/Call/RingingCallContent/IncomingCall.d.ts.map +1 -1
  157. package/dist/typescript/components/Call/RingingCallContent/OutgoingCall.d.ts.map +1 -1
  158. package/dist/typescript/components/Call/RingingCallContent/RingingCallContent.d.ts.map +1 -1
  159. package/dist/typescript/components/Call/RingingCallContent/TextBasedIndicator.d.ts.map +1 -1
  160. package/dist/typescript/components/Call/RingingCallContent/UserInfo.d.ts.map +1 -1
  161. package/dist/typescript/components/Livestream/HostLivestream/HostLivestream.d.ts.map +1 -1
  162. package/dist/typescript/components/Livestream/LivestreamControls/HostLivestreamControls.d.ts.map +1 -1
  163. package/dist/typescript/components/Livestream/LivestreamControls/HostStartStreamButton.d.ts.map +1 -1
  164. package/dist/typescript/components/Livestream/LivestreamControls/LivestreamMediaControls.d.ts.map +1 -1
  165. package/dist/typescript/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.d.ts.map +1 -1
  166. package/dist/typescript/components/Livestream/LivestreamControls/ViewerLivestreamControls.d.ts.map +1 -1
  167. package/dist/typescript/components/Livestream/LivestreamLayout/LivestreamLayout.d.ts.map +1 -1
  168. package/dist/typescript/components/Livestream/LivestreamPlayer/LivestreamPlayer.d.ts.map +1 -1
  169. package/dist/typescript/components/Livestream/LivestreamTopView/DurationBadge.d.ts.map +1 -1
  170. package/dist/typescript/components/Livestream/LivestreamTopView/FollowerCount.d.ts.map +1 -1
  171. package/dist/typescript/components/Livestream/LivestreamTopView/HostLivestreamTopView.d.ts.map +1 -1
  172. package/dist/typescript/components/Livestream/LivestreamTopView/LiveIndicator.d.ts.map +1 -1
  173. package/dist/typescript/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.d.ts.map +1 -1
  174. package/dist/typescript/components/Livestream/ViewerLivestream/ViewerLivestream.d.ts.map +1 -1
  175. package/dist/typescript/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.d.ts.map +1 -1
  176. package/dist/typescript/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.d.ts.map +1 -1
  177. package/dist/typescript/components/Participant/FloatingParticipantView/index.d.ts.map +1 -1
  178. package/dist/typescript/components/Participant/ParticipantView/ParticipantLabel.d.ts.map +1 -1
  179. package/dist/typescript/components/Participant/ParticipantView/ParticipantNetworkQualityIndicator.d.ts.map +1 -1
  180. package/dist/typescript/components/Participant/ParticipantView/ParticipantReaction.d.ts.map +1 -1
  181. package/dist/typescript/components/Participant/ParticipantView/ParticipantVideoFallback.d.ts.map +1 -1
  182. package/dist/typescript/components/Participant/ParticipantView/ParticipantView.d.ts.map +1 -1
  183. package/dist/typescript/components/Participant/ParticipantView/SpeechIndicator.d.ts.map +1 -1
  184. package/dist/typescript/components/Participant/ParticipantView/VideoRenderer.d.ts.map +1 -1
  185. package/dist/typescript/components/utility/Avatar.d.ts.map +1 -1
  186. package/dist/typescript/components/utility/ScreenShareOverlay.d.ts.map +1 -1
  187. package/dist/typescript/contexts/BackgroundFilters.d.ts.map +1 -1
  188. package/dist/typescript/contexts/ThemeContext.d.ts +10 -2
  189. package/dist/typescript/contexts/ThemeContext.d.ts.map +1 -1
  190. package/dist/typescript/hooks/internal/useCallMediaStreamCleanup.d.ts.map +1 -1
  191. package/dist/typescript/hooks/push/useIosVoipPushEventsSetupEffect.d.ts.map +1 -1
  192. package/dist/typescript/hooks/usePaginatedLayoutSortPreset.d.ts.map +1 -1
  193. package/dist/typescript/hooks/usePermissionNotification.d.ts.map +1 -1
  194. package/dist/typescript/hooks/useScreenShareButton.d.ts +21 -1
  195. package/dist/typescript/hooks/useScreenShareButton.d.ts.map +1 -1
  196. package/dist/typescript/icons/Back.d.ts.map +1 -1
  197. package/dist/typescript/icons/CameraSwitch.d.ts.map +1 -1
  198. package/dist/typescript/icons/IconWrapper.d.ts.map +1 -1
  199. package/dist/typescript/icons/Lock.d.ts.map +1 -1
  200. package/dist/typescript/icons/Mic.d.ts.map +1 -1
  201. package/dist/typescript/icons/MicOff.d.ts.map +1 -1
  202. package/dist/typescript/icons/Phone.d.ts.map +1 -1
  203. package/dist/typescript/icons/PhoneDown.d.ts.map +1 -1
  204. package/dist/typescript/icons/PinVertical.d.ts.map +1 -1
  205. package/dist/typescript/icons/Reaction.d.ts.map +1 -1
  206. package/dist/typescript/icons/ScreenShare.d.ts.map +1 -1
  207. package/dist/typescript/icons/ScreenShareIndicator.d.ts.map +1 -1
  208. package/dist/typescript/icons/Settings.d.ts.map +1 -1
  209. package/dist/typescript/icons/Spotlight.d.ts.map +1 -1
  210. package/dist/typescript/icons/StopScreenShare.d.ts.map +1 -1
  211. package/dist/typescript/icons/ThreeDots.d.ts.map +1 -1
  212. package/dist/typescript/icons/TopViewBackground.d.ts.map +1 -1
  213. package/dist/typescript/icons/Video.d.ts.map +1 -1
  214. package/dist/typescript/icons/VideoSlash.d.ts.map +1 -1
  215. package/dist/typescript/providers/StreamCall/index.d.ts.map +1 -1
  216. package/dist/typescript/providers/StreamVideo.d.ts.map +1 -1
  217. package/dist/typescript/utils/hooks/usePrevious.d.ts.map +1 -1
  218. package/dist/typescript/utils/index.d.ts.map +1 -1
  219. package/dist/typescript/utils/internal/optionallibs/gestureHandler.d.ts.map +1 -1
  220. package/dist/typescript/utils/internal/optionallibs/reanimated.d.ts.map +1 -1
  221. package/dist/typescript/utils/internal/pushLogoutCallback.d.ts +1 -1
  222. package/dist/typescript/utils/internal/pushLogoutCallback.d.ts.map +1 -1
  223. package/dist/typescript/utils/push/android.d.ts +1 -1
  224. package/dist/typescript/utils/push/android.d.ts.map +1 -1
  225. package/dist/typescript/utils/push/internal/ios.d.ts +3 -0
  226. package/dist/typescript/utils/push/internal/ios.d.ts.map +1 -0
  227. package/dist/typescript/utils/push/internal/utils.d.ts.map +1 -1
  228. package/dist/typescript/utils/push/ios.d.ts +0 -1
  229. package/dist/typescript/utils/push/ios.d.ts.map +1 -1
  230. package/dist/typescript/utils/push/libs/expoNotifications.d.ts +1 -1
  231. package/dist/typescript/utils/push/libs/expoNotifications.d.ts.map +1 -1
  232. package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
  233. package/dist/typescript/utils/push/libs/iosPushNotification.d.ts +1 -1
  234. package/dist/typescript/utils/push/libs/iosPushNotification.d.ts.map +1 -1
  235. package/dist/typescript/utils/push/libs/notifee/index.d.ts.map +1 -1
  236. package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts.map +1 -1
  237. package/dist/typescript/version.d.ts +1 -1
  238. package/expo-config-plugin/dist/withAndroidManifest.js +0 -1
  239. package/expo-config-plugin/dist/withAppDelegate.js +1 -1
  240. package/expo-config-plugin/dist/withIosScreenCapture/withPlistUpdates.js +1 -1
  241. package/expo-config-plugin/dist/withiOSInfoPlist.js +3 -1
  242. package/package.json +20 -23
  243. package/src/components/Call/CallContent/CallContent.tsx +3 -3
  244. package/src/components/Call/CallContent/RTCViewPipIOS.tsx +6 -4
  245. package/src/components/Call/CallContent/RTCViewPipNative.tsx +5 -5
  246. package/src/components/Call/CallControls/CallControlsButton.tsx +1 -1
  247. package/src/components/Call/CallControls/LobbyControls.tsx +1 -1
  248. package/src/components/Call/CallControls/ScreenShareToggleButton.tsx +1 -1
  249. package/src/components/Call/CallControls/internal/ReactionsPicker.tsx +4 -4
  250. package/src/components/Call/CallLayout/CallParticipantsSpotlight.tsx +1 -1
  251. package/src/components/Call/CallParticipantsList/CallParticipantsList.tsx +5 -5
  252. package/src/components/Call/Lobby/JoinCallButton.tsx +1 -1
  253. package/src/components/Call/Lobby/Lobby.tsx +2 -2
  254. package/src/components/Call/Lobby/LobbyFooter.tsx +2 -2
  255. package/src/components/Call/RingingCallContent/UserInfo.tsx +1 -1
  256. package/src/components/Livestream/HostLivestream/HostLivestream.tsx +1 -1
  257. package/src/components/Livestream/LivestreamControls/LivestreamScreenShareToggleButton.tsx +1 -1
  258. package/src/components/Livestream/LivestreamLayout/LivestreamLayout.tsx +1 -1
  259. package/src/components/Livestream/LivestreamTopView/DurationBadge.tsx +1 -1
  260. package/src/components/Livestream/ViewerLivestream/ViewerLivestream.tsx +1 -1
  261. package/src/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.tsx +10 -10
  262. package/src/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.tsx +15 -13
  263. package/src/components/Participant/ParticipantView/ParticipantLabel.tsx +1 -1
  264. package/src/components/Participant/ParticipantView/ParticipantNetworkQualityIndicator.tsx +1 -1
  265. package/src/components/Participant/ParticipantView/ParticipantReaction.tsx +3 -3
  266. package/src/components/Participant/ParticipantView/ParticipantView.tsx +1 -1
  267. package/src/components/Participant/ParticipantView/SpeechIndicator.tsx +3 -3
  268. package/src/components/Participant/ParticipantView/VideoRenderer.tsx +1 -1
  269. package/src/contexts/BackgroundFilters.tsx +7 -7
  270. package/src/contexts/StreamVideoContext.tsx +3 -3
  271. package/src/contexts/ThemeContext.tsx +15 -5
  272. package/src/hooks/internal/useCallMediaStreamCleanup.ts +2 -6
  273. package/src/hooks/push/useInitAndroidTokenAndRest.ts +1 -1
  274. package/src/hooks/push/useIosCallkeepWithCallingStateEffect.ts +25 -25
  275. package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +28 -19
  276. package/src/hooks/push/useProcessPushCallEffect.ts +8 -8
  277. package/src/hooks/push/useProcessPushNonRingingCallEffect.ts +1 -1
  278. package/src/hooks/useAndroidKeepCallAliveEffect.ts +10 -10
  279. package/src/hooks/useAutoEnterPiPEffect.tsx +2 -2
  280. package/src/hooks/useIsIosScreenshareBroadcastStarted.ts +2 -2
  281. package/src/hooks/usePaginatedLayoutSortPreset.ts +1 -1
  282. package/src/hooks/usePermissionNotification.tsx +1 -1
  283. package/src/hooks/usePermissionRequest.tsx +4 -4
  284. package/src/hooks/useScreenShareButton.ts +9 -10
  285. package/src/hooks/useTrackDimensions.ts +3 -3
  286. package/src/providers/StreamCall/AppStateListener.tsx +6 -6
  287. package/src/providers/StreamCall/DeviceStats.tsx +8 -8
  288. package/src/providers/StreamVideo.tsx +4 -4
  289. package/src/utils/StreamVideoRN/index.ts +4 -4
  290. package/src/utils/StreamVideoRN/types.ts +2 -2
  291. package/src/utils/enterPiPAndroid.ts +1 -1
  292. package/src/utils/index.ts +2 -2
  293. package/src/utils/internal/newNotificationCallbacks.ts +3 -3
  294. package/src/utils/internal/optionallibs/gestureHandler.ts +1 -1
  295. package/src/utils/internal/optionallibs/reanimated.ts +1 -1
  296. package/src/utils/internal/pushLogoutCallback.ts +1 -1
  297. package/src/utils/push/android.ts +33 -33
  298. package/src/utils/push/internal/ios.ts +133 -0
  299. package/src/utils/push/internal/utils.ts +10 -10
  300. package/src/utils/push/ios.ts +38 -164
  301. package/src/utils/push/libs/callkeep.ts +2 -2
  302. package/src/utils/push/libs/expoNotifications.ts +5 -5
  303. package/src/utils/push/libs/firebaseMessaging/index.ts +3 -3
  304. package/src/utils/push/libs/firebaseMessaging/lib.ts +1 -1
  305. package/src/utils/push/libs/iosPushNotification.ts +4 -4
  306. package/src/utils/push/libs/notifee/index.ts +7 -7
  307. package/src/utils/push/libs/notifee/lib.ts +1 -1
  308. package/src/utils/push/libs/voipPushNotification.ts +2 -2
  309. package/src/utils/push/setupIosCallKeepEvents.ts +17 -18
  310. package/src/utils/push/setupIosVoipPushEvents.ts +5 -5
  311. package/src/utils/push/utils.ts +2 -2
  312. package/src/version.ts +1 -1
@@ -1,19 +1,20 @@
1
- import React, { useMemo, useEffect } from 'react';
1
+ import React, { useEffect, useMemo } from 'react';
2
2
  import { type LayoutRectangle, View } from 'react-native';
3
3
  import {
4
- FloatingViewAlignment,
5
- getSnapAlignments,
6
- getClosestSnapAlignment,
7
4
  floatingChildViewContainerStyle,
5
+ FloatingViewAlignment,
8
6
  type FloatingViewProps,
7
+ getClosestSnapAlignment,
8
+ getSnapAlignments,
9
9
  } from './common';
10
+
10
11
  type GestureHandlerExportsType = typeof import('react-native-gesture-handler');
11
12
  type ReanimatedNamespaceType = typeof import('react-native-reanimated').default;
12
13
  type ReanimatedExportsType = typeof import('react-native-reanimated');
13
14
 
14
15
  let ReanimatedFloatingView: React.FC<FloatingViewProps> = () => {
15
16
  throw new Error(
16
- 'ReanimatedFloatingView component must not be used without the react-native-reanimated library and react-native-gesture-handler library installed'
17
+ 'ReanimatedFloatingView component must not be used without the react-native-reanimated library and react-native-gesture-handler library installed',
17
18
  );
18
19
  };
19
20
 
@@ -39,6 +40,7 @@ try {
39
40
  withDelay: ReanimatedExportsType['withDelay'];
40
41
  } = require('react-native-reanimated');
41
42
 
43
+ // eslint-disable-next-line react/display-name
42
44
  ReanimatedFloatingView = ({
43
45
  initialAlignment,
44
46
  containerHeight,
@@ -77,7 +79,7 @@ try {
77
79
  }, [rectangle, containerWidth, containerHeight]);
78
80
 
79
81
  const dragGesture = Gesture.Pan()
80
- .onStart((_e) => {
82
+ .onStart(() => {
81
83
  start.value = {
82
84
  x: translationX.value,
83
85
  y: translationY.value,
@@ -89,15 +91,15 @@ try {
89
91
  0,
90
92
  Math.min(
91
93
  e.translationX + (start.value.x ?? 0),
92
- snapAlignments[FloatingViewAlignment.bottomRight].x
93
- )
94
+ snapAlignments[FloatingViewAlignment.bottomRight].x,
95
+ ),
94
96
  );
95
97
  translationY.value = Math.max(
96
98
  0,
97
99
  Math.min(
98
100
  e.translationY + (start.value.y ?? 0),
99
- snapAlignments[FloatingViewAlignment.bottomRight].y
100
- )
101
+ snapAlignments[FloatingViewAlignment.bottomRight].y,
102
+ ),
101
103
  );
102
104
  })
103
105
  .onEnd(() => {
@@ -138,7 +140,7 @@ try {
138
140
  start,
139
141
  ]);
140
142
 
141
- // @ts-ignore
143
+ // @ts-expect-error - types conflict
142
144
  const animatedStyle = useAnimatedStyle(() => {
143
145
  return {
144
146
  height: rectangle?.height,
@@ -160,7 +162,7 @@ try {
160
162
  // gesture handler root view must absolutely fill the bounds
161
163
  // to intercept gestures within those bounds
162
164
  <GestureDetector gesture={dragGesture}>
163
- {/* @ts-ignore */}
165
+ {/* @ts-expect-error types conflict */}
164
166
  <Reanimated.View style={animatedStyle}>
165
167
  <View
166
168
  onLayout={(event) => {
@@ -186,6 +188,6 @@ try {
186
188
  </GestureDetector>
187
189
  );
188
190
  };
189
- } catch (e) {}
191
+ } catch {}
190
192
 
191
193
  export default ReanimatedFloatingView;
@@ -187,6 +187,6 @@ const useStyles = () => {
187
187
  justifyContent: 'center',
188
188
  },
189
189
  }),
190
- [theme]
190
+ [theme],
191
191
  );
192
192
  };
@@ -15,7 +15,7 @@ export type ParticipantNetworkQualityIndicatorProps = Pick<
15
15
  >;
16
16
 
17
17
  const useConnectionQualitySignalColors = (
18
- participant: ParticipantViewProps['participant']
18
+ participant: ParticipantViewProps['participant'],
19
19
  ) => {
20
20
  const {
21
21
  theme: { colors },
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useMemo } from 'react';
2
2
  import { StyleSheet, Text, View } from 'react-native';
3
3
  import { useCall } from '@stream-io/video-react-bindings';
4
- import { Z_INDEX, defaultEmojiReactions } from '../../../constants';
4
+ import { defaultEmojiReactions, Z_INDEX } from '../../../constants';
5
5
  import type { ParticipantViewProps } from './ParticipantView';
6
6
  import { useTheme } from '../../../contexts/ThemeContext';
7
7
  import type { CallContentProps } from '../../Call';
@@ -53,7 +53,7 @@ export const ParticipantReaction = ({
53
53
  reaction &&
54
54
  supportedReactions.find(
55
55
  (supportedReaction) =>
56
- supportedReaction.emoji_code === reaction.emoji_code
56
+ supportedReaction.emoji_code === reaction.emoji_code,
57
57
  );
58
58
 
59
59
  return (
@@ -90,6 +90,6 @@ const useStyles = () => {
90
90
  justifyContent: 'center',
91
91
  },
92
92
  }),
93
- [theme]
93
+ [theme],
94
94
  );
95
95
  };
@@ -183,6 +183,6 @@ const useStyles = () => {
183
183
  },
184
184
  networkIndicatorOnly: { justifyContent: 'flex-end' },
185
185
  }),
186
- [theme]
186
+ [theme],
187
187
  );
188
188
  };
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useMemo, useState } from 'react';
2
- import { View, Animated, StyleSheet } from 'react-native';
2
+ import { Animated, StyleSheet, View } from 'react-native';
3
3
  import { useTheme } from '../../../contexts';
4
4
 
5
5
  /**
@@ -41,7 +41,7 @@ export const SpeechIndicator = ({ isSpeaking }: SpeechIndicatorProps) => {
41
41
  duration: (index + 1) * 300,
42
42
  useNativeDriver: true,
43
43
  }),
44
- ])
44
+ ]),
45
45
  ).start();
46
46
  });
47
47
  } else {
@@ -96,7 +96,7 @@ const useStyles = () => {
96
96
  borderRadius: 2,
97
97
  },
98
98
  }),
99
- [theme]
99
+ [theme],
100
100
  );
101
101
  };
102
102
 
@@ -217,7 +217,7 @@ export const VideoRenderer = ({
217
217
  }, [trackType, sessionId]);
218
218
 
219
219
  const onLayout: React.ComponentProps<typeof RTCView>['onLayout'] = (
220
- event
220
+ event,
221
221
  ) => {
222
222
  if (!call || isLocalParticipant) {
223
223
  return;
@@ -27,7 +27,7 @@ let videoFiltersModule: VideoFiltersModuleType | undefined;
27
27
 
28
28
  try {
29
29
  videoFiltersModule = require('@stream-io/video-filters-react-native');
30
- } catch (_e) {}
30
+ } catch {}
31
31
 
32
32
  const resolveAssetSourceFunc = Image.resolveAssetSource;
33
33
 
@@ -87,12 +87,12 @@ export const useBackgroundFilters = () => {
87
87
  const context = useContext(BackgroundFiltersContext);
88
88
  if (!context) {
89
89
  throw new Error(
90
- 'useBackgroundFilters must be used within a BackgroundFiltersProvider'
90
+ 'useBackgroundFilters must be used within a BackgroundFiltersProvider',
91
91
  );
92
92
  }
93
93
  if (!videoFiltersModule) {
94
94
  throw new Error(
95
- "Install the '@stream-io/video-filters-react-native' library to use background filters"
95
+ "Install the '@stream-io/video-filters-react-native' library to use background filters",
96
96
  );
97
97
  }
98
98
  return context;
@@ -107,7 +107,7 @@ export const useBackgroundFilters = () => {
107
107
  export const BackgroundFiltersProvider = ({ children }: PropsWithChildren) => {
108
108
  if (!videoFiltersModule) {
109
109
  throw new Error(
110
- "Install the '@stream-io/video-filters-react-native' library to use background filters"
110
+ "Install the '@stream-io/video-filters-react-native' library to use background filters",
111
111
  );
112
112
  }
113
113
  const call = useCall();
@@ -138,7 +138,7 @@ export const BackgroundFiltersProvider = ({ children }: PropsWithChildren) => {
138
138
  });
139
139
  setCurrentBackgroundFilter({ blur: blurIntensity });
140
140
  },
141
- [call]
141
+ [call],
142
142
  );
143
143
 
144
144
  const applyBackgroundImageFilter = useCallback(
@@ -161,7 +161,7 @@ export const BackgroundFiltersProvider = ({ children }: PropsWithChildren) => {
161
161
  });
162
162
  setCurrentBackgroundFilter({ image: imageSource });
163
163
  },
164
- [call]
164
+ [call],
165
165
  );
166
166
 
167
167
  const disableAllFilters = useCallback(() => {
@@ -189,7 +189,7 @@ export const BackgroundFiltersProvider = ({ children }: PropsWithChildren) => {
189
189
  applyBackgroundImageFilter,
190
190
  currentBackgroundFilter,
191
191
  disableAllFilters,
192
- ]
192
+ ],
193
193
  );
194
194
 
195
195
  return (
@@ -17,7 +17,7 @@ function createStoreContext<StoreType extends object>(initialState: StoreType) {
17
17
  type SetStateFuncType = (
18
18
  partialStateOrFunc:
19
19
  | Partial<StoreType>
20
- | ((prevState: StoreType) => Partial<StoreType>)
20
+ | ((prevState: StoreType) => Partial<StoreType>),
21
21
  ) => void;
22
22
 
23
23
  // returns unsubscribe function
@@ -79,7 +79,7 @@ function createStoreContext<StoreType extends object>(initialState: StoreType) {
79
79
  * @category Client State
80
80
  */
81
81
  function useStoreValue<SelectorOutput extends StoreType[keyof StoreType]>(
82
- selector: (store: StoreType) => SelectorOutput
82
+ selector: (store: StoreType) => SelectorOutput,
83
83
  ): SelectorOutput {
84
84
  const store = useContext(StoreContext);
85
85
  if (!store) {
@@ -89,7 +89,7 @@ function createStoreContext<StoreType extends object>(initialState: StoreType) {
89
89
  const [state, setState] = useState(selector(store.getSnapshot()));
90
90
  useEffect(
91
91
  () => store.subscribe(() => setState(selector(store.getSnapshot()))),
92
- [selector, store]
92
+ [selector, store],
93
93
  );
94
94
 
95
95
  return state;
@@ -13,11 +13,16 @@ export type DeepPartial<T> = {
13
13
  [P in keyof T]?: DeepPartial<T[P]>;
14
14
  };
15
15
 
16
- export type ThemeProviderInputValue = {
16
+ export type StreamThemeInputValue = {
17
17
  mergedStyle?: Theme;
18
18
  style?: DeepPartial<Theme>;
19
19
  };
20
20
 
21
+ /**
22
+ * @deprecated Use StreamThemeInputValue instead.
23
+ */
24
+ export type ThemeProviderInputValue = StreamThemeInputValue;
25
+
21
26
  export type MergedThemesParams = {
22
27
  style?: DeepPartial<Theme>;
23
28
  theme?: Theme;
@@ -45,11 +50,11 @@ export const mergeThemes = (params: MergedThemesParams) => {
45
50
  const DEFAULT_BASE_CONTEXT_VALUE = {};
46
51
 
47
52
  export const ThemeContext = createContext<Theme>(
48
- DEFAULT_BASE_CONTEXT_VALUE as Theme
53
+ DEFAULT_BASE_CONTEXT_VALUE as Theme,
49
54
  );
50
55
 
51
- export const ThemeProvider: React.FC<
52
- PropsWithChildren<ThemeProviderInputValue & Partial<ThemeContextValue>>
56
+ export const StreamTheme: React.FC<
57
+ PropsWithChildren<StreamThemeInputValue & Partial<ThemeContextValue>>
53
58
  > = (props) => {
54
59
  const { children, mergedStyle, style, theme } = props;
55
60
 
@@ -68,12 +73,17 @@ export const ThemeProvider: React.FC<
68
73
  );
69
74
  };
70
75
 
76
+ /**
77
+ * @deprecated Use StreamTheme instead of ThemeProvider.
78
+ */
79
+ export const ThemeProvider = StreamTheme;
80
+
71
81
  export const useTheme = () => {
72
82
  const theme = useContext(ThemeContext);
73
83
 
74
84
  if (theme === DEFAULT_BASE_CONTEXT_VALUE) {
75
85
  throw new Error(
76
- 'The useThemeContext hook was called outside the ThemeContext Provider. Make sure you have configured OverlayProvider component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#overlay-provider'
86
+ 'The useThemeContext hook was called outside the ThemeContext Provider. Make sure you have configured OverlayProvider component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#overlay-provider',
77
87
  );
78
88
  }
79
89
  return { theme };
@@ -1,4 +1,3 @@
1
- import { MediaStream } from '@stream-io/react-native-webrtc';
2
1
  import {
3
2
  CallingState,
4
3
  disposeOfMediaStream,
@@ -19,9 +18,7 @@ export const useCallMediaStreamCleanup = () => {
19
18
 
20
19
  useEffect(() => {
21
20
  return () => {
22
- const mediaStream = callRef.current?.camera.state.mediaStream as
23
- | MediaStream
24
- | undefined;
21
+ const mediaStream = callRef.current?.camera.state.mediaStream;
25
22
  if (
26
23
  mediaStream &&
27
24
  !(
@@ -31,10 +28,9 @@ export const useCallMediaStreamCleanup = () => {
31
28
  ) {
32
29
  getLogger(['useCallMediaStreamCleanup'])(
33
30
  'debug',
34
- 'Cleaning up camera media stream'
31
+ 'Cleaning up camera media stream',
35
32
  );
36
33
  // we cleanup media stream only if call is not joined or joining
37
- // @ts-ignore Due to DOM typing incompatible with RN
38
34
  disposeOfMediaStream(mediaStream);
39
35
  }
40
36
  };
@@ -26,7 +26,7 @@ export const useInitAndroidTokenAndRest = () => {
26
26
  getLogger(['useInitAndroidTokenAndRest'])(
27
27
  'warn',
28
28
  'Error in initializing android push token',
29
- error
29
+ error,
30
30
  );
31
31
  });
32
32
  return () => {
@@ -27,14 +27,14 @@ const isAcceptedCallingState = (callingState: CallingState) => {
27
27
 
28
28
  const unsubscribeCallkeepEvents = async (activeCallCid: string | undefined) => {
29
29
  const voipPushNotificationCallCId = RxUtils.getCurrentValue(
30
- voipPushNotificationCallCId$
30
+ voipPushNotificationCallCId$,
31
31
  );
32
32
  if (activeCallCid && activeCallCid === voipPushNotificationCallCId) {
33
33
  // callkeep events should not be listened anymore so clear the call cid
34
34
  voipPushNotificationCallCId$.next(undefined);
35
35
  }
36
36
  return await NativeModules.StreamVideoReactNative?.removeIncomingCall(
37
- activeCallCid
37
+ activeCallCid,
38
38
  );
39
39
  };
40
40
 
@@ -75,10 +75,10 @@ export const useIosCallkeepWithCallingStateEffect = () => {
75
75
  // if the component is unmounted and the callID was not reported to callkeep, then report it now
76
76
  if (acceptedForegroundCallkeepMap) {
77
77
  log(
78
- `Ending call in callkeep: ${acceptedForegroundCallkeepMap.cid}, reason: component unmounted and call was present in acceptedForegroundCallkeepMap`
78
+ `Ending call in callkeep: ${acceptedForegroundCallkeepMap.cid}, reason: component unmounted and call was present in acceptedForegroundCallkeepMap`,
79
79
  );
80
80
  unsubscribeCallkeepEvents(acceptedForegroundCallkeepMap.cid).then(() =>
81
- callkeep.endCall(acceptedForegroundCallkeepMap.uuid)
81
+ callkeep.endCall(acceptedForegroundCallkeepMap.uuid),
82
82
  );
83
83
  }
84
84
  };
@@ -102,27 +102,27 @@ export const useIosCallkeepWithCallingStateEffect = () => {
102
102
  return;
103
103
  }
104
104
  const nativeDialerAcceptedCallMap = RxUtils.getCurrentValue(
105
- voipCallkeepAcceptedCallOnNativeDialerMap$
105
+ voipCallkeepAcceptedCallOnNativeDialerMap$,
106
106
  );
107
107
  const foregroundIncomingCallkeepMap = RxUtils.getCurrentValue(
108
- voipCallkeepCallOnForegroundMap$
108
+ voipCallkeepCallOnForegroundMap$,
109
109
  );
110
110
  const callkeep = getCallKeepLib();
111
111
  if (activeCallCid === nativeDialerAcceptedCallMap?.cid) {
112
112
  log(
113
- `Ending call in callkeep: ${activeCallCid}, reason: activeCallCid changed or was removed and call was present in nativeDialerAcceptedCallMap`
113
+ `Ending call in callkeep: ${activeCallCid}, reason: activeCallCid changed or was removed and call was present in nativeDialerAcceptedCallMap`,
114
114
  );
115
115
  unsubscribeCallkeepEvents(activeCallCid).then(() =>
116
- callkeep.endCall(nativeDialerAcceptedCallMap.uuid)
116
+ callkeep.endCall(nativeDialerAcceptedCallMap.uuid),
117
117
  );
118
118
  // no need to keep this reference anymore
119
119
  voipCallkeepAcceptedCallOnNativeDialerMap$.next(undefined);
120
120
  } else if (activeCallCid === foregroundIncomingCallkeepMap?.cid) {
121
121
  log(
122
- `Ending call in callkeep: ${activeCallCid}, reason: activeCallCid changed or was removed and call was present in foregroundIncomingCallkeepMap`
122
+ `Ending call in callkeep: ${activeCallCid}, reason: activeCallCid changed or was removed and call was present in foregroundIncomingCallkeepMap`,
123
123
  );
124
124
  unsubscribeCallkeepEvents(activeCallCid).then(() =>
125
- callkeep.endCall(foregroundIncomingCallkeepMap.uuid)
125
+ callkeep.endCall(foregroundIncomingCallkeepMap.uuid),
126
126
  );
127
127
  }
128
128
  };
@@ -153,17 +153,17 @@ export const useIosCallkeepWithCallingStateEffect = () => {
153
153
  // push notification was displayed
154
154
  // but the call has been accepted through the app and not through the native dialer
155
155
  const foregroundCallkeepMap = RxUtils.getCurrentValue(
156
- voipCallkeepCallOnForegroundMap$
156
+ voipCallkeepCallOnForegroundMap$,
157
157
  );
158
158
  if (foregroundCallkeepMap && foregroundCallkeepMap.cid === activeCallCid) {
159
159
  log(
160
- // @ts-ignore
161
- `Accepting call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in foregroundCallkeepMap`
160
+ // @ts-expect-error - types issue
161
+ `Accepting call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in foregroundCallkeepMap`,
162
162
  );
163
163
  // no need to keep this reference anymore
164
164
  voipCallkeepCallOnForegroundMap$.next(undefined);
165
165
  NativeModules.StreamVideoReactNative?.removeIncomingCall(
166
- activeCallCid
166
+ activeCallCid,
167
167
  ).then(() => callkeep.answerIncomingCall(foregroundCallkeepMap.uuid));
168
168
  // this call should be accepted in callkeep
169
169
  setAcceptedForegroundCallkeepMap(foregroundCallkeepMap);
@@ -181,11 +181,11 @@ export const useIosCallkeepWithCallingStateEffect = () => {
181
181
  // the call was left using the leave button in the app and not through native dialer
182
182
  if (activeCallCid === acceptedForegroundCallkeepMap?.cid) {
183
183
  log(
184
- // @ts-ignore
185
- `Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in acceptedForegroundCallkeepMap`
184
+ // @ts-expect-error - types issue
185
+ `Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in acceptedForegroundCallkeepMap`,
186
186
  );
187
187
  unsubscribeCallkeepEvents(activeCallCid).then(() =>
188
- callkeep.endCall(acceptedForegroundCallkeepMap.uuid)
188
+ callkeep.endCall(acceptedForegroundCallkeepMap.uuid),
189
189
  );
190
190
  setAcceptedForegroundCallkeepMap(undefined);
191
191
  return;
@@ -193,15 +193,15 @@ export const useIosCallkeepWithCallingStateEffect = () => {
193
193
  // this was a call which had push notification displayed but never joined
194
194
  // the user rejected in the app and not from native dialer
195
195
  const foregroundIncomingCallkeepMap = RxUtils.getCurrentValue(
196
- voipCallkeepCallOnForegroundMap$
196
+ voipCallkeepCallOnForegroundMap$,
197
197
  );
198
198
  if (activeCallCid === foregroundIncomingCallkeepMap?.cid) {
199
199
  log(
200
- // @ts-ignore
201
- `Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in foregroundIncomingCallkeepMap`
200
+ // @ts-expect-error - types issue
201
+ `Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in foregroundIncomingCallkeepMap`,
202
202
  );
203
203
  unsubscribeCallkeepEvents(activeCallCid).then(() =>
204
- callkeep.endCall(foregroundIncomingCallkeepMap.uuid)
204
+ callkeep.endCall(foregroundIncomingCallkeepMap.uuid),
205
205
  );
206
206
  // no need to keep this reference anymore
207
207
  voipCallkeepCallOnForegroundMap$.next(undefined);
@@ -211,15 +211,15 @@ export const useIosCallkeepWithCallingStateEffect = () => {
211
211
  // it was an accepted call from native dialer and not from the app
212
212
  // the user left using the leave button in the app
213
213
  const nativeDialerAcceptedCallMap = RxUtils.getCurrentValue(
214
- voipCallkeepAcceptedCallOnNativeDialerMap$
214
+ voipCallkeepAcceptedCallOnNativeDialerMap$,
215
215
  );
216
216
  if (activeCallCid === nativeDialerAcceptedCallMap?.cid) {
217
217
  log(
218
- // @ts-ignore
219
- `Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in nativeDialerAcceptedCallMap`
218
+ // @ts-expect-error - types issue
219
+ `Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in nativeDialerAcceptedCallMap`,
220
220
  );
221
221
  unsubscribeCallkeepEvents(activeCallCid).then(() =>
222
- callkeep.endCall(nativeDialerAcceptedCallMap.uuid)
222
+ callkeep.endCall(nativeDialerAcceptedCallMap.uuid),
223
223
  );
224
224
  // no need to keep this reference anymore
225
225
  voipCallkeepAcceptedCallOnNativeDialerMap$.next(undefined);
@@ -2,13 +2,14 @@ import { type MutableRefObject, useEffect, useRef, useState } from 'react';
2
2
  import { getVoipPushNotificationLib } from '../../utils/push/libs';
3
3
 
4
4
  import { Platform } from 'react-native';
5
- import { onVoipNotificationReceived, StreamVideoRN } from '../../utils';
5
+ import { StreamVideoRN } from '../../utils';
6
+ import { onVoipNotificationReceived } from '../../utils/push/internal/ios';
6
7
  import {
7
8
  useConnectedUser,
8
9
  useStreamVideoClient,
9
10
  } from '@stream-io/video-react-bindings';
10
11
  import { setPushLogoutCallback } from '../../utils/internal/pushLogoutCallback';
11
- import { StreamVideoClient, getLogger } from '@stream-io/video-client';
12
+ import { getLogger, StreamVideoClient } from '@stream-io/video-client';
12
13
 
13
14
  const logger = getLogger(['useIosVoipPushEventsSetupEffect']);
14
15
 
@@ -16,12 +17,12 @@ const logger = getLogger(['useIosVoipPushEventsSetupEffect']);
16
17
  hence to support login and logout scenario of multiple users we keep of the last count of the listener that was added
17
18
  This helps in not removing the listeners when a new user logs in and overrides the last listener
18
19
  */
19
- let lastListener = { count: 0 };
20
+ const lastListener = { count: 0 };
20
21
 
21
22
  function setLogoutCallback(
22
23
  client: StreamVideoClient,
23
24
  token: string,
24
- lastVoipTokenRef: MutableRefObject<{ token: string; userId: string }>
25
+ lastVoipTokenRef: MutableRefObject<{ token: string; userId: string }>,
25
26
  ) {
26
27
  setPushLogoutCallback(async () => {
27
28
  lastVoipTokenRef.current = { token: '', userId: '' };
@@ -31,7 +32,7 @@ function setLogoutCallback(
31
32
  logger(
32
33
  'warn',
33
34
  'PushLogoutCallback - Failed to remove voip token from stream',
34
- err
35
+ err,
35
36
  );
36
37
  }
37
38
  });
@@ -62,7 +63,7 @@ export const useIosVoipPushEventsSetupEffect = () => {
62
63
  logger(
63
64
  'debug',
64
65
  'Sending unsent voip token to stream as user logged in after token was received, token: ' +
65
- unsentToken
66
+ unsentToken,
66
67
  );
67
68
  client
68
69
  .addVoipDevice(unsentToken, 'apn', pushConfig.ios.pushProviderName)
@@ -70,7 +71,7 @@ export const useIosVoipPushEventsSetupEffect = () => {
70
71
  setLogoutCallback(client, unsentToken, lastVoipTokenRef);
71
72
  logger(
72
73
  'debug',
73
- 'Sent unsent voip token to stream - token: ' + unsentToken
74
+ 'Sent unsent voip token to stream - token: ' + unsentToken,
74
75
  );
75
76
  lastVoipTokenRef.current = {
76
77
  token: unsentToken,
@@ -86,14 +87,22 @@ export const useIosVoipPushEventsSetupEffect = () => {
86
87
  useEffect(() => {
87
88
  const pushConfig = StreamVideoRN.getConfig().push;
88
89
  const pushProviderName = pushConfig?.ios.pushProviderName;
89
- if (Platform.OS !== 'ios' || !pushConfig || !client || !pushProviderName) {
90
+ if (Platform.OS !== 'ios' || !client || !pushProviderName) {
90
91
  return;
91
92
  }
92
93
  if (!pushConfig.android.incomingCallChannel) {
93
94
  // TODO: remove this check and find a better way once we have telecom integration for android
94
95
  getLogger(['useIosVoipPushEventsSetupEffect'])(
95
96
  'debug',
96
- 'android incomingCallChannel is not defined, so skipping the useIosVoipPushEventsSetupEffect'
97
+ 'android incomingCallChannel is not defined, so skipping the useIosVoipPushEventsSetupEffect',
98
+ );
99
+ return;
100
+ }
101
+ if (!pushConfig.android.incomingCallChannel) {
102
+ // TODO: remove this check and find a better way once we have telecom integration for android
103
+ getLogger(['useIosVoipPushEventsSetupEffect'])(
104
+ 'debug',
105
+ 'android incomingCallChannel is not defined, so skipping the useIosVoipPushEventsSetupEffect',
97
106
  );
98
107
  return;
99
108
  }
@@ -110,7 +119,7 @@ export const useIosVoipPushEventsSetupEffect = () => {
110
119
  if (!token) {
111
120
  logger(
112
121
  'debug',
113
- `Skipped sending voip token to stream no token was present - userId: ${userId} (possibly using a simulator)`
122
+ `Skipped sending voip token to stream no token was present - userId: ${userId} (possibly using a simulator)`,
114
123
  );
115
124
  setUnsentToken(token);
116
125
  return;
@@ -118,7 +127,7 @@ export const useIosVoipPushEventsSetupEffect = () => {
118
127
  if (!userId) {
119
128
  logger(
120
129
  'debug',
121
- `Skipped sending voip token to stream no user id was present - token: ${token}`
130
+ `Skipped sending voip token to stream no user id was present - token: ${token}`,
122
131
  );
123
132
  setUnsentToken(token);
124
133
  return;
@@ -127,20 +136,20 @@ export const useIosVoipPushEventsSetupEffect = () => {
127
136
  if (lastVoipToken.token === token && lastVoipToken.userId === userId) {
128
137
  logger(
129
138
  'debug',
130
- `Skipped sending voip token to stream as it is same as last token - token: ${token}, userId: ${userId}`
139
+ `Skipped sending voip token to stream as it is same as last token - token: ${token}, userId: ${userId}`,
131
140
  );
132
141
  return;
133
142
  }
134
143
  logger(
135
144
  'debug',
136
- `Sending voip token to stream, token: ${token} userId: ${userId}`
145
+ `Sending voip token to stream, token: ${token} userId: ${userId}`,
137
146
  );
138
147
  client
139
148
  .addVoipDevice(token, 'apn', pushProviderName)
140
149
  .then(() => {
141
150
  logger(
142
151
  'debug',
143
- `Sent voip token to stream, token: ${token} userId: ${userId}`
152
+ `Sent voip token to stream, token: ${token} userId: ${userId}`,
144
153
  );
145
154
  setLogoutCallback(client, token, lastVoipTokenRef);
146
155
  lastVoipTokenRef.current = { token, userId };
@@ -150,7 +159,7 @@ export const useIosVoipPushEventsSetupEffect = () => {
150
159
  logger(
151
160
  'warn',
152
161
  `Failed to send voip token to stream token: ${token} userId: ${userId}`,
153
- err
162
+ err,
154
163
  );
155
164
  });
156
165
  };
@@ -164,12 +173,12 @@ export const useIosVoipPushEventsSetupEffect = () => {
164
173
  if (!events || !Array.isArray(events) || events.length < 1) {
165
174
  return;
166
175
  }
167
- for (let voipPushEvent of events) {
168
- let { name, data } = voipPushEvent;
176
+ for (const voipPushEvent of events) {
177
+ const { name, data } = voipPushEvent;
169
178
  if (name === 'RNVoipPushRemoteNotificationsRegisteredEvent') {
170
179
  onTokenReceived(data);
171
180
  } else if (name === 'RNVoipPushRemoteNotificationReceivedEvent') {
172
- onVoipNotificationReceived(data);
181
+ onVoipNotificationReceived(data, pushConfig);
173
182
  }
174
183
  }
175
184
  });
@@ -181,7 +190,7 @@ export const useIosVoipPushEventsSetupEffect = () => {
181
190
  if (currentListenerCount !== lastListener.count) {
182
191
  logger(
183
192
  'debug',
184
- 'Skipped removing voip event listeners for user: ' + userId
193
+ 'Skipped removing voip event listeners for user: ' + userId,
185
194
  );
186
195
  return;
187
196
  }