@stream-io/video-react-native-sdk 0.8.6 → 0.8.8

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 (540) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/commonjs/components/Call/CallContent/CallContent.js +5 -5
  3. package/dist/commonjs/components/Call/CallContent/CallContent.js.map +1 -1
  4. package/dist/commonjs/components/Call/CallContent/index.js.map +1 -1
  5. package/dist/commonjs/components/Call/CallControls/AcceptCallButton.js +2 -2
  6. package/dist/commonjs/components/Call/CallControls/AcceptCallButton.js.map +1 -1
  7. package/dist/commonjs/components/Call/CallControls/CallControls.js +1 -1
  8. package/dist/commonjs/components/Call/CallControls/CallControls.js.map +1 -1
  9. package/dist/commonjs/components/Call/CallControls/CallControlsButton.js +3 -3
  10. package/dist/commonjs/components/Call/CallControls/CallControlsButton.js.map +1 -1
  11. package/dist/commonjs/components/Call/CallControls/ChatButton.js +1 -1
  12. package/dist/commonjs/components/Call/CallControls/ChatButton.js.map +1 -1
  13. package/dist/commonjs/components/Call/CallControls/HangupCallButton.js +2 -2
  14. package/dist/commonjs/components/Call/CallControls/HangupCallButton.js.map +1 -1
  15. package/dist/commonjs/components/Call/CallControls/IncomingCallControls.js +1 -1
  16. package/dist/commonjs/components/Call/CallControls/IncomingCallControls.js.map +1 -1
  17. package/dist/commonjs/components/Call/CallControls/LobbyControls.js +1 -1
  18. package/dist/commonjs/components/Call/CallControls/LobbyControls.js.map +1 -1
  19. package/dist/commonjs/components/Call/CallControls/OutgoingCallControls.js +1 -1
  20. package/dist/commonjs/components/Call/CallControls/OutgoingCallControls.js.map +1 -1
  21. package/dist/commonjs/components/Call/CallControls/ReactionsButton.js +2 -2
  22. package/dist/commonjs/components/Call/CallControls/ReactionsButton.js.map +1 -1
  23. package/dist/commonjs/components/Call/CallControls/RejectCallButton.js +3 -3
  24. package/dist/commonjs/components/Call/CallControls/RejectCallButton.js.map +1 -1
  25. package/dist/commonjs/components/Call/CallControls/ScreenShareToggleButton.js +8 -80
  26. package/dist/commonjs/components/Call/CallControls/ScreenShareToggleButton.js.map +1 -1
  27. package/dist/commonjs/components/Call/CallControls/ToggleAudioPreviewButton.js +1 -1
  28. package/dist/commonjs/components/Call/CallControls/ToggleAudioPreviewButton.js.map +1 -1
  29. package/dist/commonjs/components/Call/CallControls/ToggleAudioPublishingButton.js +1 -1
  30. package/dist/commonjs/components/Call/CallControls/ToggleAudioPublishingButton.js.map +1 -1
  31. package/dist/commonjs/components/Call/CallControls/ToggleCameraFaceButton.js +2 -2
  32. package/dist/commonjs/components/Call/CallControls/ToggleCameraFaceButton.js.map +1 -1
  33. package/dist/commonjs/components/Call/CallControls/ToggleVideoPreviewButton.js +2 -2
  34. package/dist/commonjs/components/Call/CallControls/ToggleVideoPreviewButton.js.map +1 -1
  35. package/dist/commonjs/components/Call/CallControls/ToggleVideoPublishingButton.js +2 -2
  36. package/dist/commonjs/components/Call/CallControls/ToggleVideoPublishingButton.js.map +1 -1
  37. package/dist/commonjs/components/Call/CallControls/index.js.map +1 -1
  38. package/dist/commonjs/components/Call/CallControls/internal/ReactionsPicker.js +8 -8
  39. package/dist/commonjs/components/Call/CallControls/internal/ReactionsPicker.js.map +1 -1
  40. package/dist/commonjs/components/Call/CallLayout/CallParticipantsGrid.js +2 -2
  41. package/dist/commonjs/components/Call/CallLayout/CallParticipantsGrid.js.map +1 -1
  42. package/dist/commonjs/components/Call/CallLayout/CallParticipantsSpotlight.js +3 -3
  43. package/dist/commonjs/components/Call/CallLayout/CallParticipantsSpotlight.js.map +1 -1
  44. package/dist/commonjs/components/Call/CallLayout/index.js.map +1 -1
  45. package/dist/commonjs/components/Call/CallParticipantsList/CallParticipantsList.js +4 -5
  46. package/dist/commonjs/components/Call/CallParticipantsList/CallParticipantsList.js.map +1 -1
  47. package/dist/commonjs/components/Call/CallParticipantsList/index.js.map +1 -1
  48. package/dist/commonjs/components/Call/CallTopView/CallTopView.js +2 -2
  49. package/dist/commonjs/components/Call/CallTopView/CallTopView.js.map +1 -1
  50. package/dist/commonjs/components/Call/CallTopView/ParticipantsInfoBadge.js +1 -1
  51. package/dist/commonjs/components/Call/CallTopView/ParticipantsInfoBadge.js.map +1 -1
  52. package/dist/commonjs/components/Call/CallTopView/index.js.map +1 -1
  53. package/dist/commonjs/components/Call/Lobby/JoinCallButton.js +3 -3
  54. package/dist/commonjs/components/Call/Lobby/JoinCallButton.js.map +1 -1
  55. package/dist/commonjs/components/Call/Lobby/Lobby.js +6 -6
  56. package/dist/commonjs/components/Call/Lobby/Lobby.js.map +1 -1
  57. package/dist/commonjs/components/Call/Lobby/LobbyFooter.js +3 -3
  58. package/dist/commonjs/components/Call/Lobby/LobbyFooter.js.map +1 -1
  59. package/dist/commonjs/components/Call/Lobby/index.js.map +1 -1
  60. package/dist/commonjs/components/Call/RingingCallContent/IncomingCall.js +2 -2
  61. package/dist/commonjs/components/Call/RingingCallContent/IncomingCall.js.map +1 -1
  62. package/dist/commonjs/components/Call/RingingCallContent/JoiningCallIndicator.js +1 -1
  63. package/dist/commonjs/components/Call/RingingCallContent/JoiningCallIndicator.js.map +1 -1
  64. package/dist/commonjs/components/Call/RingingCallContent/OutgoingCall.js +1 -1
  65. package/dist/commonjs/components/Call/RingingCallContent/OutgoingCall.js.map +1 -1
  66. package/dist/commonjs/components/Call/RingingCallContent/RingingCallContent.js +2 -2
  67. package/dist/commonjs/components/Call/RingingCallContent/RingingCallContent.js.map +1 -1
  68. package/dist/commonjs/components/Call/RingingCallContent/UserInfo.js +4 -4
  69. package/dist/commonjs/components/Call/RingingCallContent/UserInfo.js.map +1 -1
  70. package/dist/commonjs/components/Call/RingingCallContent/index.js.map +1 -1
  71. package/dist/commonjs/components/Call/index.js.map +1 -1
  72. package/dist/commonjs/components/Livestream/HostLivestream/HostLivestream.js +3 -3
  73. package/dist/commonjs/components/Livestream/HostLivestream/HostLivestream.js.map +1 -1
  74. package/dist/commonjs/components/Livestream/HostLivestream/index.js.map +1 -1
  75. package/dist/commonjs/components/Livestream/LivestreamControls/HostLivestreamControls.js +1 -1
  76. package/dist/commonjs/components/Livestream/LivestreamControls/HostLivestreamControls.js.map +1 -1
  77. package/dist/commonjs/components/Livestream/LivestreamControls/HostStartStreamButton.js +8 -8
  78. package/dist/commonjs/components/Livestream/LivestreamControls/HostStartStreamButton.js.map +1 -1
  79. package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js +1 -1
  80. package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js.map +1 -1
  81. package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamMediaControls.js +1 -1
  82. package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamMediaControls.js.map +1 -1
  83. package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamScreenShareToggleButton.js +7 -69
  84. package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamScreenShareToggleButton.js.map +1 -1
  85. package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js +2 -2
  86. package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js.map +1 -1
  87. package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js +3 -3
  88. package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js.map +1 -1
  89. package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLivestreamControls.js +1 -1
  90. package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLivestreamControls.js.map +1 -1
  91. package/dist/commonjs/components/Livestream/LivestreamControls/index.js.map +1 -1
  92. package/dist/commonjs/components/Livestream/LivestreamLayout/LivestreamLayout.js +5 -6
  93. package/dist/commonjs/components/Livestream/LivestreamLayout/LivestreamLayout.js.map +1 -1
  94. package/dist/commonjs/components/Livestream/LivestreamLayout/index.js.map +1 -1
  95. package/dist/commonjs/components/Livestream/LivestreamPlayer/LivestreamPlayer.js +10 -9
  96. package/dist/commonjs/components/Livestream/LivestreamPlayer/LivestreamPlayer.js.map +1 -1
  97. package/dist/commonjs/components/Livestream/LivestreamPlayer/index.js.map +1 -1
  98. package/dist/commonjs/components/Livestream/LivestreamTopView/DurationBadge.js +5 -5
  99. package/dist/commonjs/components/Livestream/LivestreamTopView/DurationBadge.js.map +1 -1
  100. package/dist/commonjs/components/Livestream/LivestreamTopView/FollowerCount.js +1 -1
  101. package/dist/commonjs/components/Livestream/LivestreamTopView/FollowerCount.js.map +1 -1
  102. package/dist/commonjs/components/Livestream/LivestreamTopView/HostLivestreamTopView.js +1 -1
  103. package/dist/commonjs/components/Livestream/LivestreamTopView/HostLivestreamTopView.js.map +1 -1
  104. package/dist/commonjs/components/Livestream/LivestreamTopView/LiveIndicator.js +1 -1
  105. package/dist/commonjs/components/Livestream/LivestreamTopView/LiveIndicator.js.map +1 -1
  106. package/dist/commonjs/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.js +1 -1
  107. package/dist/commonjs/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.js.map +1 -1
  108. package/dist/commonjs/components/Livestream/LivestreamTopView/index.js.map +1 -1
  109. package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLivestream.js +3 -3
  110. package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLivestream.js.map +1 -1
  111. package/dist/commonjs/components/Livestream/ViewerLivestream/index.js.map +1 -1
  112. package/dist/commonjs/components/Livestream/index.js.map +1 -1
  113. package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js +5 -6
  114. package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js.map +1 -1
  115. package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js +4 -4
  116. package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js.map +1 -1
  117. package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/common.js.map +1 -1
  118. package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/index.js.map +1 -1
  119. package/dist/commonjs/components/Participant/FloatingParticipantView/index.js +2 -2
  120. package/dist/commonjs/components/Participant/FloatingParticipantView/index.js.map +1 -1
  121. package/dist/commonjs/components/Participant/ParticipantView/ParticipantLabel.js +3 -3
  122. package/dist/commonjs/components/Participant/ParticipantView/ParticipantLabel.js.map +1 -1
  123. package/dist/commonjs/components/Participant/ParticipantView/ParticipantNetworkQualityIndicator.js +1 -1
  124. package/dist/commonjs/components/Participant/ParticipantView/ParticipantNetworkQualityIndicator.js.map +1 -1
  125. package/dist/commonjs/components/Participant/ParticipantView/ParticipantReaction.js +3 -3
  126. package/dist/commonjs/components/Participant/ParticipantView/ParticipantReaction.js.map +1 -1
  127. package/dist/commonjs/components/Participant/ParticipantView/ParticipantVideoFallback.js +1 -1
  128. package/dist/commonjs/components/Participant/ParticipantView/ParticipantVideoFallback.js.map +1 -1
  129. package/dist/commonjs/components/Participant/ParticipantView/ParticipantView.js +1 -1
  130. package/dist/commonjs/components/Participant/ParticipantView/ParticipantView.js.map +1 -1
  131. package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer.js +7 -8
  132. package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer.js.map +1 -1
  133. package/dist/commonjs/components/Participant/ParticipantView/index.js.map +1 -1
  134. package/dist/commonjs/components/Participant/index.js.map +1 -1
  135. package/dist/commonjs/components/index.js.map +1 -1
  136. package/dist/commonjs/components/utility/Avatar.js +4 -4
  137. package/dist/commonjs/components/utility/Avatar.js.map +1 -1
  138. package/dist/commonjs/components/utility/ScreenShareOverlay.js +2 -2
  139. package/dist/commonjs/components/utility/ScreenShareOverlay.js.map +1 -1
  140. package/dist/commonjs/components/utility/index.js.map +1 -1
  141. package/dist/commonjs/constants/TestIds.js.map +1 -1
  142. package/dist/commonjs/constants/index.js.map +1 -1
  143. package/dist/commonjs/contexts/BackgroundFilters.js +7 -12
  144. package/dist/commonjs/contexts/BackgroundFilters.js.map +1 -1
  145. package/dist/commonjs/contexts/StreamVideoContext.js +2 -2
  146. package/dist/commonjs/contexts/StreamVideoContext.js.map +1 -1
  147. package/dist/commonjs/contexts/ThemeContext.js +3 -3
  148. package/dist/commonjs/contexts/ThemeContext.js.map +1 -1
  149. package/dist/commonjs/contexts/index.js.map +1 -1
  150. package/dist/commonjs/hooks/index.js +11 -0
  151. package/dist/commonjs/hooks/index.js.map +1 -1
  152. package/dist/commonjs/hooks/internal/useCallMediaStreamCleanup.js +2 -3
  153. package/dist/commonjs/hooks/internal/useCallMediaStreamCleanup.js.map +1 -1
  154. package/dist/commonjs/hooks/push/index.js.map +1 -1
  155. package/dist/commonjs/hooks/push/useInitAndroidTokenAndRest.js +1 -2
  156. package/dist/commonjs/hooks/push/useInitAndroidTokenAndRest.js.map +1 -1
  157. package/dist/commonjs/hooks/push/useIosCallKeepEventsSetupEffect.js +1 -1
  158. package/dist/commonjs/hooks/push/useIosCallKeepEventsSetupEffect.js.map +1 -1
  159. package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js +7 -7
  160. package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -1
  161. package/dist/commonjs/hooks/push/useIosInitRemoteNotifications.js +1 -2
  162. package/dist/commonjs/hooks/push/useIosInitRemoteNotifications.js.map +1 -1
  163. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js +6 -8
  164. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  165. package/dist/commonjs/hooks/push/useProcessPushCallEffect.js +1 -2
  166. package/dist/commonjs/hooks/push/useProcessPushCallEffect.js.map +1 -1
  167. package/dist/commonjs/hooks/push/useProcessPushNonRingingCallEffect.js +1 -3
  168. package/dist/commonjs/hooks/push/useProcessPushNonRingingCallEffect.js.map +1 -1
  169. package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js +3 -5
  170. package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  171. package/dist/commonjs/hooks/useApplyDefaultMediaStreamSettings.js +7 -7
  172. package/dist/commonjs/hooks/useApplyDefaultMediaStreamSettings.js.map +1 -1
  173. package/dist/commonjs/hooks/useAutoEnterPiPEffect.js.map +1 -1
  174. package/dist/commonjs/hooks/useIsInPiPMode.js +1 -2
  175. package/dist/commonjs/hooks/useIsInPiPMode.js.map +1 -1
  176. package/dist/commonjs/hooks/useIsIosScreenshareBroadcastStarted.js.map +1 -1
  177. package/dist/commonjs/hooks/usePaginatedLayoutSortPreset.js.map +1 -1
  178. package/dist/commonjs/hooks/usePermissionNotification.js.map +1 -1
  179. package/dist/commonjs/hooks/usePermissionRequest.js +2 -2
  180. package/dist/commonjs/hooks/usePermissionRequest.js.map +1 -1
  181. package/dist/commonjs/hooks/useScreenShareButton.js +89 -0
  182. package/dist/commonjs/hooks/useScreenShareButton.js.map +1 -0
  183. package/dist/commonjs/icons/Back.js +1 -1
  184. package/dist/commonjs/icons/Back.js.map +1 -1
  185. package/dist/commonjs/icons/CameraSwitch.js +1 -1
  186. package/dist/commonjs/icons/CameraSwitch.js.map +1 -1
  187. package/dist/commonjs/icons/Chat.js +1 -1
  188. package/dist/commonjs/icons/Chat.js.map +1 -1
  189. package/dist/commonjs/icons/EndStreamIcon.js +1 -1
  190. package/dist/commonjs/icons/EndStreamIcon.js.map +1 -1
  191. package/dist/commonjs/icons/Eye.js +1 -1
  192. package/dist/commonjs/icons/Eye.js.map +1 -1
  193. package/dist/commonjs/icons/LeaveStreamIcon.js +1 -1
  194. package/dist/commonjs/icons/LeaveStreamIcon.js.map +1 -1
  195. package/dist/commonjs/icons/Mic.js +1 -1
  196. package/dist/commonjs/icons/Mic.js.map +1 -1
  197. package/dist/commonjs/icons/MicOff.js +1 -1
  198. package/dist/commonjs/icons/MicOff.js.map +1 -1
  199. package/dist/commonjs/icons/Participants.js +1 -1
  200. package/dist/commonjs/icons/Participants.js.map +1 -1
  201. package/dist/commonjs/icons/Phone.js +1 -1
  202. package/dist/commonjs/icons/Phone.js.map +1 -1
  203. package/dist/commonjs/icons/PhoneDown.js +1 -1
  204. package/dist/commonjs/icons/PhoneDown.js.map +1 -1
  205. package/dist/commonjs/icons/PinVertical.js +1 -1
  206. package/dist/commonjs/icons/PinVertical.js.map +1 -1
  207. package/dist/commonjs/icons/Reaction.js +1 -1
  208. package/dist/commonjs/icons/Reaction.js.map +1 -1
  209. package/dist/commonjs/icons/ScreenShare.js +3 -3
  210. package/dist/commonjs/icons/ScreenShare.js.map +1 -1
  211. package/dist/commonjs/icons/ScreenShareIndicator.js +3 -3
  212. package/dist/commonjs/icons/ScreenShareIndicator.js.map +1 -1
  213. package/dist/commonjs/icons/Settings.js +3 -3
  214. package/dist/commonjs/icons/Settings.js.map +1 -1
  215. package/dist/commonjs/icons/ShieldBadge.js +1 -1
  216. package/dist/commonjs/icons/ShieldBadge.js.map +1 -1
  217. package/dist/commonjs/icons/Spotlight.js +1 -1
  218. package/dist/commonjs/icons/Spotlight.js.map +1 -1
  219. package/dist/commonjs/icons/StartStreamIcon.js +1 -1
  220. package/dist/commonjs/icons/StartStreamIcon.js.map +1 -1
  221. package/dist/commonjs/icons/StopScreenShare.js +3 -3
  222. package/dist/commonjs/icons/StopScreenShare.js.map +1 -1
  223. package/dist/commonjs/icons/ThreeDots.js +1 -1
  224. package/dist/commonjs/icons/ThreeDots.js.map +1 -1
  225. package/dist/commonjs/icons/TopViewBackground.js +1 -1
  226. package/dist/commonjs/icons/TopViewBackground.js.map +1 -1
  227. package/dist/commonjs/icons/Video.js +1 -1
  228. package/dist/commonjs/icons/Video.js.map +1 -1
  229. package/dist/commonjs/icons/VideoSlash.js +1 -1
  230. package/dist/commonjs/icons/VideoSlash.js.map +1 -1
  231. package/dist/commonjs/icons/index.js.map +1 -1
  232. package/dist/commonjs/index.js +2 -1
  233. package/dist/commonjs/index.js.map +1 -1
  234. package/dist/commonjs/providers/StreamCall.js +6 -10
  235. package/dist/commonjs/providers/StreamCall.js.map +1 -1
  236. package/dist/commonjs/providers/StreamVideo.js +4 -5
  237. package/dist/commonjs/providers/StreamVideo.js.map +1 -1
  238. package/dist/commonjs/theme/colors.js.map +1 -1
  239. package/dist/commonjs/theme/constants.js.map +1 -1
  240. package/dist/commonjs/theme/index.js.map +1 -1
  241. package/dist/commonjs/theme/theme.js.map +1 -1
  242. package/dist/commonjs/theme/types.js.map +1 -1
  243. package/dist/commonjs/translations/index.js +1 -1
  244. package/dist/commonjs/translations/index.js.map +1 -1
  245. package/dist/commonjs/utils/StreamVideoRN/index.js +3 -5
  246. package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
  247. package/dist/commonjs/utils/StreamVideoRN/types.js.map +1 -1
  248. package/dist/commonjs/utils/enterPiPAndroid.js +1 -2
  249. package/dist/commonjs/utils/enterPiPAndroid.js.map +1 -1
  250. package/dist/commonjs/utils/getAndroidDefaultRingtoneUrl.js +1 -2
  251. package/dist/commonjs/utils/getAndroidDefaultRingtoneUrl.js.map +1 -1
  252. package/dist/commonjs/utils/hooks/index.js.map +1 -1
  253. package/dist/commonjs/utils/hooks/useDebouncedValue.js.map +1 -1
  254. package/dist/commonjs/utils/hooks/usePrevious.js.map +1 -1
  255. package/dist/commonjs/utils/index.js.map +1 -1
  256. package/dist/commonjs/utils/internal/newNotificationCallbacks.js.map +1 -1
  257. package/dist/commonjs/utils/internal/optionallibs/gestureHandler.js.map +1 -1
  258. package/dist/commonjs/utils/internal/optionallibs/index.js.map +1 -1
  259. package/dist/commonjs/utils/internal/optionallibs/reanimated.js.map +1 -1
  260. package/dist/commonjs/utils/internal/pushLogoutCallback.js.map +1 -1
  261. package/dist/commonjs/utils/push/android.js +11 -19
  262. package/dist/commonjs/utils/push/android.js.map +1 -1
  263. package/dist/commonjs/utils/push/ios.js +7 -10
  264. package/dist/commonjs/utils/push/ios.js.map +1 -1
  265. package/dist/commonjs/utils/push/libs/callkeep.js.map +1 -1
  266. package/dist/commonjs/utils/push/libs/expoNotifications.js.map +1 -1
  267. package/dist/commonjs/utils/push/libs/expoTaskManager.js.map +1 -1
  268. package/dist/commonjs/utils/push/libs/firebaseMessaging.js.map +1 -1
  269. package/dist/commonjs/utils/push/libs/index.js.map +1 -1
  270. package/dist/commonjs/utils/push/libs/iosPushNotification.js.map +1 -1
  271. package/dist/commonjs/utils/push/libs/voipPushNotification.js.map +1 -1
  272. package/dist/commonjs/utils/push/rxSubjects.js.map +1 -1
  273. package/dist/commonjs/utils/push/utils.js +2 -2
  274. package/dist/commonjs/utils/push/utils.js.map +1 -1
  275. package/dist/commonjs/utils/setClientDetails.js +1 -1
  276. package/dist/commonjs/utils/setClientDetails.js.map +1 -1
  277. package/dist/commonjs/version.js +1 -1
  278. package/dist/commonjs/version.js.map +1 -1
  279. package/dist/module/components/Call/CallContent/CallContent.js +2 -2
  280. package/dist/module/components/Call/CallContent/CallContent.js.map +1 -1
  281. package/dist/module/components/Call/CallContent/index.js.map +1 -1
  282. package/dist/module/components/Call/CallControls/AcceptCallButton.js +1 -1
  283. package/dist/module/components/Call/CallControls/AcceptCallButton.js.map +1 -1
  284. package/dist/module/components/Call/CallControls/CallControls.js.map +1 -1
  285. package/dist/module/components/Call/CallControls/CallControlsButton.js +2 -2
  286. package/dist/module/components/Call/CallControls/CallControlsButton.js.map +1 -1
  287. package/dist/module/components/Call/CallControls/ChatButton.js.map +1 -1
  288. package/dist/module/components/Call/CallControls/HangupCallButton.js +1 -1
  289. package/dist/module/components/Call/CallControls/HangupCallButton.js.map +1 -1
  290. package/dist/module/components/Call/CallControls/IncomingCallControls.js.map +1 -1
  291. package/dist/module/components/Call/CallControls/LobbyControls.js.map +1 -1
  292. package/dist/module/components/Call/CallControls/OutgoingCallControls.js.map +1 -1
  293. package/dist/module/components/Call/CallControls/ReactionsButton.js.map +1 -1
  294. package/dist/module/components/Call/CallControls/RejectCallButton.js +2 -2
  295. package/dist/module/components/Call/CallControls/RejectCallButton.js.map +1 -1
  296. package/dist/module/components/Call/CallControls/ScreenShareToggleButton.js +8 -80
  297. package/dist/module/components/Call/CallControls/ScreenShareToggleButton.js.map +1 -1
  298. package/dist/module/components/Call/CallControls/ToggleAudioPreviewButton.js.map +1 -1
  299. package/dist/module/components/Call/CallControls/ToggleAudioPublishingButton.js.map +1 -1
  300. package/dist/module/components/Call/CallControls/ToggleCameraFaceButton.js +1 -1
  301. package/dist/module/components/Call/CallControls/ToggleCameraFaceButton.js.map +1 -1
  302. package/dist/module/components/Call/CallControls/ToggleVideoPreviewButton.js +1 -1
  303. package/dist/module/components/Call/CallControls/ToggleVideoPreviewButton.js.map +1 -1
  304. package/dist/module/components/Call/CallControls/ToggleVideoPublishingButton.js +1 -1
  305. package/dist/module/components/Call/CallControls/ToggleVideoPublishingButton.js.map +1 -1
  306. package/dist/module/components/Call/CallControls/index.js.map +1 -1
  307. package/dist/module/components/Call/CallControls/internal/ReactionsPicker.js +6 -6
  308. package/dist/module/components/Call/CallControls/internal/ReactionsPicker.js.map +1 -1
  309. package/dist/module/components/Call/CallLayout/CallParticipantsGrid.js +1 -1
  310. package/dist/module/components/Call/CallLayout/CallParticipantsGrid.js.map +1 -1
  311. package/dist/module/components/Call/CallLayout/CallParticipantsSpotlight.js +2 -2
  312. package/dist/module/components/Call/CallLayout/CallParticipantsSpotlight.js.map +1 -1
  313. package/dist/module/components/Call/CallLayout/index.js.map +1 -1
  314. package/dist/module/components/Call/CallParticipantsList/CallParticipantsList.js +2 -3
  315. package/dist/module/components/Call/CallParticipantsList/CallParticipantsList.js.map +1 -1
  316. package/dist/module/components/Call/CallParticipantsList/index.js.map +1 -1
  317. package/dist/module/components/Call/CallTopView/CallTopView.js.map +1 -1
  318. package/dist/module/components/Call/CallTopView/ParticipantsInfoBadge.js.map +1 -1
  319. package/dist/module/components/Call/CallTopView/index.js.map +1 -1
  320. package/dist/module/components/Call/Lobby/JoinCallButton.js +2 -2
  321. package/dist/module/components/Call/Lobby/JoinCallButton.js.map +1 -1
  322. package/dist/module/components/Call/Lobby/Lobby.js +5 -5
  323. package/dist/module/components/Call/Lobby/Lobby.js.map +1 -1
  324. package/dist/module/components/Call/Lobby/LobbyFooter.js +2 -2
  325. package/dist/module/components/Call/Lobby/LobbyFooter.js.map +1 -1
  326. package/dist/module/components/Call/Lobby/index.js.map +1 -1
  327. package/dist/module/components/Call/RingingCallContent/IncomingCall.js +1 -1
  328. package/dist/module/components/Call/RingingCallContent/IncomingCall.js.map +1 -1
  329. package/dist/module/components/Call/RingingCallContent/JoiningCallIndicator.js.map +1 -1
  330. package/dist/module/components/Call/RingingCallContent/OutgoingCall.js.map +1 -1
  331. package/dist/module/components/Call/RingingCallContent/RingingCallContent.js +1 -1
  332. package/dist/module/components/Call/RingingCallContent/RingingCallContent.js.map +1 -1
  333. package/dist/module/components/Call/RingingCallContent/UserInfo.js +3 -3
  334. package/dist/module/components/Call/RingingCallContent/UserInfo.js.map +1 -1
  335. package/dist/module/components/Call/RingingCallContent/index.js.map +1 -1
  336. package/dist/module/components/Call/index.js.map +1 -1
  337. package/dist/module/components/Livestream/HostLivestream/HostLivestream.js.map +1 -1
  338. package/dist/module/components/Livestream/HostLivestream/index.js.map +1 -1
  339. package/dist/module/components/Livestream/LivestreamControls/HostLivestreamControls.js.map +1 -1
  340. package/dist/module/components/Livestream/LivestreamControls/HostStartStreamButton.js +6 -6
  341. package/dist/module/components/Livestream/LivestreamControls/HostStartStreamButton.js.map +1 -1
  342. package/dist/module/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js.map +1 -1
  343. package/dist/module/components/Livestream/LivestreamControls/LivestreamMediaControls.js.map +1 -1
  344. package/dist/module/components/Livestream/LivestreamControls/LivestreamScreenShareToggleButton.js +7 -68
  345. package/dist/module/components/Livestream/LivestreamControls/LivestreamScreenShareToggleButton.js.map +1 -1
  346. package/dist/module/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js +1 -1
  347. package/dist/module/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js.map +1 -1
  348. package/dist/module/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js +1 -1
  349. package/dist/module/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js.map +1 -1
  350. package/dist/module/components/Livestream/LivestreamControls/ViewerLivestreamControls.js.map +1 -1
  351. package/dist/module/components/Livestream/LivestreamControls/index.js.map +1 -1
  352. package/dist/module/components/Livestream/LivestreamLayout/LivestreamLayout.js +3 -4
  353. package/dist/module/components/Livestream/LivestreamLayout/LivestreamLayout.js.map +1 -1
  354. package/dist/module/components/Livestream/LivestreamLayout/index.js.map +1 -1
  355. package/dist/module/components/Livestream/LivestreamPlayer/LivestreamPlayer.js +5 -4
  356. package/dist/module/components/Livestream/LivestreamPlayer/LivestreamPlayer.js.map +1 -1
  357. package/dist/module/components/Livestream/LivestreamPlayer/index.js.map +1 -1
  358. package/dist/module/components/Livestream/LivestreamTopView/DurationBadge.js +3 -3
  359. package/dist/module/components/Livestream/LivestreamTopView/DurationBadge.js.map +1 -1
  360. package/dist/module/components/Livestream/LivestreamTopView/FollowerCount.js.map +1 -1
  361. package/dist/module/components/Livestream/LivestreamTopView/HostLivestreamTopView.js.map +1 -1
  362. package/dist/module/components/Livestream/LivestreamTopView/LiveIndicator.js.map +1 -1
  363. package/dist/module/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.js.map +1 -1
  364. package/dist/module/components/Livestream/LivestreamTopView/index.js.map +1 -1
  365. package/dist/module/components/Livestream/ViewerLivestream/ViewerLivestream.js.map +1 -1
  366. package/dist/module/components/Livestream/ViewerLivestream/index.js.map +1 -1
  367. package/dist/module/components/Livestream/index.js.map +1 -1
  368. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js +3 -4
  369. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js.map +1 -1
  370. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js +2 -2
  371. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js.map +1 -1
  372. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/common.js.map +1 -1
  373. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/index.js.map +1 -1
  374. package/dist/module/components/Participant/FloatingParticipantView/index.js +1 -1
  375. package/dist/module/components/Participant/FloatingParticipantView/index.js.map +1 -1
  376. package/dist/module/components/Participant/ParticipantView/ParticipantLabel.js +2 -2
  377. package/dist/module/components/Participant/ParticipantView/ParticipantLabel.js.map +1 -1
  378. package/dist/module/components/Participant/ParticipantView/ParticipantNetworkQualityIndicator.js.map +1 -1
  379. package/dist/module/components/Participant/ParticipantView/ParticipantReaction.js +1 -1
  380. package/dist/module/components/Participant/ParticipantView/ParticipantReaction.js.map +1 -1
  381. package/dist/module/components/Participant/ParticipantView/ParticipantVideoFallback.js.map +1 -1
  382. package/dist/module/components/Participant/ParticipantView/ParticipantView.js.map +1 -1
  383. package/dist/module/components/Participant/ParticipantView/VideoRenderer.js +5 -6
  384. package/dist/module/components/Participant/ParticipantView/VideoRenderer.js.map +1 -1
  385. package/dist/module/components/Participant/ParticipantView/index.js.map +1 -1
  386. package/dist/module/components/Participant/index.js.map +1 -1
  387. package/dist/module/components/index.js.map +1 -1
  388. package/dist/module/components/utility/Avatar.js +3 -3
  389. package/dist/module/components/utility/Avatar.js.map +1 -1
  390. package/dist/module/components/utility/ScreenShareOverlay.js +1 -1
  391. package/dist/module/components/utility/ScreenShareOverlay.js.map +1 -1
  392. package/dist/module/components/utility/index.js.map +1 -1
  393. package/dist/module/constants/TestIds.js.map +1 -1
  394. package/dist/module/constants/index.js.map +1 -1
  395. package/dist/module/contexts/BackgroundFilters.js +5 -10
  396. package/dist/module/contexts/BackgroundFilters.js.map +1 -1
  397. package/dist/module/contexts/StreamVideoContext.js.map +1 -1
  398. package/dist/module/contexts/ThemeContext.js.map +1 -1
  399. package/dist/module/contexts/index.js.map +1 -1
  400. package/dist/module/hooks/index.js +1 -0
  401. package/dist/module/hooks/index.js.map +1 -1
  402. package/dist/module/hooks/internal/useCallMediaStreamCleanup.js +2 -3
  403. package/dist/module/hooks/internal/useCallMediaStreamCleanup.js.map +1 -1
  404. package/dist/module/hooks/push/index.js.map +1 -1
  405. package/dist/module/hooks/push/useInitAndroidTokenAndRest.js +1 -2
  406. package/dist/module/hooks/push/useInitAndroidTokenAndRest.js.map +1 -1
  407. package/dist/module/hooks/push/useIosCallKeepEventsSetupEffect.js +1 -1
  408. package/dist/module/hooks/push/useIosCallKeepEventsSetupEffect.js.map +1 -1
  409. package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js +7 -7
  410. package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -1
  411. package/dist/module/hooks/push/useIosInitRemoteNotifications.js +1 -2
  412. package/dist/module/hooks/push/useIosInitRemoteNotifications.js.map +1 -1
  413. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +6 -8
  414. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  415. package/dist/module/hooks/push/useProcessPushCallEffect.js +1 -2
  416. package/dist/module/hooks/push/useProcessPushCallEffect.js.map +1 -1
  417. package/dist/module/hooks/push/useProcessPushNonRingingCallEffect.js +1 -3
  418. package/dist/module/hooks/push/useProcessPushNonRingingCallEffect.js.map +1 -1
  419. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +1 -3
  420. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  421. package/dist/module/hooks/useApplyDefaultMediaStreamSettings.js +7 -7
  422. package/dist/module/hooks/useApplyDefaultMediaStreamSettings.js.map +1 -1
  423. package/dist/module/hooks/useAutoEnterPiPEffect.js.map +1 -1
  424. package/dist/module/hooks/useIsInPiPMode.js +1 -2
  425. package/dist/module/hooks/useIsInPiPMode.js.map +1 -1
  426. package/dist/module/hooks/useIsIosScreenshareBroadcastStarted.js.map +1 -1
  427. package/dist/module/hooks/usePaginatedLayoutSortPreset.js.map +1 -1
  428. package/dist/module/hooks/usePermissionNotification.js.map +1 -1
  429. package/dist/module/hooks/usePermissionRequest.js +2 -2
  430. package/dist/module/hooks/usePermissionRequest.js.map +1 -1
  431. package/dist/module/hooks/useScreenShareButton.js +83 -0
  432. package/dist/module/hooks/useScreenShareButton.js.map +1 -0
  433. package/dist/module/icons/Back.js.map +1 -1
  434. package/dist/module/icons/CameraSwitch.js.map +1 -1
  435. package/dist/module/icons/Chat.js.map +1 -1
  436. package/dist/module/icons/EndStreamIcon.js.map +1 -1
  437. package/dist/module/icons/Eye.js.map +1 -1
  438. package/dist/module/icons/LeaveStreamIcon.js.map +1 -1
  439. package/dist/module/icons/Mic.js.map +1 -1
  440. package/dist/module/icons/MicOff.js.map +1 -1
  441. package/dist/module/icons/Participants.js.map +1 -1
  442. package/dist/module/icons/Phone.js.map +1 -1
  443. package/dist/module/icons/PhoneDown.js.map +1 -1
  444. package/dist/module/icons/PinVertical.js.map +1 -1
  445. package/dist/module/icons/Reaction.js.map +1 -1
  446. package/dist/module/icons/ScreenShare.js.map +1 -1
  447. package/dist/module/icons/ScreenShareIndicator.js.map +1 -1
  448. package/dist/module/icons/Settings.js.map +1 -1
  449. package/dist/module/icons/ShieldBadge.js.map +1 -1
  450. package/dist/module/icons/Spotlight.js.map +1 -1
  451. package/dist/module/icons/StartStreamIcon.js.map +1 -1
  452. package/dist/module/icons/StopScreenShare.js.map +1 -1
  453. package/dist/module/icons/ThreeDots.js.map +1 -1
  454. package/dist/module/icons/TopViewBackground.js.map +1 -1
  455. package/dist/module/icons/Video.js.map +1 -1
  456. package/dist/module/icons/VideoSlash.js.map +1 -1
  457. package/dist/module/icons/index.js.map +1 -1
  458. package/dist/module/index.js.map +1 -1
  459. package/dist/module/providers/StreamCall.js +4 -8
  460. package/dist/module/providers/StreamCall.js.map +1 -1
  461. package/dist/module/providers/StreamVideo.js +1 -2
  462. package/dist/module/providers/StreamVideo.js.map +1 -1
  463. package/dist/module/theme/colors.js.map +1 -1
  464. package/dist/module/theme/constants.js.map +1 -1
  465. package/dist/module/theme/index.js.map +1 -1
  466. package/dist/module/theme/theme.js.map +1 -1
  467. package/dist/module/theme/types.js.map +1 -1
  468. package/dist/module/translations/index.js.map +1 -1
  469. package/dist/module/utils/StreamVideoRN/index.js +2 -4
  470. package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
  471. package/dist/module/utils/StreamVideoRN/types.js.map +1 -1
  472. package/dist/module/utils/enterPiPAndroid.js +1 -2
  473. package/dist/module/utils/enterPiPAndroid.js.map +1 -1
  474. package/dist/module/utils/getAndroidDefaultRingtoneUrl.js +1 -2
  475. package/dist/module/utils/getAndroidDefaultRingtoneUrl.js.map +1 -1
  476. package/dist/module/utils/hooks/index.js.map +1 -1
  477. package/dist/module/utils/hooks/useDebouncedValue.js.map +1 -1
  478. package/dist/module/utils/hooks/usePrevious.js.map +1 -1
  479. package/dist/module/utils/index.js.map +1 -1
  480. package/dist/module/utils/internal/newNotificationCallbacks.js.map +1 -1
  481. package/dist/module/utils/internal/optionallibs/gestureHandler.js.map +1 -1
  482. package/dist/module/utils/internal/optionallibs/index.js.map +1 -1
  483. package/dist/module/utils/internal/optionallibs/reanimated.js.map +1 -1
  484. package/dist/module/utils/internal/pushLogoutCallback.js.map +1 -1
  485. package/dist/module/utils/push/android.js +9 -17
  486. package/dist/module/utils/push/android.js.map +1 -1
  487. package/dist/module/utils/push/ios.js +5 -8
  488. package/dist/module/utils/push/ios.js.map +1 -1
  489. package/dist/module/utils/push/libs/callkeep.js.map +1 -1
  490. package/dist/module/utils/push/libs/expoNotifications.js.map +1 -1
  491. package/dist/module/utils/push/libs/expoTaskManager.js.map +1 -1
  492. package/dist/module/utils/push/libs/firebaseMessaging.js.map +1 -1
  493. package/dist/module/utils/push/libs/index.js.map +1 -1
  494. package/dist/module/utils/push/libs/iosPushNotification.js.map +1 -1
  495. package/dist/module/utils/push/libs/voipPushNotification.js.map +1 -1
  496. package/dist/module/utils/push/rxSubjects.js.map +1 -1
  497. package/dist/module/utils/push/utils.js +2 -2
  498. package/dist/module/utils/push/utils.js.map +1 -1
  499. package/dist/module/utils/setClientDetails.js.map +1 -1
  500. package/dist/module/version.js +1 -1
  501. package/dist/module/version.js.map +1 -1
  502. package/dist/typescript/components/Call/CallControls/CallControlsButton.d.ts.map +1 -1
  503. package/dist/typescript/components/Call/CallControls/ScreenShareToggleButton.d.ts.map +1 -1
  504. package/dist/typescript/components/Livestream/LivestreamControls/LivestreamScreenShareToggleButton.d.ts +1 -1
  505. package/dist/typescript/components/Livestream/LivestreamControls/LivestreamScreenShareToggleButton.d.ts.map +1 -1
  506. package/dist/typescript/components/Livestream/LivestreamPlayer/LivestreamPlayer.d.ts +1 -1
  507. package/dist/typescript/components/Livestream/LivestreamPlayer/LivestreamPlayer.d.ts.map +1 -1
  508. package/dist/typescript/components/Participant/FloatingParticipantView/FloatingView/common.d.ts +0 -1
  509. package/dist/typescript/components/Participant/FloatingParticipantView/FloatingView/common.d.ts.map +1 -1
  510. package/dist/typescript/components/Participant/FloatingParticipantView/FloatingView/index.d.ts +0 -1
  511. package/dist/typescript/components/Participant/FloatingParticipantView/FloatingView/index.d.ts.map +1 -1
  512. package/dist/typescript/contexts/StreamVideoContext.d.ts.map +1 -1
  513. package/dist/typescript/hooks/index.d.ts +1 -0
  514. package/dist/typescript/hooks/index.d.ts.map +1 -1
  515. package/dist/typescript/hooks/useScreenShareButton.d.ts +9 -0
  516. package/dist/typescript/hooks/useScreenShareButton.d.ts.map +1 -0
  517. package/dist/typescript/providers/StreamCall.d.ts.map +1 -1
  518. package/dist/typescript/providers/StreamVideo.d.ts.map +1 -1
  519. package/dist/typescript/utils/internal/optionallibs/reanimated.d.ts +0 -1
  520. package/dist/typescript/utils/internal/optionallibs/reanimated.d.ts.map +1 -1
  521. package/dist/typescript/utils/push/libs/callkeep.d.ts +0 -1
  522. package/dist/typescript/utils/push/libs/callkeep.d.ts.map +1 -1
  523. package/dist/typescript/utils/push/libs/voipPushNotification.d.ts +0 -1
  524. package/dist/typescript/utils/push/libs/voipPushNotification.d.ts.map +1 -1
  525. package/dist/typescript/utils/push/utils.d.ts +1 -1
  526. package/dist/typescript/utils/push/utils.d.ts.map +1 -1
  527. package/dist/typescript/version.d.ts +1 -1
  528. package/expo-config-plugin/dist/common/addNewLinesToAppDelegate.js +1 -1
  529. package/expo-config-plugin/dist/common/addNewLinesToMainActivity.js +1 -1
  530. package/expo-config-plugin/dist/withAndroidManifest.js +6 -6
  531. package/expo-config-plugin/dist/withIosScreenCapture/addBroadcastExtensionXcodeTarget.js +1 -1
  532. package/expo-config-plugin/dist/withMainActivity.js +17 -0
  533. package/package.json +17 -21
  534. package/src/components/Call/CallControls/ScreenShareToggleButton.tsx +9 -95
  535. package/src/components/Livestream/LivestreamControls/LivestreamScreenShareToggleButton.tsx +6 -91
  536. package/src/components/Livestream/LivestreamPlayer/LivestreamPlayer.tsx +4 -3
  537. package/src/components/Livestream/LivestreamTopView/DurationBadge.tsx +2 -2
  538. package/src/hooks/index.ts +1 -0
  539. package/src/hooks/useScreenShareButton.ts +128 -0
  540. package/src/version.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-react-native-sdk",
3
- "version": "0.8.6",
3
+ "version": "0.8.8",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "dist/commonjs/index.js",
6
6
  "module": "dist/module/index.js",
@@ -46,8 +46,8 @@
46
46
  "!**/.*"
47
47
  ],
48
48
  "dependencies": {
49
- "@stream-io/video-client": "^1.4.2",
50
- "@stream-io/video-react-bindings": "^0.4.46",
49
+ "@stream-io/video-client": "^1.4.3",
50
+ "@stream-io/video-react-bindings": "^0.4.47",
51
51
  "intl-pluralrules": "2.0.1",
52
52
  "lodash.merge": "^4.6.2",
53
53
  "react-native-url-polyfill": "1.3.0",
@@ -113,14 +113,14 @@
113
113
  }
114
114
  },
115
115
  "devDependencies": {
116
- "@babel/preset-typescript": "^7.21.5",
117
- "@expo/config-plugins": "~7.8.0",
116
+ "@babel/preset-typescript": "^7.24.7",
117
+ "@expo/config-plugins": "~7.8.4",
118
118
  "@notifee/react-native": "7.8.0",
119
119
  "@react-native-community/netinfo": "9.3.9",
120
120
  "@react-native-community/push-notification-ios": "1.11.0",
121
121
  "@react-native-firebase/app": "17.5.0",
122
122
  "@react-native-firebase/messaging": "17.5.0",
123
- "@react-native/eslint-config": "^0.74.83",
123
+ "@react-native/eslint-config": "^0.74.84",
124
124
  "@stream-io/react-native-webrtc": "118.1.0",
125
125
  "@stream-io/video-filters-react-native": "^0.2.1",
126
126
  "@testing-library/jest-native": "^5.4.2",
@@ -132,18 +132,14 @@
132
132
  "@types/react-native": "^0.70.4",
133
133
  "@types/react-native-incall-manager": "^3.2.1",
134
134
  "@types/react-test-renderer": "^18",
135
- "eslint": "^8.51.0",
136
- "eslint-plugin-jest": "^28.5.0",
137
- "eslint-plugin-prettier": "^5.1.3",
138
- "expo": "49.0.13",
139
- "expo-build-properties": "^0.5.1",
140
- "expo-modules-core": "1.5.11",
141
- "expo-notifications": "0.20.1",
142
- "expo-task-manager": "11.3.0",
143
- "jest": "^29.5.0",
144
- "prettier": "^3.3.0",
135
+ "expo": "50.0.19",
136
+ "expo-build-properties": "^0.12.3",
137
+ "expo-modules-core": "1.12.16",
138
+ "expo-notifications": "~0.27.8",
139
+ "expo-task-manager": "~11.7.3",
140
+ "jest": "^29.7.0",
145
141
  "react-native": "0.71.8",
146
- "react-native-builder-bob": "^0.21.3",
142
+ "react-native-builder-bob": "^0.23.2",
147
143
  "react-native-callkeep": "4.3.11",
148
144
  "react-native-gesture-handler": "2.16.2",
149
145
  "react-native-incall-manager": "^4.0.0",
@@ -151,10 +147,10 @@
151
147
  "react-native-svg": "^13.6.0",
152
148
  "react-native-voip-push-notification": "3.3.1",
153
149
  "react-test-renderer": "^18.2.0",
154
- "rimraf": "^5.0.5",
155
- "ts-jest": "^29.1.0",
156
- "ts-node": "^10.9.1",
157
- "typescript": "^5.4.3"
150
+ "rimraf": "^5.0.7",
151
+ "ts-jest": "^29.1.5",
152
+ "ts-node": "^10.9.2",
153
+ "typescript": "^5.5.2"
158
154
  },
159
155
  "resolutions": {
160
156
  "@types/react": "^18.2.44"
@@ -1,21 +1,11 @@
1
- import React, { useEffect, useRef } from 'react';
2
- import { findNodeHandle, NativeModules, Platform } from 'react-native';
1
+ import React, { useRef } from 'react';
2
+ import { Platform } from 'react-native';
3
3
  import { ScreenCapturePickerView } from '@stream-io/react-native-webrtc';
4
4
  import { ScreenShare } from '../../../icons/ScreenShare';
5
5
  import { StopScreenShare } from '../../../icons/StopScreenShare';
6
6
  import { CallControlsButton } from './CallControlsButton';
7
7
  import { useTheme } from '../../../contexts/ThemeContext';
8
- import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
9
- import { useIsIosScreenshareBroadcastStarted } from '../../../hooks/useIsIosScreenshareBroadcastStarted';
10
- import { hasScreenShare, SfuModels } from '@stream-io/video-client';
11
- import { usePrevious } from '../../../utils/hooks/usePrevious';
12
-
13
- // ios >= 14.0 or android - platform restrictions
14
- const CanDeviceScreenShare =
15
- (Platform.OS === 'ios' &&
16
- // @ts-ignore
17
- Number.parseInt(Platform.Version.split('.')[0], 10) >= 14) ||
18
- Platform.OS === 'android';
8
+ import { useScreenShareButton } from '../../../hooks/useScreenShareButton';
19
9
 
20
10
  /**
21
11
  * The props for the Screen Share button in the Call Controls.
@@ -45,94 +35,18 @@ export const ScreenShareToggleButton = ({
45
35
  theme: { colors, screenShareToggleButton },
46
36
  } = useTheme();
47
37
 
48
- const call = useCall();
49
- const { useLocalParticipant, useCallSettings } = useCallStateHooks();
50
- const callSettings = useCallSettings();
51
- const isScreenSharingEnabledInCall = callSettings?.screensharing.enabled;
52
- const isScreenSharingAccessRequestEnabled =
53
- callSettings?.screensharing.access_request_enabled;
54
-
55
- const onScreenShareStartedHandlerRef = useRef(onScreenShareStartedHandler);
56
- onScreenShareStartedHandlerRef.current = onScreenShareStartedHandler;
57
- const onScreenShareStoppedHandlerRef = useRef(onScreenShareStoppedHandler);
58
- onScreenShareStoppedHandlerRef.current = onScreenShareStoppedHandler;
38
+ const screenCapturePickerViewiOSRef = useRef(null);
59
39
 
60
- const iosScreenShareStartedFromSystem = useIsIosScreenshareBroadcastStarted();
61
- const prevIosScreenShareStartedFromSystem = usePrevious(
62
- iosScreenShareStartedFromSystem
40
+ const { onPress, hasPublishedScreenShare } = useScreenShareButton(
41
+ screenCapturePickerViewiOSRef,
42
+ onScreenShareStartedHandler,
43
+ onScreenShareStoppedHandler
63
44
  );
64
45
 
65
- const localParticipant = useLocalParticipant();
66
- const hasPublishedScreenShare =
67
- localParticipant && hasScreenShare(localParticipant);
68
-
69
- // listens to iOS screen share broadcast started event from the system
70
- useEffect(() => {
71
- const run = async () => {
72
- if (Platform.OS !== 'ios') {
73
- return;
74
- }
75
- if (
76
- iosScreenShareStartedFromSystem &&
77
- !prevIosScreenShareStartedFromSystem
78
- ) {
79
- onScreenShareStartedHandlerRef.current?.();
80
- const media = await navigator.mediaDevices.getDisplayMedia({
81
- // @ts-ignore
82
- deviceId: 'broadcast',
83
- video: true,
84
- audio: true,
85
- });
86
- await call?.publishScreenShareStream(media);
87
- } else if (
88
- !iosScreenShareStartedFromSystem &&
89
- prevIosScreenShareStartedFromSystem
90
- ) {
91
- onScreenShareStoppedHandlerRef.current?.();
92
- await call?.stopPublish(SfuModels.TrackType.SCREEN_SHARE);
93
- }
94
- };
95
- run();
96
- }, [
97
- call,
98
- iosScreenShareStartedFromSystem,
99
- prevIosScreenShareStartedFromSystem,
100
- ]);
101
-
102
- const screenCapturePickerViewiOSRef = React.useRef(null);
103
-
104
- const onPress = async () => {
105
- if (!hasPublishedScreenShare) {
106
- if (Platform.OS === 'ios') {
107
- const reactTag = findNodeHandle(screenCapturePickerViewiOSRef.current);
108
- await NativeModules.ScreenCapturePickerViewManager.show(reactTag);
109
- // After this the iOS screen share broadcast started/stopped event will be triggered
110
- // and the useEffect listener will handle the rest
111
- } else {
112
- try {
113
- const media = await navigator.mediaDevices.getDisplayMedia({
114
- video: true,
115
- audio: true,
116
- });
117
- onScreenShareStartedHandler?.();
118
- await call?.publishScreenShareStream(media);
119
- } catch (e) {
120
- // ignored.. user didnt allow the screen share in the popup
121
- }
122
- }
123
- } else if (hasPublishedScreenShare) {
124
- onScreenShareStoppedHandler?.();
125
- await call?.stopPublish(SfuModels.TrackType.SCREEN_SHARE);
126
- }
127
- };
128
-
129
- if (!isScreenSharingEnabledInCall || !CanDeviceScreenShare) {
130
- return null;
131
- }
46
+ if (!onPress) return null;
132
47
 
133
48
  return (
134
49
  <CallControlsButton
135
- disabled={!isScreenSharingAccessRequestEnabled}
136
50
  onPress={onPress}
137
51
  color={hasPublishedScreenShare ? colors.error : colors.static_white}
138
52
  style={{
@@ -1,30 +1,13 @@
1
- import React, { useEffect } from 'react';
1
+ import React from 'react';
2
2
  import { useTheme } from '../../../contexts/ThemeContext';
3
- import {
4
- findNodeHandle,
5
- NativeModules,
6
- Platform,
7
- Pressable,
8
- StyleSheet,
9
- View,
10
- } from 'react-native';
3
+ import { Platform, Pressable, StyleSheet, View } from 'react-native';
11
4
  import { ScreenShare } from '../../../icons/ScreenShare';
12
5
  import { StopScreenShare } from '../../../icons/StopScreenShare';
13
6
  import { ScreenCapturePickerView } from '@stream-io/react-native-webrtc';
14
- import { hasScreenShare, SfuModels } from '@stream-io/video-client';
15
- import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
16
- import { useIsIosScreenshareBroadcastStarted } from '../../../hooks/useIsIosScreenshareBroadcastStarted';
17
- import { usePrevious } from '../../../utils/hooks/usePrevious';
7
+ import { useScreenShareButton } from '../../../hooks/useScreenShareButton';
18
8
 
19
9
  export type LivestreamScreenShareToggleButtonProps = {};
20
10
 
21
- // ios >= 14.0 or android - platform restrictions
22
- const CanDeviceScreenShare =
23
- (Platform.OS === 'ios' &&
24
- // @ts-ignore
25
- Number.parseInt(Platform.Version.split('.')[0], 10) >= 14) ||
26
- Platform.OS === 'android';
27
-
28
11
  /**
29
12
  * The LivestreamVideoControlButton controls the screenshare stream publish/unpublish while in the livestream for the host.
30
13
  */
@@ -37,79 +20,11 @@ export const LivestreamScreenShareToggleButton = () => {
37
20
  },
38
21
  } = useTheme();
39
22
 
40
- const call = useCall();
41
- const { useLocalParticipant, useCallSettings } = useCallStateHooks();
42
- const callSettings = useCallSettings();
43
- const isScreenSharingEnabledInCall = callSettings?.screensharing.enabled;
44
-
45
- const iosScreenShareStartedFromSystem = useIsIosScreenshareBroadcastStarted();
46
- const prevIosScreenShareStartedFromSystem = usePrevious(
47
- iosScreenShareStartedFromSystem
48
- );
49
-
50
- const localParticipant = useLocalParticipant();
51
- const hasPublishedScreenShare =
52
- localParticipant && hasScreenShare(localParticipant);
53
-
54
- // listens to iOS screen share broadcast started event from the system
55
- useEffect(() => {
56
- const run = async () => {
57
- if (Platform.OS !== 'ios') {
58
- return;
59
- }
60
- if (
61
- iosScreenShareStartedFromSystem &&
62
- !prevIosScreenShareStartedFromSystem
63
- ) {
64
- const media = await navigator.mediaDevices.getDisplayMedia({
65
- // @ts-ignore
66
- deviceId: 'broadcast',
67
- video: true,
68
- audio: true,
69
- });
70
- await call?.publishScreenShareStream(media);
71
- } else if (
72
- !iosScreenShareStartedFromSystem &&
73
- prevIosScreenShareStartedFromSystem
74
- ) {
75
- await call?.stopPublish(SfuModels.TrackType.SCREEN_SHARE);
76
- }
77
- };
78
- run();
79
- }, [
80
- call,
81
- iosScreenShareStartedFromSystem,
82
- prevIosScreenShareStartedFromSystem,
83
- ]);
84
-
85
23
  const screenCapturePickerViewiOSRef = React.useRef(null);
86
24
 
87
- const onPress = async () => {
88
- if (!hasPublishedScreenShare) {
89
- if (Platform.OS === 'ios') {
90
- const reactTag = findNodeHandle(screenCapturePickerViewiOSRef.current);
91
- await NativeModules.ScreenCapturePickerViewManager.show(reactTag);
92
- // After this the iOS screen share broadcast started/stopped event will be triggered
93
- // and the useEffect listener will handle the rest
94
- } else {
95
- try {
96
- const media = await navigator.mediaDevices.getDisplayMedia({
97
- video: true,
98
- audio: true,
99
- });
100
- await call?.publishScreenShareStream(media);
101
- } catch (e) {
102
- // ignored.. user didnt allow the screen share in the popup
103
- }
104
- }
105
- } else if (hasPublishedScreenShare) {
106
- await call?.stopPublish(SfuModels.TrackType.SCREEN_SHARE);
107
- }
108
- };
109
-
110
- if (!isScreenSharingEnabledInCall || !CanDeviceScreenShare) {
111
- return null;
112
- }
25
+ const { onPress, hasPublishedScreenShare } = useScreenShareButton(
26
+ screenCapturePickerViewiOSRef
27
+ );
113
28
 
114
29
  return (
115
30
  <Pressable
@@ -2,9 +2,10 @@ import React, { useEffect, useState } from 'react';
2
2
  import {
3
3
  ViewerLivestream as DefaultViewerLivestream,
4
4
  ViewerLivestreamProps,
5
- } from '..';
6
- import { Call, StreamCall, useStreamVideoClient } from '../../..';
7
- import { CallingState, getLogger } from '@stream-io/video-client';
5
+ } from '../ViewerLivestream';
6
+ import { Call, CallingState, getLogger } from '@stream-io/video-client';
7
+ import { StreamCall } from '../../../providers/StreamCall';
8
+ import { useStreamVideoClient } from '@stream-io/video-react-bindings';
8
9
 
9
10
  export type LivestreamPlayerProps = {
10
11
  /**
@@ -42,7 +42,7 @@ export const DurationBadge = ({ mode }: DurationBadgeProps) => {
42
42
  if (mode !== 'host') {
43
43
  return;
44
44
  }
45
- let intervalId: NodeJS.Timer;
45
+ let intervalId: NodeJS.Timeout;
46
46
 
47
47
  const handleLiveStarted = () => {
48
48
  intervalId = setInterval(() => {
@@ -86,7 +86,7 @@ export const DurationBadge = ({ mode }: DurationBadgeProps) => {
86
86
  if (mode !== 'viewer') {
87
87
  return;
88
88
  }
89
- let intervalId: NodeJS.Timer;
89
+ let intervalId: NodeJS.Timeout;
90
90
  const handleLiveStarted = () => {
91
91
  intervalId = setInterval(() => {
92
92
  setDuration((d) => d + 1);
@@ -6,3 +6,4 @@ export * from './useIsIosScreenshareBroadcastStarted';
6
6
  export * from './useIsInPiPMode';
7
7
  export * from './useAutoEnterPiPEffect';
8
8
  export * from './useApplyDefaultMediaStreamSettings';
9
+ export * from './useScreenShareButton';
@@ -0,0 +1,128 @@
1
+ import {
2
+ getLogger,
3
+ hasScreenShare,
4
+ OwnCapability,
5
+ } from '@stream-io/video-client';
6
+ import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
7
+ import React, { useRef, useEffect } from 'react';
8
+ import { Platform, findNodeHandle, NativeModules } from 'react-native';
9
+ import { usePrevious } from '../utils/hooks';
10
+ import { useIsIosScreenshareBroadcastStarted } from './useIsIosScreenshareBroadcastStarted';
11
+
12
+ // ios >= 14.0 or android - platform restrictions
13
+ const CanDeviceScreenShare =
14
+ (Platform.OS === 'ios' &&
15
+ // @ts-ignore
16
+ Number.parseInt(Platform.Version.split('.')[0], 10) >= 14,
17
+ 10) || Platform.OS === 'android';
18
+
19
+ export const useScreenShareButton = (
20
+ /**
21
+ * Ref of the ScreenCapturePickerView component.
22
+ *
23
+ */
24
+ screenCapturePickerViewiOSRef: React.MutableRefObject<any>,
25
+ /**
26
+ * Handler to be called when the screen-share has been started.
27
+ *
28
+ */
29
+ onScreenShareStartedHandler?: () => void,
30
+ /**
31
+ * Handler to be called when the screen-share has been stopped.
32
+ *
33
+ */
34
+ onScreenShareStoppedHandler?: () => void,
35
+ /**
36
+ * Handler to be called when the permissions to stream screen share media is missing
37
+ *
38
+ */
39
+ onMissingScreenShareStreamPermission?: () => void
40
+ ) => {
41
+ const call = useCall();
42
+ const { useLocalParticipant, useCallSettings, useOwnCapabilities } =
43
+ useCallStateHooks();
44
+ const callSettings = useCallSettings();
45
+ const ownCapabilities = useOwnCapabilities();
46
+ const hasScreenSharingPermissions = ownCapabilities?.includes(
47
+ OwnCapability.SCREENSHARE
48
+ );
49
+ const isScreenSharingEnabledInCall = callSettings?.screensharing.enabled;
50
+
51
+ const onScreenShareStartedHandlerRef = useRef(onScreenShareStartedHandler);
52
+ onScreenShareStartedHandlerRef.current = onScreenShareStartedHandler;
53
+ const onScreenShareStoppedHandlerRef = useRef(onScreenShareStoppedHandler);
54
+ onScreenShareStoppedHandlerRef.current = onScreenShareStoppedHandler;
55
+
56
+ const iosScreenShareStartedFromSystem = useIsIosScreenshareBroadcastStarted();
57
+ const prevIosScreenShareStartedFromSystem = usePrevious(
58
+ iosScreenShareStartedFromSystem
59
+ );
60
+
61
+ const localParticipant = useLocalParticipant();
62
+ const hasPublishedScreenShare =
63
+ localParticipant && hasScreenShare(localParticipant);
64
+
65
+ // listens to iOS screen share broadcast started event from the system
66
+ useEffect(() => {
67
+ if (Platform.OS !== 'ios') {
68
+ return;
69
+ }
70
+ if (
71
+ iosScreenShareStartedFromSystem &&
72
+ !prevIosScreenShareStartedFromSystem
73
+ ) {
74
+ onScreenShareStartedHandlerRef.current?.();
75
+ call?.screenShare.enable();
76
+ } else if (
77
+ !iosScreenShareStartedFromSystem &&
78
+ prevIosScreenShareStartedFromSystem
79
+ ) {
80
+ onScreenShareStoppedHandlerRef.current?.();
81
+ call?.screenShare.disable(true);
82
+ }
83
+ }, [
84
+ call,
85
+ iosScreenShareStartedFromSystem,
86
+ prevIosScreenShareStartedFromSystem,
87
+ ]);
88
+
89
+ const onPress = async () => {
90
+ if (!hasScreenSharingPermissions) {
91
+ const logger = getLogger(['useScreenShareButton']);
92
+ logger(
93
+ 'info',
94
+ 'User does not have permissions to stream the screen share media, calling onMissingScreenShareStreamPermission handler if present'
95
+ );
96
+ onMissingScreenShareStreamPermission?.();
97
+ }
98
+ if (!hasPublishedScreenShare) {
99
+ if (Platform.OS === 'ios') {
100
+ const reactTag = findNodeHandle(screenCapturePickerViewiOSRef.current);
101
+ await NativeModules.ScreenCapturePickerViewManager.show(reactTag);
102
+ // After this the iOS screen share broadcast started/stopped event will be triggered
103
+ // and the useEffect listener will handle the rest
104
+ } else {
105
+ try {
106
+ await call?.screenShare.enable();
107
+ onScreenShareStartedHandler?.();
108
+ } catch (error) {
109
+ // ignored.. user didnt allow the screen share in the popup
110
+ const logger = getLogger(['useScreenShareButton']);
111
+ logger(
112
+ 'info',
113
+ 'User opted to not give permissions to start a screen share stream',
114
+ error
115
+ );
116
+ }
117
+ }
118
+ } else if (hasPublishedScreenShare) {
119
+ onScreenShareStoppedHandler?.();
120
+ await call?.screenShare.disable(true);
121
+ }
122
+ };
123
+
124
+ if (!isScreenSharingEnabledInCall || !CanDeviceScreenShare) {
125
+ return { onPress: undefined, hasPublishedScreenShare: false };
126
+ }
127
+ return { onPress, hasPublishedScreenShare };
128
+ };
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '0.8.6';
1
+ export const version = '0.8.8';