@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
@@ -1 +1 @@
1
- {"version":3,"names":["reanimated","require","e","getReanimatedLib","onPackageNotFound"],"sourceRoot":"../../../../../src","sources":["utils/internal/optionallibs/reanimated.ts"],"mappings":"AAEA,IAAIA,UAAsC;AAE1C,IAAI;EACFA,UAAU,GAAGC,OAAO,CAAC,yBAAyB,CAAC;AACjD,CAAC,CAAC,OAAOC,CAAC,EAAE,CAAC;AAEb,OAAO,MAAMC,gBAAgB,GAAGA,CAACC,iBAAiB,GAAGA,CAAA,KAAM,CAAC,CAAC,KAAK;EAChE,IAAI,CAACJ,UAAU,EAAE;IACfI,iBAAiB,CAAC,CAAC;EACrB;EACA,OAAOJ,UAAU;AACnB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["reanimated","require","getReanimatedLib","onPackageNotFound"],"sourceRoot":"../../../../../src","sources":["utils/internal/optionallibs/reanimated.ts"],"mappings":"AAEA,IAAIA,UAAsC;AAE1C,IAAI;EACFA,UAAU,GAAGC,OAAO,CAAC,yBAAyB,CAAC;AACjD,CAAC,CAAC,MAAM,CAAC;AAET,OAAO,MAAMC,gBAAgB,GAAGA,CAACC,iBAAiB,GAAGA,CAAA,KAAM,CAAC,CAAC,KAAK;EAChE,IAAI,CAACH,UAAU,EAAE;IACfG,iBAAiB,CAAC,CAAC;EACrB;EACA,OAAOH,UAAU;AACnB,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- let pushLogoutCallbacks = {};
1
+ const pushLogoutCallbacks = {};
2
2
  export const setPushLogoutCallback = callback => {
3
3
  if (!pushLogoutCallbacks.current) {
4
4
  pushLogoutCallbacks.current = [callback];
@@ -1 +1 @@
1
- {"version":3,"names":["pushLogoutCallbacks","setPushLogoutCallback","callback","current","push"],"sourceRoot":"../../../../src","sources":["utils/internal/pushLogoutCallback.ts"],"mappings":"AAMA,IAAIA,mBAAwC,GAAG,CAAC,CAAC;AAEjD,OAAO,MAAMC,qBAAqB,GAAIC,QAAkB,IAAK;EAC3D,IAAI,CAACF,mBAAmB,CAACG,OAAO,EAAE;IAChCH,mBAAmB,CAACG,OAAO,GAAG,CAACD,QAAQ,CAAC;EAC1C,CAAC,MAAM;IACLF,mBAAmB,CAACG,OAAO,CAACC,IAAI,CAACF,QAAQ,CAAC;EAC5C;AACF,CAAC;AAED,eAAeF,mBAAmB","ignoreList":[]}
1
+ {"version":3,"names":["pushLogoutCallbacks","setPushLogoutCallback","callback","current","push"],"sourceRoot":"../../../../src","sources":["utils/internal/pushLogoutCallback.ts"],"mappings":"AAMA,MAAMA,mBAAwC,GAAG,CAAC,CAAC;AAEnD,OAAO,MAAMC,qBAAqB,GAAIC,QAAkB,IAAK;EAC3D,IAAI,CAACF,mBAAmB,CAACG,OAAO,EAAE;IAChCH,mBAAmB,CAACG,OAAO,GAAG,CAACD,QAAQ,CAAC;EAC1C,CAAC,MAAM;IACLF,mBAAmB,CAACG,OAAO,CAACC,IAAI,CAACF,QAAQ,CAAC;EAC5C;AACF,CAAC;AAED,eAAeF,mBAAmB","ignoreList":[]}
@@ -1,7 +1,7 @@
1
- import { CallingState, RxUtils, getLogger } from '@stream-io/video-client';
1
+ import { CallingState, getLogger, RxUtils } from '@stream-io/video-client';
2
2
  import { AppState, Platform } from 'react-native';
3
- import { getFirebaseMessagingLib, getExpoNotificationsLib, getNotifeeLibThrowIfNotInstalledForPush, getIncomingCallForegroundServiceTypes } from './libs';
4
- import { pushAcceptedIncomingCallCId$, pushRejectedIncomingCallCId$, pushTappedIncomingCallCId$, pushNonRingingCallData$, pushUnsubscriptionCallbacks$, pushAndroidBackgroundDeliveredIncomingCallCId$ } from './internal/rxSubjects';
3
+ import { getExpoNotificationsLib, getExpoNotificationsLibNoThrow, getFirebaseMessagingLib, getFirebaseMessagingLibNoThrow, getIncomingCallForegroundServiceTypes, getNotifeeLibThrowIfNotInstalledForPush } from './libs';
4
+ import { pushAcceptedIncomingCallCId$, pushAndroidBackgroundDeliveredIncomingCallCId$, pushNonRingingCallData$, pushRejectedIncomingCallCId$, pushTappedIncomingCallCId$, pushUnsubscriptionCallbacks$ } from './internal/rxSubjects';
5
5
  import { canAddPushWSSubscriptionsRef, clearPushWSEventSubscriptions, processCallFromPushInBackground, shouldCallBeEnded } from './internal/utils';
6
6
  import { setPushLogoutCallback } from '../internal/pushLogoutCallback';
7
7
  import { getAndroidDefaultRingtoneUrl } from '../getAndroidDefaultRingtoneUrl';
@@ -13,15 +13,16 @@ let lastFirebaseToken = {
13
13
  userId: ''
14
14
  };
15
15
 
16
- /** Send token to stream, create notification channel, */
16
+ /** Send token to stream */
17
17
  export async function initAndroidPushToken(client, pushConfig, setUnsubscribeListener) {
18
18
  if (Platform.OS !== 'android' || !pushConfig.android.pushProviderName) {
19
19
  return;
20
20
  }
21
+ const logger = getLogger(['initAndroidPushToken']);
21
22
  const setDeviceToken = async token => {
22
23
  const userId = client.streamClient._user?.id ?? '';
23
24
  if (lastFirebaseToken.token === token && lastFirebaseToken.userId === userId) {
24
- getLogger(['initAndroidPushToken'])('debug', `Skipping setting the same token again for userId: ${userId} and token: ${token}`);
25
+ logger('debug', `Skipping setting the same token again for userId: ${userId} and token: ${token}`);
25
26
  return;
26
27
  }
27
28
  lastFirebaseToken = {
@@ -34,27 +35,33 @@ export async function initAndroidPushToken(client, pushConfig, setUnsubscribeLis
34
35
  userId: ''
35
36
  };
36
37
  try {
37
- getLogger(['initAndroidPushToken'])('debug', `Logout removeDeviceToken: ${token}`);
38
+ logger('debug', `Logout removeDeviceToken: ${token}`);
38
39
  await client.removeDevice(token);
39
40
  } catch (err) {
40
- const logger = getLogger(['initAndroidPushToken']);
41
41
  logger('warn', 'Failed to remove firebase token from stream', err);
42
42
  }
43
43
  });
44
44
  const push_provider_name = pushConfig.android.pushProviderName;
45
+ logger('debug', `sending token from firebase: ${token}`);
45
46
  await client.addDevice(token, 'firebase', push_provider_name);
46
47
  };
47
48
  if (pushConfig.isExpo) {
48
- const expoNotificationsLib = getExpoNotificationsLib();
49
- const subscription = expoNotificationsLib.addPushTokenListener(devicePushToken => {
50
- setDeviceToken(devicePushToken.data);
51
- });
52
- setUnsubscribeListener(() => subscription.remove());
53
- const devicePushToken = await expoNotificationsLib.getDevicePushTokenAsync();
54
- const token = devicePushToken.data;
55
- await setDeviceToken(token);
56
- } else {
57
- const messaging = getFirebaseMessagingLib();
49
+ const expoNotificationsLib = pushConfig.onTapNonRingingCallNotification ? getExpoNotificationsLib() : getExpoNotificationsLibNoThrow();
50
+ if (expoNotificationsLib) {
51
+ logger('debug', `setting expo notification token listeners`);
52
+ const subscription = expoNotificationsLib.addPushTokenListener(devicePushToken => {
53
+ setDeviceToken(devicePushToken.data);
54
+ });
55
+ setUnsubscribeListener(() => subscription.remove());
56
+ const devicePushToken = await expoNotificationsLib.getDevicePushTokenAsync();
57
+ const token = devicePushToken.data;
58
+ await setDeviceToken(token);
59
+ }
60
+ }
61
+ // TODO: remove the incomingCallChannel check and find a better way once we have telecom integration for android
62
+ const messaging = pushConfig.isExpo && !pushConfig.android.incomingCallChannel ? getFirebaseMessagingLibNoThrow(true) : getFirebaseMessagingLib();
63
+ if (messaging) {
64
+ logger('debug', `setting firebase token listeners`);
58
65
  const unsubscribe = messaging().onTokenRefresh(refreshedToken => setDeviceToken(refreshedToken));
59
66
  setUnsubscribeListener(unsubscribe);
60
67
  const token = await messaging().getToken();
@@ -164,7 +171,7 @@ export const firebaseDataHandler = async data => {
164
171
  const incomingCallNotificationTextGetters = pushConfig.android.incomingCallNotificationTextGetters;
165
172
  if (!incomingCallChannel || !incomingCallNotificationTextGetters) {
166
173
  const logger = getLogger(['firebaseMessagingOnMessageHandler']);
167
- logger('info', "Can't show incoming call notification as either or both incomingCallChannel and incomingCallNotificationTextGetters were not provided");
174
+ logger('error', "Can't show incoming call notification as either or both incomingCallChannel and incomingCallNotificationTextGetters were not provided");
168
175
  return;
169
176
  }
170
177
  /*
@@ -1 +1 @@
1
- {"version":3,"names":["CallingState","RxUtils","getLogger","AppState","Platform","getFirebaseMessagingLib","getExpoNotificationsLib","getNotifeeLibThrowIfNotInstalledForPush","getIncomingCallForegroundServiceTypes","pushAcceptedIncomingCallCId$","pushRejectedIncomingCallCId$","pushTappedIncomingCallCId$","pushNonRingingCallData$","pushUnsubscriptionCallbacks$","pushAndroidBackgroundDeliveredIncomingCallCId$","canAddPushWSSubscriptionsRef","clearPushWSEventSubscriptions","processCallFromPushInBackground","shouldCallBeEnded","setPushLogoutCallback","getAndroidDefaultRingtoneUrl","StreamVideoRN","ACCEPT_CALL_ACTION_ID","DECLINE_CALL_ACTION_ID","lastFirebaseToken","token","userId","initAndroidPushToken","client","pushConfig","setUnsubscribeListener","OS","android","pushProviderName","setDeviceToken","streamClient","_user","id","removeDevice","err","logger","push_provider_name","addDevice","isExpo","expoNotificationsLib","subscription","addPushTokenListener","devicePushToken","data","remove","getDevicePushTokenAsync","messaging","unsubscribe","onTokenRefresh","refreshedToken","getToken","firebaseDataHandler","getConfig","push","sender","notifeeLib","notifee","default","settings","getNotificationSettings","authorizationStatus","type","call_cid","created_by_id","receiver_id","shouldCallBeClosed","callToCheck","mustEndCall","canListenToWS","current","currentState","asForegroundService","registerForegroundService","Promise","createStreamVideoClient","stopForegroundService","callFromPush","onRingingCall","_shouldCallBeClosed","unsubscribeFunctions","on","event","_canListenToWS","forEach","fn","state","callingState$","subscribe","callingState","IDLE","LEFT","unsubscriptionCallbacks","getCurrentValue","next","incomingCallChannel","incomingCallNotificationTextGetters","sound","createChannel","getTitle","getBody","createdUserName","created_by_display_name","title","body","channelId","displayNotification","smallIcon","importance","foregroundServiceTypes","ongoing","vibrationPattern","pressAction","launchActivity","actions","category","AndroidCategory","CALL","fullScreenAction","timeoutAfter","cancelDisplayedNotification","callChannel","callNotificationTextGetters","cid","onAndroidNotifeeEvent","isBackground","detail","notification","notificationId","hasObservers","observed","didPressDecline","EventType","ACTION_PRESS","didDismiss","DISMISSED","mustDecline","mustAccept","PRESS","DELIVERED","onTapNonRingingCallNotification"],"sourceRoot":"../../../../src","sources":["utils/push/android.ts"],"mappings":"AAAA,SAEEA,YAAY,EACZC,OAAO,EAEPC,SAAS,QACJ,yBAAyB;AAChC,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AAKjD,SACEC,uBAAuB,EACvBC,uBAAuB,EACvBC,uCAAuC,EAGvCC,qCAAqC,QAChC,QAAQ;AACf,SACEC,4BAA4B,EAC5BC,4BAA4B,EAC5BC,0BAA0B,EAC1BC,uBAAuB,EACvBC,4BAA4B,EAC5BC,8CAA8C,QACzC,uBAAuB;AAC9B,SACEC,4BAA4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I,SAAS,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAClC,OAAO,EACP,iDAAiDiE,QAAQ,EAC3D,CAAC;MACDtC,UAAU,CAACmH,+BAA+B,GACxC7E,QAAQ,EACRnB,IAAI,CAACkB,IACP,CAAC;IACH;EACF;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["CallingState","getLogger","RxUtils","AppState","Platform","getExpoNotificationsLib","getExpoNotificationsLibNoThrow","getFirebaseMessagingLib","getFirebaseMessagingLibNoThrow","getIncomingCallForegroundServiceTypes","getNotifeeLibThrowIfNotInstalledForPush","pushAcceptedIncomingCallCId$","pushAndroidBackgroundDeliveredIncomingCallCId$","pushNonRingingCallData$","pushRejectedIncomingCallCId$","pushTappedIncomingCallCId$","pushUnsubscriptionCallbacks$","canAddPushWSSubscriptionsRef","clearPushWSEventSubscriptions","processCallFromPushInBackground","shouldCallBeEnded","setPushLogoutCallback","getAndroidDefaultRingtoneUrl","StreamVideoRN","ACCEPT_CALL_ACTION_ID","DECLINE_CALL_ACTION_ID","lastFirebaseToken","token","userId","initAndroidPushToken","client","pushConfig","setUnsubscribeListener","OS","android","pushProviderName","logger","setDeviceToken","streamClient","_user","id","removeDevice","err","push_provider_name","addDevice","isExpo","expoNotificationsLib","onTapNonRingingCallNotification","subscription","addPushTokenListener","devicePushToken","data","remove","getDevicePushTokenAsync","messaging","incomingCallChannel","unsubscribe","onTokenRefresh","refreshedToken","getToken","firebaseDataHandler","getConfig","push","sender","notifeeLib","notifee","default","settings","getNotificationSettings","authorizationStatus","type","call_cid","created_by_id","receiver_id","shouldCallBeClosed","callToCheck","mustEndCall","canListenToWS","current","currentState","asForegroundService","registerForegroundService","Promise","createStreamVideoClient","stopForegroundService","callFromPush","onRingingCall","_shouldCallBeClosed","unsubscribeFunctions","on","event","_canListenToWS","forEach","fn","state","callingState$","subscribe","callingState","IDLE","LEFT","unsubscriptionCallbacks","getCurrentValue","next","incomingCallNotificationTextGetters","sound","createChannel","getTitle","getBody","createdUserName","created_by_display_name","title","body","channelId","displayNotification","smallIcon","importance","foregroundServiceTypes","ongoing","vibrationPattern","pressAction","launchActivity","actions","category","AndroidCategory","CALL","fullScreenAction","timeoutAfter","cancelDisplayedNotification","callChannel","callNotificationTextGetters","cid","onAndroidNotifeeEvent","isBackground","detail","notification","notificationId","hasObservers","observed","didPressDecline","EventType","ACTION_PRESS","didDismiss","DISMISSED","mustDecline","mustAccept","PRESS","DELIVERED"],"sourceRoot":"../../../../src","sources":["utils/push/android.ts"],"mappings":"AAAA,SAEEA,YAAY,EACZC,SAAS,EACTC,OAAO,QAEF,yBAAyB;AAChC,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AAKjD,SAEEC,uBAAuB,EACvBC,8BAA8B,EAC9BC,uBAAuB,EACvBC,8BAA8B,EAC9BC,qCAAqC,EACrCC,uCAAuC,QAElC,QAAQ;AACf,SACEC,4BAA4B,EAC5BC,8CAA8C,EAC9CC,uBAAuB,EACvBC,4BAA4B,EAC5BC,0BAA0B,EAC1BC,4BAA4B,QACvB,uBAAuB;AAC9B,SACEC,4BAA4B,EAC5BC,6BAA6B,EAC7BC,+BAA+B,EAC/BC,iBAAiB,QACZ,kBAAkB;AACzB,SAASC,qBAAqB,QAAQ,gCAAgC;AACtE,SAASC,4BAA4B,QAAQ,iCAAiC;AAC9E,SAASC,aAAa,QAAQ,kBAAkB;AAEhD,MAAMC,qBAAqB,GAAG,QAAQ;AACtC,MAAMC,sBAAsB,GAAG,SAAS;AAUxC,IAAIC,iBAAiB,GAAG;EAAEC,KAAK,EAAE,EAAE;EAAEC,MAAM,EAAE;AAAG,CAAC;;AAEjD;AACA,OAAO,eAAeC,oBAAoBA,CACxCC,MAAyB,EACzBC,UAAsB,EACtBC,sBAAyD,EACzD;EACA,IAAI5B,QAAQ,CAAC6B,EAAE,KAAK,SAAS,IAAI,CAACF,UAAU,CAACG,OAAO,CAACC,gBAAgB,EAAE;IACrE;EACF;EACA,MAAMC,MAAM,GAAGnC,S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Utils } from '@stream-io/video-client';
2
+ import { AppState, NativeModules, Platform } from 'react-native';
3
+ import { getCallKeepLib, getVoipPushNotificationLib } from '../libs';
4
+ import { pushUnsubscriptionCallbacks$, voipPushNotificationCallCId$ } from './rxSubjects';
5
+ import { canAddPushWSSubscriptionsRef, shouldCallBeEnded } from './utils';
6
+ export const onVoipNotificationReceived = async (notification, pushConfig) => {
7
+ /* --- Example payload ---
8
+ {
9
+ "aps": {
10
+ "alert": {
11
+ "body": "",
12
+ "title": "Vishal Narkhede is calling you"
13
+ },
14
+ "badge": 0,
15
+ "category": "stream.video",
16
+ "mutable-content": 1
17
+ },
18
+ "stream": {
19
+ "call_cid": "default:ixbm7y0k74pbjnq",
20
+ "call_display_name": "",
21
+ "created_by_display_name": "Vishal Narkhede",
22
+ "created_by_id": "vishalexpo",
23
+ "receiver_id": "santhoshexpo",
24
+ "sender": "stream.video",
25
+ "type": "call.ring",
26
+ "version": "v2"
27
+ }
28
+ } */
29
+ const sender = notification?.stream?.sender;
30
+ const type = notification?.stream?.type;
31
+ // do not process any other notifications other than stream.video or ringing
32
+ if (sender !== 'stream.video' && type !== 'call.ring') {
33
+ return;
34
+ }
35
+ const call_cid = notification?.stream?.call_cid;
36
+ if (!call_cid || Platform.OS !== 'ios' || !pushConfig.ios.pushProviderName) {
37
+ return;
38
+ }
39
+ const logger = getLogger(['setupIosVoipPushEvents']);
40
+ const client = await pushConfig.createStreamVideoClient();
41
+ if (!client) {
42
+ logger('debug', 'client not found, not processing call.ring voip push notification');
43
+ return;
44
+ }
45
+ const callFromPush = await client.onRingingCall(call_cid);
46
+ let uuid = '';
47
+ try {
48
+ uuid = await NativeModules?.StreamVideoReactNative?.getIncomingCallUUid(call_cid);
49
+ } catch (error) {
50
+ logger('error', 'Error in getting call uuid from native module', error);
51
+ }
52
+ if (!uuid) {
53
+ logger('error', `Not processing call.ring push notification, as no uuid found for call_cid: ${call_cid}`);
54
+ return;
55
+ }
56
+ const created_by_id = notification?.stream?.created_by_id;
57
+ const receiver_id = notification?.stream?.receiver_id;
58
+ function closeCallIfNecessary() {
59
+ const {
60
+ mustEndCall,
61
+ callkeepReason
62
+ } = shouldCallBeEnded(callFromPush, created_by_id, receiver_id);
63
+ if (mustEndCall) {
64
+ const callkeep = getCallKeepLib();
65
+ logger('debug', `callkeep.reportEndCallWithUUID for uuid: ${uuid}, call_cid: ${call_cid}, reason: ${callkeepReason}`);
66
+ callkeep.reportEndCallWithUUID(uuid, callkeepReason);
67
+ const voipPushNotification = getVoipPushNotificationLib();
68
+ voipPushNotification.onVoipNotificationCompleted(uuid);
69
+ return true;
70
+ }
71
+ return false;
72
+ }
73
+ const closed = closeCallIfNecessary();
74
+ const canListenToWS = () => canAddPushWSSubscriptionsRef.current && AppState.currentState !== 'active';
75
+ if (!closed && canListenToWS()) {
76
+ const unsubscribe = callFromPush.on('all', event => {
77
+ const _canListenToWS = canListenToWS();
78
+ if (!_canListenToWS) {
79
+ logger('debug', `unsubscribe due to event callCid: ${call_cid} canListenToWS: ${_canListenToWS}`, event);
80
+ unsubscribe();
81
+ return;
82
+ }
83
+ const _closed = closeCallIfNecessary();
84
+ if (_closed) {
85
+ logger('debug', `unsubscribe due to event callCid: ${call_cid} canListenToWS: ${_canListenToWS} shouldCallBeClosed: ${_closed}`, event);
86
+ unsubscribe();
87
+ }
88
+ });
89
+ const unsubscriptionCallbacks = RxUtils.getCurrentValue(pushUnsubscriptionCallbacks$) ?? [];
90
+ pushUnsubscriptionCallbacks$.next([...unsubscriptionCallbacks, unsubscribe]);
91
+ }
92
+ // send the info to this subject, it is listened by callkeep events
93
+ // callkeep events will then accept/reject the call
94
+ logger('debug', `call_cid:${call_cid} uuid:${uuid} received and processed from call.ring push notification`);
95
+ voipPushNotificationCallCId$.next(call_cid);
96
+ };
97
+ //# sourceMappingURL=ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getLogger","RxUtils","AppState","NativeModules","Platform","getCallKeepLib","getVoipPushNotificationLib","pushUnsubscriptionCallbacks$","voipPushNotificationCallCId$","canAddPushWSSubscriptionsRef","shouldCallBeEnded","onVoipNotificationReceived","notification","pushConfig","sender","stream","type","call_cid","OS","ios","pushProviderName","logger","client","createStreamVideoClient","callFromPush","onRingingCall","uuid","StreamVideoReactNative","getIncomingCallUUid","error","created_by_id","receiver_id","closeCallIfNecessary","mustEndCall","callkeepReason","callkeep","reportEndCallWithUUID","voipPushNotification","onVoipNotificationCompleted","closed","canListenToWS","current","currentState","unsubscribe","on","event","_canListenToWS","_closed","unsubscriptionCallbacks","getCurrentValue","next"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/ios.ts"],"mappings":"AAAA,SAASA,SAAS,EAAEC,OAAO,QAAQ,yBAAyB;AAC5D,SAASC,QAAQ,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAChE,SAASC,cAAc,EAAEC,0BAA0B,QAAQ,SAAS;AACpE,SACEC,4BAA4B,EAC5BC,4BAA4B,QACvB,cAAc;AACrB,SAASC,4BAA4B,EAAEC,iBAAiB,QAAQ,SAAS;AAGzE,OAAO,MAAMC,0BAA0B,GAAG,MAAAA,CACxCC,YAAiB,EACjBC,UAAkD,KAC/C;EACH;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,MAAMC,MAAM,GAAGF,YAAY,EAAEG,MAAM,EAAED,MAAM;EAC3C,MAAME,IAAI,GAAGJ,YAAY,EAAEG,MAAM,EAAEC,IAAI;EACvC;EACA,IAAIF,MAAM,KAAK,cAAc,IAAIE,IAAI,KAAK,WAAW,EAAE;IACrD;EACF;EACA,MAAMC,QAAQ,GAAGL,YAAY,EAAEG,MAAM,EAAEE,QAAQ;EAC/C,IAAI,CAACA,QAAQ,IAAIb,QAAQ,CAACc,EAAE,KAAK,KAAK,IAAI,CAACL,UAAU,CAACM,GAAG,CAACC,gBAAgB,EAAE;IAC1E;EACF;EACA,MAAMC,M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AGP,oBAAoB,CAAC,CAAC;EACrC,MAAMQ,aAAa,GAAGA,CAAA,KACpB/B,4BAA4B,CAACgC,OAAO,IAAIvC,QAAQ,CAACwC,YAAY,KAAK,QAAQ;EAC5E,IAAI,CAACH,MAAM,IAAIC,aAAa,CAAC,CAAC,EAAE;IAC9B,MAAMG,WAAW,GAAGnB,YAAY,CAACoB,EAAE,CAAC,KAAK,EAAGC,KAAK,IAAK;MACpD,MAAMC,cAAc,GAAGN,aAAa,CAAC,CAAC;MACtC,IAAI,CAACM,cAAc,EAAE;QACnBzB,MAAM,CACJ,OAAO,EACP,qCAAqCJ,QAAQ,mBAAmB6B,cAAc,EAAE,EAChFD,KACF,CAAC;QACDF,WAAW,CAAC,CAAC;QACb;MACF;MACA,MAAMI,OAAO,GAAGf,oBAAoB,CAAC,CAAC;MACtC,IAAIe,OAAO,EAAE;QACX1B,MAAM,CACJ,OAAO,EACP,qCAAqCJ,QAAQ,mBAAmB6B,cAAc,wBAAwBC,OAAO,EAAE,EAC/GF,KACF,CAAC;QACDF,WAAW,CAAC,CAAC;MACf;IACF,CAAC,CAAC;IACF,MAAMK,uBAAuB,GAC3B/C,OAAO,CAACgD,eAAe,CAAC1C,4BAA4B,CAAC,IAAI,EAAE;IAC7DA,4BAA4B,CAAC2C,IAAI,CAAC,CAChC,GAAGF,uBAAuB,EAC1BL,WAAW,CACZ,CAAC;EACJ;EACA;EACA;EACAtB,MAAM,CACJ,OAAO,EACP,YAAYJ,QAAQ,SAASS,IAAI,0DACnC,CAAC;EACDlB,4BAA4B,CAAC0C,IAAI,CAACjC,QAAQ,CAAC;AAC7C,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { CallingState, RxUtils, getLogger } from '@stream-io/video-client';
1
+ import { CallingState, getLogger, RxUtils } from '@stream-io/video-client';
2
2
  import { onNewCallNotification } from '../../internal/newNotificationCallbacks';
3
3
  import { pushUnsubscriptionCallbacks$ } from './rxSubjects';
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["CallingState","RxUtils","getLogger","onNewCallNotification","pushUnsubscriptionCallbacks$","shouldCallBeEnded","callFromPush","created_by_id","receiver_id","callSession","state","session","rejected_by","accepted_by","mustEndCall","callkeepReason","cid","processCallFromPushInBackground","pushConfig","call_cid","action","videoClient","createStreamVideoClient","e","logger","processCallFromPush","client","onRingingCall","publishOptions","updatePublishOptions","join","canReject","callingState","RINGING","leave","reject","reason","processNonIncomingCallFromPush","nonRingingNotificationType","_callFromPush","calls","find","c","callType","callId","split","call","get","clearPushWSEventSubscriptions","unsubscriptionCallbacks","getCurrentValue","forEach","cb","next","undefined","canAddPushWSSubscriptionsRef","current"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/utils.ts"],"mappings":"AAAA,SAEEA,YAAY,EACZC,OAAO,EAEPC,SAAS,QACJ,yBAAyB;AAKhC,SAASC,qBAAqB,QAAQ,yCAAyC;AAC/E,SAASC,4BAA4B,QAAQ,cAAc;AAM3D;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGA,CAC/BC,YAAkB,EAClBC,aAAiC,EACjCC,WAA+B,KAC5B;EACH;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,MAAMC,WAAW,GAAGH,YAAY,CAACI,KAAK,CAACC,OAAO;EAC9C,MAAMC,WAAW,GAAGH,WAAW,EAAEG,WAAW;EAC5C,MAAMC,WAAW,GAAGJ,WAAW,EAAEI,WAAW;EAC5C,IAAIC,WAAW,GAAG,KAAK;EACvB,IAAIC,cAAc,GAAG,CAAC;EACtB,IAAIR,aAAa,IAAIK,WAAW,EAAE;IAChC,IAAIA,WAAW,CAACL,aAAa,CAAC,EAAE;MAC9B;MACAO,WAAW,GAAG,IAAI;MAClBC,cAAc,GAAG,CAAC;IACpB;EACF,CAAC,MAAM,IAAIP,WAAW,IAAII,WAAW,EAAE;IACrC,IAAIA,WAAW,CAACJ,WAAW,CAAC,EAAE;MAC5B;MACAM,WAAW,GAAG,IAAI;MAClBC,cAAc,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BjC,YAAY,GAAGiC,aAAa;IAC9B,CAAC,MAAM;MACL;MACA,MAAM,CAACI,QAAQ,EAAEC,MAAM,CAAC,GAAGzB,QAAQ,CAAC0B,KAAK,CAAC,GAAG,CAAC;MAC9CvC,YAAY,GAAGoB,MAAM,CAACoB,IAAI,CAACH,QAAQ,EAAYC,MAAgB,CAAC;MAChE,MAAMtC,YAAY,CAACyC,GAAG,CAAC,CAAC;IAC1B;EACF,CAAC,CAAC,OAAOxB,CAAC,EAAE;IACV,MAAMC,MAAM,GAAGtB,SAAS,CAAC,CAAC,gCAAgC,CAAC,CAAC;IAC5DsB,MAAM,CAAC,OAAO,EAAE,6CAA6C,EAAED,CAAC,CAAC;IACjE;EACF;EACApB,qBAAqB,CAACG,YAAY,EAAEgC,0BAA0B,CAAC;AACjE,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMU,6BAA6B,GAAGA,CAAA,KAAM;EACjD,MAAMC,uBAAuB,GAAGhD,OAAO,CAACiD,eAAe,CACrD9C,4BACF,CAAC;EACD,IAAI6C,uBAAuB,EAAE;IAC3BA,uBAAuB,CAACE,OAAO,CAAEC,EAAE,IAAKA,EAAE,CAAC,CAAC,CAAC;EAC/C;EACAhD,4BAA4B,CAACiD,IAAI,CAACC,SAAS,CAAC;AAC9C,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA0D,GAAG;EACxEC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["CallingState","getLogger","RxUtils","onNewCallNotification","pushUnsubscriptionCallbacks$","shouldCallBeEnded","callFromPush","created_by_id","receiver_id","callSession","state","session","rejected_by","accepted_by","mustEndCall","callkeepReason","cid","processCallFromPushInBackground","pushConfig","call_cid","action","videoClient","createStreamVideoClient","e","logger","processCallFromPush","client","onRingingCall","publishOptions","updatePublishOptions","join","canReject","callingState","RINGING","leave","reject","reason","processNonIncomingCallFromPush","nonRingingNotificationType","_callFromPush","calls","find","c","callType","callId","split","call","get","clearPushWSEventSubscriptions","unsubscriptionCallbacks","getCurrentValue","forEach","cb","next","undefined","canAddPushWSSubscriptionsRef","current"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/utils.ts"],"mappings":"AAAA,SAEEA,YAAY,EACZC,SAAS,EACTC,OAAO,QAEF,yBAAyB;AAKhC,SAASC,qBAAqB,QAAQ,yCAAyC;AAC/E,SAASC,4BAA4B,QAAQ,cAAc;AAM3D;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGA,CAC/BC,YAAkB,EAClBC,aAAiC,EACjCC,WAA+B,KAC5B;EACH;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,MAAMC,WAAW,GAAGH,YAAY,CAACI,KAAK,CAACC,OAAO;EAC9C,MAAMC,WAAW,GAAGH,WAAW,EAAEG,WAAW;EAC5C,MAAMC,WAAW,GAAGJ,WAAW,EAAEI,WAAW;EAC5C,IAAIC,WAAW,GAAG,KAAK;EACvB,IAAIC,cAAc,GAAG,CAAC;EACtB,IAAIR,aAAa,IAAIK,WAAW,EAAE;IAChC,IAAIA,WAAW,CAACL,aAAa,CAAC,EAAE;MAC9B;MACAO,WAAW,GAAG,IAAI;MAClBC,cAAc,GAAG,CAAC;IACpB;EACF,CAAC,MAAM,IAAIP,WAAW,IAAII,WAAW,EAAE;IACrC,IAAIA,WAAW,CAACJ,WAAW,CAAC,EAAE;MAC5B;MACAM,WAAW,GAAG,IAAI;MAClBC,cAAc,GAAG,CAAC;IACpB;EACF,CAAC,MAAM,IAAIP,WAAW,IAAIK,WAAW,EAAE;IACrC,IAAIA,WAAW,CAACL,WAAW,CAAC,EAAE;MAC5B;MACAM,WAAW,GAAG,IAAI;MAClBC,cAAc,GAAG,CAAC;IACpB;EACF;EACAd,SAAS,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAC9B,OAAO,EACP,YAAYK,YAAY,CAACU,GAAG,iBAAiBF,WAAW,oBAAoBC,cAAc,EAC5F,CAAC;EACD,OAAO;IAAED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GAAGvB,SAAS,CAAC,CAAC,gCAAgC,CAAC,CAAC;IAC5DuB,MAAM,CAAC,OAAO,EAAE,6CAA6C,EAAED,CAAC,CAAC;IACjE;EACF;EACApB,qBAAqB,CAACG,YAAY,EAAEgC,0BAA0B,CAAC;AACjE,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMU,6BAA6B,GAAGA,CAAA,KAAM;EACjD,MAAMC,uBAAuB,GAAG/C,OAAO,CAACgD,eAAe,CACrD9C,4BACF,CAAC;EACD,IAAI6C,uBAAuB,EAAE;IAC3BA,uBAAuB,CAACE,OAAO,CAAEC,EAAE,IAAKA,EAAE,CAAC,CAAC,CAAC;EAC/C;EACAhD,4BAA4B,CAACiD,IAAI,CAACC,SAAS,CAAC;AAC9C,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA0D,GAAG;EACxEC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
@@ -1,10 +1,9 @@
1
- import { AppState, NativeModules, Platform } from 'react-native';
2
- import { pushNonRingingCallData$, pushUnsubscriptionCallbacks$, voipPushNotificationCallCId$ } from './internal/rxSubjects';
3
- import { getCallKeepLib, getExpoNotificationsLib, getNotifeeLibThrowIfNotInstalledForPush, getPushNotificationIosLib, getVoipPushNotificationLib } from './libs';
4
- import { RxUtils, getLogger } from '@stream-io/video-client';
1
+ import { Platform } from 'react-native';
2
+ import { pushNonRingingCallData$ } from './internal/rxSubjects';
3
+ import { getExpoNotificationsLib, getNotifeeLibThrowIfNotInstalledForPush, getPushNotificationIosLib } from './libs';
4
+ import { getLogger } from '@stream-io/video-client';
5
5
  import { setPushLogoutCallback } from '../internal/pushLogoutCallback';
6
6
  import { StreamVideoRN } from '../StreamVideoRN';
7
- import { shouldCallBeEnded, canAddPushWSSubscriptionsRef } from './internal/utils';
8
7
  let lastApnToken = {
9
8
  token: '',
10
9
  userId: ''
@@ -120,18 +119,20 @@ export async function initIosNonVoipToken(client, pushConfig, setUnsubscribeList
120
119
  };
121
120
  if (pushConfig.isExpo) {
122
121
  const expoNotificationsLib = getExpoNotificationsLib();
123
- expoNotificationsLib.getDevicePushTokenAsync().then(devicePushToken => {
124
- logger('debug', 'Got device token - expoNotificationsLib.getDevicePushTokenAsync', devicePushToken.data);
125
- setDeviceToken(devicePushToken.data);
126
- });
127
- const subscription = expoNotificationsLib.addPushTokenListener(devicePushToken => {
128
- logger('debug', 'Got device token - expoNotificationsLib.addPushTokenListener', devicePushToken.data);
129
- setDeviceToken(devicePushToken.data);
130
- });
131
- setUnsubscribeListener(() => {
132
- logger('debug', `removed expo addPushTokenListener`);
133
- subscription.remove();
134
- });
122
+ if (expoNotificationsLib) {
123
+ expoNotificationsLib.getDevicePushTokenAsync().then(devicePushToken => {
124
+ logger('debug', 'Got device token - expoNotificationsLib.getDevicePushTokenAsync', devicePushToken.data);
125
+ setDeviceToken(devicePushToken.data);
126
+ });
127
+ const subscription = expoNotificationsLib.addPushTokenListener(devicePushToken => {
128
+ logger('debug', 'Got device token - expoNotificationsLib.addPushTokenListener', devicePushToken.data);
129
+ setDeviceToken(devicePushToken.data);
130
+ });
131
+ setUnsubscribeListener(() => {
132
+ logger('debug', `removed expo addPushTokenListener`);
133
+ subscription.remove();
134
+ });
135
+ }
135
136
  } else {
136
137
  const pushNotificationIosLib = getPushNotificationIosLib();
137
138
  pushNotificationIosLib.addEventListener('register', token => {
@@ -144,96 +145,4 @@ export async function initIosNonVoipToken(client, pushConfig, setUnsubscribeList
144
145
  });
145
146
  }
146
147
  }
147
- export const onVoipNotificationReceived = async notification => {
148
- /* --- Example payload ---
149
- {
150
- "aps": {
151
- "alert": {
152
- "body": "",
153
- "title": "Vishal Narkhede is calling you"
154
- },
155
- "badge": 0,
156
- "category": "stream.video",
157
- "mutable-content": 1
158
- },
159
- "stream": {
160
- "call_cid": "default:ixbm7y0k74pbjnq",
161
- "call_display_name": "",
162
- "created_by_display_name": "Vishal Narkhede",
163
- "created_by_id": "vishalexpo",
164
- "receiver_id": "santhoshexpo",
165
- "sender": "stream.video",
166
- "type": "call.ring",
167
- "version": "v2"
168
- }
169
- } */
170
- const sender = notification?.stream?.sender;
171
- const type = notification?.stream?.type;
172
- // do not process any other notifications other than stream.video or ringing
173
- if (sender !== 'stream.video' && type !== 'call.ring') {
174
- return;
175
- }
176
- const call_cid = notification?.stream?.call_cid;
177
- const pushConfig = StreamVideoRN.getConfig().push;
178
- if (!call_cid || Platform.OS !== 'ios' || !pushConfig) {
179
- return;
180
- }
181
- const logger = getLogger(['setupIosVoipPushEvents']);
182
- const client = await pushConfig.createStreamVideoClient();
183
- if (!client) {
184
- logger('debug', 'client not found, not processing call.ring voip push notification');
185
- return;
186
- }
187
- const callFromPush = await client.onRingingCall(call_cid);
188
- let uuid = '';
189
- try {
190
- uuid = await NativeModules?.StreamVideoReactNative?.getIncomingCallUUid(call_cid);
191
- } catch (error) {
192
- logger('error', 'Error in getting call uuid from native module', error);
193
- }
194
- if (!uuid) {
195
- logger('error', `Not processing call.ring push notification, as no uuid found for call_cid: ${call_cid}`);
196
- return;
197
- }
198
- const created_by_id = notification?.stream?.created_by_id;
199
- const receiver_id = notification?.stream?.receiver_id;
200
- function closeCallIfNecessary() {
201
- const {
202
- mustEndCall,
203
- callkeepReason
204
- } = shouldCallBeEnded(callFromPush, created_by_id, receiver_id);
205
- if (mustEndCall) {
206
- const callkeep = getCallKeepLib();
207
- logger('debug', `callkeep.reportEndCallWithUUID for uuid: ${uuid}, call_cid: ${call_cid}, reason: ${callkeepReason}`);
208
- callkeep.reportEndCallWithUUID(uuid, callkeepReason);
209
- const voipPushNotification = getVoipPushNotificationLib();
210
- voipPushNotification.onVoipNotificationCompleted(uuid);
211
- return true;
212
- }
213
- return false;
214
- }
215
- const closed = closeCallIfNecessary();
216
- const canListenToWS = () => canAddPushWSSubscriptionsRef.current && AppState.currentState !== 'active';
217
- if (!closed && canListenToWS()) {
218
- const unsubscribe = callFromPush.on('all', event => {
219
- const _canListenToWS = canListenToWS();
220
- if (!_canListenToWS) {
221
- logger('debug', `unsubscribe due to event callCid: ${call_cid} canListenToWS: ${_canListenToWS}`, event);
222
- unsubscribe();
223
- return;
224
- }
225
- const _closed = closeCallIfNecessary();
226
- if (_closed) {
227
- logger('debug', `unsubscribe due to event callCid: ${call_cid} canListenToWS: ${_canListenToWS} shouldCallBeClosed: ${_closed}`, event);
228
- unsubscribe();
229
- }
230
- });
231
- const unsubscriptionCallbacks = RxUtils.getCurrentValue(pushUnsubscriptionCallbacks$) ?? [];
232
- pushUnsubscriptionCallbacks$.next([...unsubscriptionCallbacks, unsubscribe]);
233
- }
234
- // send the info to this subject, it is listened by callkeep events
235
- // callkeep events will then accept/reject the call
236
- logger('debug', `call_cid:${call_cid} uuid:${uuid} received and processed from call.ring push notification`);
237
- voipPushNotificationCallCId$.next(call_cid);
238
- };
239
148
  //# sourceMappingURL=ios.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["AppState","NativeModules","Platform","pushNonRingingCallData$","pushUnsubscriptionCallbacks$","voipPushNotificationCallCId$","getCallKeepLib","getExpoNotificationsLib","getNotifeeLibThrowIfNotInstalledForPush","getPushNotificationIosLib","getVoipPushNotificationLib","RxUtils","getLogger","setPushLogoutCallback","StreamVideoRN","shouldCallBeEnded","canAddPushWSSubscriptionsRef","lastApnToken","token","userId","processNonRingingNotificationStreamPayload","streamPayload","sender","type","cid","call_cid","logger","next","undefined","oniOSExpoNotificationEvent","event","pushConfig","getConfig","push","trigger","request","payload","stream","JSON","stringify","oniOSNotifeeEvent","OS","detail","notifeeLib","EventType","PRESS","notification","data","result","onTapNonRingingCallNotification","onPushNotificationiOSStreamVideoEvent","pushNotificationIosLib","getData","isClicked","userInteraction","finish","FetchResult","NoData","initIosNonVoipToken","client","setUnsubscribeListener","ios","pushProviderName","setDeviceToken","streamClient","_user","id","removeDevice","err","push_provider_name","addDevice","then","catch","isExpo","expoNotificationsLib","getDevicePushTokenAsync","devicePushToken","subscription","addPushTokenListener","remove","addEventListener","removeEventListener","onVoipNotificationReceived","createStreamVideoClient","callFromPush","onRingingCall","uuid","StreamVideoReactNative","getIncomingCallUUid","error","created_by_id","receiver_id","closeCallIfNecessary","mustEndCall","callkeepReason","callkeep","reportEndCallWithUUID","voipPushNotification","onVoipNotificationCompleted","closed","canListenToWS","current","currentState","unsubscribe","on","_canListenToWS","_closed","unsubscriptionCallbacks","getCurrentValue"],"sourceRoot":"../../../../src","sources":["utils/push/ios.ts"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAEhE,SACEC,uBAAuB,EACvBC,4BAA4B,EAC5BC,4BAA4B,QACvB,uBAAuB;AAC9B,SAEEC,cAAc,EACdC,uBAAuB,EACvBC,uCAAuC,EACvCC,yBAAyB,EACzBC,0BAA0B,QAErB,QAAQ;AACf,SAASC,OAAO,EAAqBC,SAAS,QAAQ,yBAAyB;AAC/E,SAASC,qBAAqB,QAAQ,gCAAgC;AAEtE,SAASC,aAAa,QAAQ,kBAAkB;AAEhD,SACEC,iBAAiB,EACjBC,4BAA4B,QACvB,kBAAkB;AAIzB,IAAIC,YAAY,GAAG;EAAEC,KAAK,EAAE,EAAE;EAAEC,MAAM,EAAE;AAAG,CAAC;AAE5C,SAASC,0CAA0CA,CACjDC,aAAgC,EAChC;EACA,IACEA,aAAa,EAAEC,MAAM,KAAK,cAAc,IACxCD,aAAa,EAAEE,IAAI,KAAK,WAAW,EACnC;IACA,MAAMC,GAAG,GAAGH,aAAa,CAACI,QAAQ;IAClC,MAAMF,IAAI,GAAGF,aAAa,CAACE,IAAI;IAC/B,MAAMG,MAAM,GAAGd,SAAS,CAAC,CAAC,4CAA4C,CAAC,CAAC;IACxEc,MAAM,CAAC,OAAO,EAAE,eAAeF,GAAG,KAAKD,IAAI,EAAE,CAAC;IAC9CpB,uBAAuB,CAACwB,IAAI,CAAC;MAAEH,GAAG;MAAED;IAAK,CAAC,CAAC;IAC3C,OAAO;MAAEC,GAAG;MAAED;IAAK,CAAC;EACtB;EAC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qCAAqCD,QAAQ,mBAAmBgF,cAAc,wBAAwBC,OAAO,EAAE,EAC/G5E,KACF,CAAC;QACDyE,WAAW,CAAC,CAAC;MACf;IACF,CAAC,CAAC;IACF,MAAMI,uBAAuB,GAC3BhG,OAAO,CAACiG,eAAe,CAACxG,4BAA4B,CAAC,IAAI,EAAE;IAC7DA,4BAA4B,CAACuB,IAAI,CAAC,CAChC,GAAGgF,uBAAuB,EAC1BJ,WAAW,CACZ,CAAC;EACJ;EACA;EACA;EACA7E,MAAM,CACJ,OAAO,EACP,YAAYD,QAAQ,SAAS6D,IAAI,0DACnC,CAAC;EACDjF,4BAA4B,CAACsB,IAAI,CAACF,QAAQ,CAAC;AAC7C,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Platform","pushNonRingingCallData$","getExpoNotificationsLib","getNotifeeLibThrowIfNotInstalledForPush","getPushNotificationIosLib","getLogger","setPushLogoutCallback","StreamVideoRN","lastApnToken","token","userId","processNonRingingNotificationStreamPayload","streamPayload","sender","type","cid","call_cid","logger","next","undefined","oniOSExpoNotificationEvent","event","pushConfig","getConfig","push","trigger","request","payload","stream","JSON","stringify","oniOSNotifeeEvent","OS","detail","notifeeLib","EventType","PRESS","notification","data","result","onTapNonRingingCallNotification","onPushNotificationiOSStreamVideoEvent","pushNotificationIosLib","getData","isClicked","userInteraction","finish","FetchResult","NoData","initIosNonVoipToken","client","setUnsubscribeListener","ios","pushProviderName","setDeviceToken","streamClient","_user","id","removeDevice","err","push_provider_name","addDevice","then","catch","isExpo","expoNotificationsLib","getDevicePushTokenAsync","devicePushToken","subscription","addPushTokenListener","remove","addEventListener","removeEventListener"],"sourceRoot":"../../../../src","sources":["utils/push/ios.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SAASC,uBAAuB,QAAQ,uBAAuB;AAC/D,SAEEC,uBAAuB,EACvBC,uCAAuC,EACvCC,yBAAyB,QAEpB,QAAQ;AACf,SAASC,SAAS,QAA2B,yBAAyB;AACt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oB,CAC3DF,eAAe,IAAK;QACnBlD,MAAM,CACJ,OAAO,EACP,8DAA8D,EAC9DkD,eAAe,CAAC7B,IAClB,CAAC;QACDgB,cAAc,CAACa,eAAe,CAAC7B,IAAI,CAAC;MACtC,CACF,CAAC;MACDa,sBAAsB,CAAC,MAAM;QAC3BlC,MAAM,CAAC,OAAO,EAAE,mCAAmC,CAAC;QACpDmD,YAAY,CAACE,MAAM,CAAC,CAAC;MACvB,CAAC,CAAC;IACJ;EACF,CAAC,MAAM;IACL,MAAM5B,sBAAsB,GAAGtC,yBAAyB,CAAC,CAAC;IAC1DsC,sBAAsB,CAAC6B,gBAAgB,CAAC,UAAU,EAAG9D,KAAK,IAAK;MAC7DQ,MAAM,CACJ,OAAO,EACP,wEAAwE,EACxER,KACF,CAAC;MACD6C,cAAc,CAAC7C,KAAK,CAAC;IACvB,CAAC,CAAC;IACF0C,sBAAsB,CAAC,MAAM;MAC3BlC,MAAM,CAAC,OAAO,EAAE,wDAAwD,CAAC;MACzEyB,sBAAsB,CAAC8B,mBAAmB,CAAC,UAAU,CAAC;IACxD,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  let callkeep;
2
2
  try {
3
3
  callkeep = require('react-native-callkeep').default;
4
- } catch (_e) {}
4
+ } catch {}
5
5
  export function getCallKeepLib() {
6
6
  if (!callkeep) {
7
7
  throw Error('react-native-callkeep library is not installed. Please see https://github.com/react-native-webrtc/react-native-callkeep#Installation for installation instructions');
@@ -1 +1 @@
1
- {"version":3,"names":["callkeep","require","default","_e","getCallKeepLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/callkeep.ts"],"mappings":"AAEA,IAAIA,QAAoC;AAExC,IAAI;EACFA,QAAQ,GAAGC,OAAO,CAAC,uBAAuB,CAAC,CAACC,OAAO;AACrD,CAAC,CAAC,OAAOC,EAAE,EAAE,CAAC;AAEd,OAAO,SAASC,cAAcA,CAAA,EAAG;EAC/B,IAAI,CAACJ,QAAQ,EAAE;IACb,MAAMK,KAAK,CACT,oKACF,CAAC;EACH;EACA,OAAOL,QAAQ;AACjB","ignoreList":[]}
1
+ {"version":3,"names":["callkeep","require","default","getCallKeepLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/callkeep.ts"],"mappings":"AAEA,IAAIA,QAAoC;AAExC,IAAI;EACFA,QAAQ,GAAGC,OAAO,CAAC,uBAAuB,CAAC,CAACC,OAAO;AACrD,CAAC,CAAC,MAAM,CAAC;AAET,OAAO,SAASC,cAAcA,CAAA,EAAG;EAC/B,IAAI,CAACH,QAAQ,EAAE;IACb,MAAMI,KAAK,CACT,oKACF,CAAC;EACH;EACA,OAAOJ,QAAQ;AACjB","ignoreList":[]}
@@ -1,10 +1,17 @@
1
+ import { getLogger } from '@stream-io/video-client';
1
2
  let expoNotificationsLib;
2
3
  try {
3
4
  expoNotificationsLib = require('expo-notifications');
4
- } catch (_e) {}
5
+ } catch {}
5
6
  export function getExpoNotificationsLib() {
6
7
  if (!expoNotificationsLib) {
7
- throw Error('expo-notifications library is not installed. Please see https://docs.expo.dev/versions/latest/sdk/notifications/ for installation instructions');
8
+ throw Error('expo-notifications library is not installed. Please see https://docs.expo.dev/versions/latest/sdk/notifications/ for installation instructions. It is required for non ringing push notifications.');
9
+ }
10
+ return expoNotificationsLib;
11
+ }
12
+ export function getExpoNotificationsLibNoThrow() {
13
+ if (!expoNotificationsLib) {
14
+ getLogger(['getExpoNotificationsLibNoThrow'])('debug', 'expo-notifications library is not installed. It is required for non ringing push notifications and not for ringing');
8
15
  }
9
16
  return expoNotificationsLib;
10
17
  }
@@ -1 +1 @@
1
- {"version":3,"names":["expoNotificationsLib","require","_e","getExpoNotificationsLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/expoNotifications.ts"],"mappings":"AAMA,IAAIA,oBAAsD;AAE1D,IAAI;EACFA,oBAAoB,GAAGC,OAAO,CAAC,oBAAoB,CAAC;AACtD,CAAC,CAAC,OAAOC,EAAE,EAAE,CAAC;AAEd,OAAO,SAASC,uBAAuBA,CAAA,EAAG;EACxC,IAAI,CAACH,oBAAoB,EAAE;IACzB,MAAMI,KAAK,CACT,gJACF,CAAC;EACH;EACA,OAAOJ,oBAAoB;AAC7B","ignoreList":[]}
1
+ {"version":3,"names":["getLogger","expoNotificationsLib","require","getExpoNotificationsLib","Error","getExpoNotificationsLibNoThrow"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/expoNotifications.ts"],"mappings":"AAAA,SAASA,SAAS,QAAQ,yBAAyB;AAOnD,IAAIC,oBAAsD;AAE1D,IAAI;EACFA,oBAAoB,GAAGC,OAAO,CAAC,oBAAoB,CAAC;AACtD,CAAC,CAAC,MAAM,CAAC;AAET,OAAO,SAASC,uBAAuBA,CAAA,EAAG;EACxC,IAAI,CAACF,oBAAoB,EAAE;IACzB,MAAMG,KAAK,CACT,oMACF,CAAC;EACH;EACA,OAAOH,oBAAoB;AAC7B;AAEA,OAAO,SAASI,8BAA8BA,CAAA,EAAG;EAC/C,IAAI,CAACJ,oBAAoB,EAAE;IACzBD,SAAS,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAC3C,OAAO,EACP,oHACF,CAAC;EACH;EACA,OAAOC,oBAAoB;AAC7B","ignoreList":[]}
@@ -10,7 +10,7 @@ export function getFirebaseMessagingLib() {
10
10
  export function getFirebaseMessagingLibNoThrow(isExpo) {
11
11
  if (!lib) {
12
12
  const logger = getLogger(['getFirebaseMessagingLibNoThrow']);
13
- logger('warn', `${isExpo ? 'In Expo, @react-native-firebase/messaging library is required to receive ringing notifications in app killed state for Android.' : ''}${INSTALLATION_INSTRUCTION}`);
13
+ logger('debug', `${isExpo ? 'In Expo, @react-native-firebase/messaging library is required to receive ringing notifications in app killed state for Android.' : ''}${INSTALLATION_INSTRUCTION}`);
14
14
  }
15
15
  return lib;
16
16
  }
@@ -1 +1 @@
1
- {"version":3,"names":["getLogger","lib","INSTALLATION_INSTRUCTION","getFirebaseMessagingLib","Error","getFirebaseMessagingLibNoThrow","isExpo","logger"],"sourceRoot":"../../../../../../src","sources":["utils/push/libs/firebaseMessaging/index.ts"],"mappings":"AAAA,SAASA,SAAS,QAAQ,yBAAyB;AACnD,SAAoBC,GAAG,QAAQ,OAAO;AAKtC,MAAMC,wBAAwB,GAC5B,6FAA6F;AAE/F,OAAO,SAASC,uBAAuBA,CAAA,EAAG;EACxC,IAAI,CAACF,GAAG,EAAE;IACR,MAAMG,KAAK,CACT,qDAAqD,GACnDF,wBACJ,CAAC;EACH;EACA,OAAOD,GAAG;AACZ;AAEA,OAAO,SAASI,8BAA8BA,CAACC,MAAe,EAAE;EAC9D,IAAI,CAACL,GAAG,EAAE;IACR,MAAMM,MAAM,GAAGP,SAAS,CAAC,CAAC,gCAAgC,CAAC,CAAC;IAC5DO,MAAM,CACJ,MAAM,EACN,GACED,MAAM,GACF,iIAAiI,GACjI,EAAE,GACLJ,wBAAwB,EAC7B,CAAC;EACH;EACA,OAAOD,GAAG;AACZ","ignoreList":[]}
1
+ {"version":3,"names":["getLogger","lib","INSTALLATION_INSTRUCTION","getFirebaseMessagingLib","Error","getFirebaseMessagingLibNoThrow","isExpo","logger"],"sourceRoot":"../../../../../../src","sources":["utils/push/libs/firebaseMessaging/index.ts"],"mappings":"AAAA,SAASA,SAAS,QAAQ,yBAAyB;AACnD,SAASC,GAAG,QAAmB,OAAO;AAKtC,MAAMC,wBAAwB,GAC5B,6FAA6F;AAE/F,OAAO,SAASC,uBAAuBA,CAAA,EAAG;EACxC,IAAI,CAACF,GAAG,EAAE;IACR,MAAMG,KAAK,CACT,qDAAqD,GACnDF,wBACJ,CAAC;EACH;EACA,OAAOD,GAAG;AACZ;AAEA,OAAO,SAASI,8BAA8BA,CAACC,MAAe,EAAE;EAC9D,IAAI,CAACL,GAAG,EAAE;IACR,MAAMM,MAAM,GAAGP,SAAS,CAAC,CAAC,gCAAgC,CAAC,CAAC;IAC5DO,MAAM,CACJ,OAAO,EACP,GACED,MAAM,GACF,iIAAiI,GACjI,EAAE,GACLJ,wBAAwB,EAC7B,CAAC;EACH;EACA,OAAOD,GAAG;AACZ","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  let lib;
2
2
  try {
3
3
  lib = require('@react-native-firebase/messaging').default;
4
- } catch (_e) {}
4
+ } catch {}
5
5
  export { lib };
6
6
 
7
7
  /*
@@ -1 +1 @@
1
- {"version":3,"names":["lib","require","default","_e"],"sourceRoot":"../../../../../../src","sources":["utils/push/libs/firebaseMessaging/lib.ts"],"mappings":"AAEA,IAAIA,GAAqB;AAEzB,IAAI;EACFA,GAAG,GAAGC,OAAO,CAAC,kCAAkC,CAAC,CAACC,OAAO;AAC3D,CAAC,CAAC,OAAOC,EAAE,EAAE,CAAC;AAEd,SAASH,GAAG;;AAEZ;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":["lib","require","default"],"sourceRoot":"../../../../../../src","sources":["utils/push/libs/firebaseMessaging/lib.ts"],"mappings":"AAEA,IAAIA,GAAqB;AAEzB,IAAI;EACFA,GAAG,GAAGC,OAAO,CAAC,kCAAkC,CAAC,CAACC,OAAO;AAC3D,CAAC,CAAC,MAAM,CAAC;AAET,SAASF,GAAG;;AAEZ;AACA;AACA;AACA","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  let pushNotificationIosLib;
2
2
  try {
3
3
  pushNotificationIosLib = require('@react-native-community/push-notification-ios').default;
4
- } catch (_e) {}
4
+ } catch {}
5
5
  export function getPushNotificationIosLib() {
6
6
  if (!pushNotificationIosLib) {
7
7
  throw Error('@react-native-community/push-notification-ios library is not installed. Please install it using "yarn add @react-native-community/push-notification-ios" or "npm i @react-native-community/push-notification-ios --save"');
@@ -1 +1 @@
1
- {"version":3,"names":["pushNotificationIosLib","require","default","_e","getPushNotificationIosLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/iosPushNotification.ts"],"mappings":"AAGA,IAAIA,sBAA0D;AAM9D,IAAI;EACFA,sBAAsB,GACpBC,OAAO,CAAC,+CAA+C,CAAC,CAACC,OAAO;AACpE,CAAC,CAAC,OAAOC,EAAE,EAAE,CAAC;AAEd,OAAO,SAASC,yBAAyBA,CAAA,EAAG;EAC1C,IAAI,CAACJ,sBAAsB,EAAE;IAC3B,MAAMK,KAAK,CACT,0NACF,CAAC;EACH;EACA,OAAOL,sBAAsB;AAC/B","ignoreList":[]}
1
+ {"version":3,"names":["pushNotificationIosLib","require","default","getPushNotificationIosLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/iosPushNotification.ts"],"mappings":"AAKA,IAAIA,sBAA0D;AAI9D,IAAI;EACFA,sBAAsB,GACpBC,OAAO,CAAC,+CAA+C,CAAC,CAACC,OAAO;AACpE,CAAC,CAAC,MAAM,CAAC;AAET,OAAO,SAASC,yBAAyBA,CAAA,EAAG;EAC1C,IAAI,CAACH,sBAAsB,EAAE;IAC3B,MAAMI,KAAK,CACT,0NACF,CAAC;EACH;EACA,OAAOJ,sBAAsB;AAC/B","ignoreList":[]}