@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.
- package/CHANGELOG.md +726 -684
- package/dist/commonjs/components/Call/CallContent/RTCViewPipIOS.js +1 -0
- package/dist/commonjs/components/Call/CallContent/RTCViewPipIOS.js.map +1 -1
- package/dist/commonjs/components/Call/CallContent/RTCViewPipNative.js +5 -5
- package/dist/commonjs/components/Call/CallContent/RTCViewPipNative.js.map +1 -1
- package/dist/commonjs/components/Call/Lobby/Lobby.js.map +1 -1
- package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js +1 -1
- package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js.map +1 -1
- package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js +5 -3
- package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js.map +1 -1
- package/dist/commonjs/contexts/BackgroundFilters.js +1 -1
- package/dist/commonjs/contexts/BackgroundFilters.js.map +1 -1
- package/dist/commonjs/hooks/internal/useCallMediaStreamCleanup.js +0 -1
- package/dist/commonjs/hooks/internal/useCallMediaStreamCleanup.js.map +1 -1
- package/dist/commonjs/hooks/push/useInitAndroidTokenAndRest.js +3 -0
- package/dist/commonjs/hooks/push/useInitAndroidTokenAndRest.js.map +1 -1
- package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js +19 -7
- package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -1
- package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js +22 -6
- package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
- package/dist/commonjs/hooks/useScreenShareButton.js +1 -3
- package/dist/commonjs/hooks/useScreenShareButton.js.map +1 -1
- package/dist/commonjs/hooks/useTrackDimensions.js +1 -1
- package/dist/commonjs/hooks/useTrackDimensions.js.map +1 -1
- package/dist/commonjs/providers/StreamCall/DeviceStats.js +2 -2
- package/dist/commonjs/providers/StreamCall/DeviceStats.js.map +1 -1
- package/dist/commonjs/utils/internal/optionallibs/gestureHandler.js +1 -1
- package/dist/commonjs/utils/internal/optionallibs/gestureHandler.js.map +1 -1
- package/dist/commonjs/utils/internal/optionallibs/reanimated.js +1 -1
- package/dist/commonjs/utils/internal/optionallibs/reanimated.js.map +1 -1
- package/dist/commonjs/utils/internal/pushLogoutCallback.js +1 -1
- package/dist/commonjs/utils/internal/pushLogoutCallback.js.map +1 -1
- package/dist/commonjs/utils/push/android.js +22 -15
- package/dist/commonjs/utils/push/android.js.map +1 -1
- package/dist/commonjs/utils/push/internal/ios.js +104 -0
- package/dist/commonjs/utils/push/internal/ios.js.map +1 -0
- package/dist/commonjs/utils/push/ios.js +15 -107
- package/dist/commonjs/utils/push/ios.js.map +1 -1
- package/dist/commonjs/utils/push/libs/callkeep.js +1 -1
- package/dist/commonjs/utils/push/libs/callkeep.js.map +1 -1
- package/dist/commonjs/utils/push/libs/expoNotifications.js +10 -2
- package/dist/commonjs/utils/push/libs/expoNotifications.js.map +1 -1
- package/dist/commonjs/utils/push/libs/firebaseMessaging/index.js +1 -1
- package/dist/commonjs/utils/push/libs/firebaseMessaging/index.js.map +1 -1
- package/dist/commonjs/utils/push/libs/firebaseMessaging/lib.js +1 -1
- package/dist/commonjs/utils/push/libs/firebaseMessaging/lib.js.map +1 -1
- package/dist/commonjs/utils/push/libs/iosPushNotification.js +1 -1
- package/dist/commonjs/utils/push/libs/iosPushNotification.js.map +1 -1
- package/dist/commonjs/utils/push/libs/notifee/lib.js +1 -1
- package/dist/commonjs/utils/push/libs/notifee/lib.js.map +1 -1
- package/dist/commonjs/utils/push/libs/voipPushNotification.js +1 -1
- package/dist/commonjs/utils/push/libs/voipPushNotification.js.map +1 -1
- package/dist/commonjs/utils/push/setupIosCallKeepEvents.js +7 -2
- package/dist/commonjs/utils/push/setupIosCallKeepEvents.js.map +1 -1
- package/dist/commonjs/utils/push/setupIosVoipPushEvents.js +7 -2
- package/dist/commonjs/utils/push/setupIosVoipPushEvents.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/module/components/Call/CallContent/CallContent.js +2 -2
- package/dist/module/components/Call/CallContent/CallContent.js.map +1 -1
- package/dist/module/components/Call/CallContent/RTCViewPipIOS.js +2 -1
- package/dist/module/components/Call/CallContent/RTCViewPipIOS.js.map +1 -1
- package/dist/module/components/Call/CallContent/RTCViewPipNative.js +6 -6
- package/dist/module/components/Call/CallContent/RTCViewPipNative.js.map +1 -1
- package/dist/module/components/Call/CallControls/internal/ReactionsPicker.js +1 -1
- package/dist/module/components/Call/CallControls/internal/ReactionsPicker.js.map +1 -1
- package/dist/module/components/Call/Lobby/Lobby.js.map +1 -1
- package/dist/module/components/Call/Lobby/LobbyFooter.js +1 -1
- package/dist/module/components/Call/Lobby/LobbyFooter.js.map +1 -1
- package/dist/module/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js +4 -4
- package/dist/module/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js.map +1 -1
- package/dist/module/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js +7 -5
- package/dist/module/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/ParticipantReaction.js +1 -1
- package/dist/module/components/Participant/ParticipantView/ParticipantReaction.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/SpeechIndicator.js +1 -1
- package/dist/module/components/Participant/ParticipantView/SpeechIndicator.js.map +1 -1
- package/dist/module/contexts/BackgroundFilters.js +1 -1
- package/dist/module/contexts/BackgroundFilters.js.map +1 -1
- package/dist/module/hooks/internal/useCallMediaStreamCleanup.js +0 -1
- package/dist/module/hooks/internal/useCallMediaStreamCleanup.js.map +1 -1
- package/dist/module/hooks/push/useInitAndroidTokenAndRest.js +3 -0
- package/dist/module/hooks/push/useInitAndroidTokenAndRest.js.map +1 -1
- package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js +19 -7
- package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -1
- package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +23 -7
- package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
- package/dist/module/hooks/push/useProcessPushCallEffect.js +1 -1
- package/dist/module/hooks/push/useProcessPushCallEffect.js.map +1 -1
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +2 -2
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/module/hooks/usePermissionRequest.js +1 -1
- package/dist/module/hooks/usePermissionRequest.js.map +1 -1
- package/dist/module/hooks/useScreenShareButton.js +3 -5
- package/dist/module/hooks/useScreenShareButton.js.map +1 -1
- package/dist/module/hooks/useTrackDimensions.js +2 -2
- package/dist/module/hooks/useTrackDimensions.js.map +1 -1
- package/dist/module/providers/StreamCall/DeviceStats.js +4 -4
- package/dist/module/providers/StreamCall/DeviceStats.js.map +1 -1
- package/dist/module/utils/internal/optionallibs/gestureHandler.js +1 -1
- package/dist/module/utils/internal/optionallibs/gestureHandler.js.map +1 -1
- package/dist/module/utils/internal/optionallibs/reanimated.js +1 -1
- package/dist/module/utils/internal/optionallibs/reanimated.js.map +1 -1
- package/dist/module/utils/internal/pushLogoutCallback.js +1 -1
- package/dist/module/utils/internal/pushLogoutCallback.js.map +1 -1
- package/dist/module/utils/push/android.js +25 -18
- package/dist/module/utils/push/android.js.map +1 -1
- package/dist/module/utils/push/internal/ios.js +97 -0
- package/dist/module/utils/push/internal/ios.js.map +1 -0
- package/dist/module/utils/push/internal/utils.js +1 -1
- package/dist/module/utils/push/internal/utils.js.map +1 -1
- package/dist/module/utils/push/ios.js +18 -109
- package/dist/module/utils/push/ios.js.map +1 -1
- package/dist/module/utils/push/libs/callkeep.js +1 -1
- package/dist/module/utils/push/libs/callkeep.js.map +1 -1
- package/dist/module/utils/push/libs/expoNotifications.js +9 -2
- package/dist/module/utils/push/libs/expoNotifications.js.map +1 -1
- package/dist/module/utils/push/libs/firebaseMessaging/index.js +1 -1
- package/dist/module/utils/push/libs/firebaseMessaging/index.js.map +1 -1
- package/dist/module/utils/push/libs/firebaseMessaging/lib.js +1 -1
- package/dist/module/utils/push/libs/firebaseMessaging/lib.js.map +1 -1
- package/dist/module/utils/push/libs/iosPushNotification.js +1 -1
- package/dist/module/utils/push/libs/iosPushNotification.js.map +1 -1
- package/dist/module/utils/push/libs/notifee/index.js.map +1 -1
- package/dist/module/utils/push/libs/notifee/lib.js +1 -1
- package/dist/module/utils/push/libs/notifee/lib.js.map +1 -1
- package/dist/module/utils/push/libs/voipPushNotification.js +1 -1
- package/dist/module/utils/push/libs/voipPushNotification.js.map +1 -1
- package/dist/module/utils/push/setupIosCallKeepEvents.js +8 -4
- package/dist/module/utils/push/setupIosCallKeepEvents.js.map +1 -1
- package/dist/module/utils/push/setupIosVoipPushEvents.js +7 -2
- package/dist/module/utils/push/setupIosVoipPushEvents.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/components/Call/CallContent/CallContent.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallContent/RTCViewPipIOS.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallContent/RTCViewPipNative.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/AcceptCallButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/CallControls.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/CallControlsButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/HangupCallButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/IncomingCallControls.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/OutgoingCallControls.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/ReactionsButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/RejectCallButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/ScreenShareToggleButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/ToggleAudioPreviewButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/ToggleAudioPublishingButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/ToggleCameraFaceButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/ToggleVideoPreviewButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/ToggleVideoPublishingButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/internal/ReactionsPicker.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallLayout/CallParticipantsGrid.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallLayout/CallParticipantsSpotlight.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallParticipantsList/CallParticipantsList.d.ts.map +1 -1
- package/dist/typescript/components/Call/Lobby/JoinCallButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/Lobby/Lobby.d.ts.map +1 -1
- package/dist/typescript/components/Call/Lobby/LobbyFooter.d.ts.map +1 -1
- package/dist/typescript/components/Call/RingingCallContent/CallLeftIndicator.d.ts.map +1 -1
- package/dist/typescript/components/Call/RingingCallContent/CallPreparingIndicator.d.ts.map +1 -1
- package/dist/typescript/components/Call/RingingCallContent/IncomingCall.d.ts.map +1 -1
- package/dist/typescript/components/Call/RingingCallContent/OutgoingCall.d.ts.map +1 -1
- package/dist/typescript/components/Call/RingingCallContent/RingingCallContent.d.ts.map +1 -1
- package/dist/typescript/components/Call/RingingCallContent/TextBasedIndicator.d.ts.map +1 -1
- package/dist/typescript/components/Call/RingingCallContent/UserInfo.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/HostLivestream/HostLivestream.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/LivestreamControls/HostLivestreamControls.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/LivestreamControls/HostStartStreamButton.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/LivestreamControls/LivestreamMediaControls.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/LivestreamControls/ViewerLivestreamControls.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/LivestreamLayout/LivestreamLayout.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/LivestreamPlayer/LivestreamPlayer.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/LivestreamTopView/DurationBadge.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/LivestreamTopView/FollowerCount.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/LivestreamTopView/HostLivestreamTopView.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/LivestreamTopView/LiveIndicator.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/ViewerLivestream/ViewerLivestream.d.ts.map +1 -1
- package/dist/typescript/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.d.ts.map +1 -1
- package/dist/typescript/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.d.ts.map +1 -1
- package/dist/typescript/components/Participant/FloatingParticipantView/index.d.ts.map +1 -1
- package/dist/typescript/components/Participant/ParticipantView/ParticipantLabel.d.ts.map +1 -1
- package/dist/typescript/components/Participant/ParticipantView/ParticipantNetworkQualityIndicator.d.ts.map +1 -1
- package/dist/typescript/components/Participant/ParticipantView/ParticipantReaction.d.ts.map +1 -1
- package/dist/typescript/components/Participant/ParticipantView/ParticipantVideoFallback.d.ts.map +1 -1
- package/dist/typescript/components/Participant/ParticipantView/ParticipantView.d.ts.map +1 -1
- package/dist/typescript/components/Participant/ParticipantView/SpeechIndicator.d.ts.map +1 -1
- package/dist/typescript/components/Participant/ParticipantView/VideoRenderer.d.ts.map +1 -1
- package/dist/typescript/components/utility/Avatar.d.ts.map +1 -1
- package/dist/typescript/components/utility/ScreenShareOverlay.d.ts.map +1 -1
- package/dist/typescript/contexts/BackgroundFilters.d.ts.map +1 -1
- package/dist/typescript/contexts/ThemeContext.d.ts.map +1 -1
- package/dist/typescript/hooks/internal/useCallMediaStreamCleanup.d.ts.map +1 -1
- package/dist/typescript/hooks/push/useInitAndroidTokenAndRest.d.ts.map +1 -1
- package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts.map +1 -1
- package/dist/typescript/hooks/push/useIosVoipPushEventsSetupEffect.d.ts.map +1 -1
- package/dist/typescript/hooks/usePaginatedLayoutSortPreset.d.ts.map +1 -1
- package/dist/typescript/hooks/usePermissionNotification.d.ts.map +1 -1
- package/dist/typescript/hooks/useScreenShareButton.d.ts +21 -1
- package/dist/typescript/hooks/useScreenShareButton.d.ts.map +1 -1
- package/dist/typescript/icons/Back.d.ts.map +1 -1
- package/dist/typescript/icons/CameraSwitch.d.ts.map +1 -1
- package/dist/typescript/icons/IconWrapper.d.ts.map +1 -1
- package/dist/typescript/icons/Lock.d.ts.map +1 -1
- package/dist/typescript/icons/Mic.d.ts.map +1 -1
- package/dist/typescript/icons/MicOff.d.ts.map +1 -1
- package/dist/typescript/icons/Phone.d.ts.map +1 -1
- package/dist/typescript/icons/PhoneDown.d.ts.map +1 -1
- package/dist/typescript/icons/PinVertical.d.ts.map +1 -1
- package/dist/typescript/icons/Reaction.d.ts.map +1 -1
- package/dist/typescript/icons/ScreenShare.d.ts.map +1 -1
- package/dist/typescript/icons/ScreenShareIndicator.d.ts.map +1 -1
- package/dist/typescript/icons/Settings.d.ts.map +1 -1
- package/dist/typescript/icons/Spotlight.d.ts.map +1 -1
- package/dist/typescript/icons/StopScreenShare.d.ts.map +1 -1
- package/dist/typescript/icons/ThreeDots.d.ts.map +1 -1
- package/dist/typescript/icons/TopViewBackground.d.ts.map +1 -1
- package/dist/typescript/icons/Video.d.ts.map +1 -1
- package/dist/typescript/icons/VideoSlash.d.ts.map +1 -1
- package/dist/typescript/providers/StreamCall/index.d.ts.map +1 -1
- package/dist/typescript/providers/StreamVideo.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/types.d.ts +2 -2
- package/dist/typescript/utils/hooks/usePrevious.d.ts.map +1 -1
- package/dist/typescript/utils/index.d.ts.map +1 -1
- package/dist/typescript/utils/internal/optionallibs/gestureHandler.d.ts.map +1 -1
- package/dist/typescript/utils/internal/optionallibs/reanimated.d.ts.map +1 -1
- package/dist/typescript/utils/internal/pushLogoutCallback.d.ts +1 -1
- package/dist/typescript/utils/internal/pushLogoutCallback.d.ts.map +1 -1
- package/dist/typescript/utils/push/android.d.ts +2 -2
- package/dist/typescript/utils/push/android.d.ts.map +1 -1
- package/dist/typescript/utils/push/internal/ios.d.ts +3 -0
- package/dist/typescript/utils/push/internal/ios.d.ts.map +1 -0
- package/dist/typescript/utils/push/internal/utils.d.ts.map +1 -1
- package/dist/typescript/utils/push/ios.d.ts +0 -1
- package/dist/typescript/utils/push/ios.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/expoNotifications.d.ts +2 -1
- package/dist/typescript/utils/push/libs/expoNotifications.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/iosPushNotification.d.ts +1 -1
- package/dist/typescript/utils/push/libs/iosPushNotification.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/notifee/index.d.ts.map +1 -1
- package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts.map +1 -1
- package/dist/typescript/utils/push/setupIosVoipPushEvents.d.ts.map +1 -1
- package/dist/typescript/version.d.ts +1 -1
- package/expo-config-plugin/dist/withAndroidManifest.js +0 -1
- package/expo-config-plugin/dist/withAppDelegate.js +1 -1
- package/expo-config-plugin/dist/withIosScreenCapture/withPlistUpdates.js +1 -1
- package/expo-config-plugin/dist/withiOSInfoPlist.js +3 -1
- package/package.json +21 -23
- package/src/components/Call/CallContent/CallContent.tsx +3 -3
- package/src/components/Call/CallContent/RTCViewPipIOS.tsx +6 -4
- package/src/components/Call/CallContent/RTCViewPipNative.tsx +5 -5
- package/src/components/Call/CallControls/CallControlsButton.tsx +1 -1
- package/src/components/Call/CallControls/LobbyControls.tsx +1 -1
- package/src/components/Call/CallControls/ScreenShareToggleButton.tsx +1 -1
- package/src/components/Call/CallControls/internal/ReactionsPicker.tsx +4 -4
- package/src/components/Call/CallLayout/CallParticipantsSpotlight.tsx +1 -1
- package/src/components/Call/CallParticipantsList/CallParticipantsList.tsx +5 -5
- package/src/components/Call/Lobby/JoinCallButton.tsx +1 -1
- package/src/components/Call/Lobby/Lobby.tsx +2 -2
- package/src/components/Call/Lobby/LobbyFooter.tsx +2 -2
- package/src/components/Call/RingingCallContent/UserInfo.tsx +1 -1
- package/src/components/Livestream/HostLivestream/HostLivestream.tsx +1 -1
- package/src/components/Livestream/LivestreamControls/LivestreamScreenShareToggleButton.tsx +1 -1
- package/src/components/Livestream/LivestreamLayout/LivestreamLayout.tsx +1 -1
- package/src/components/Livestream/LivestreamTopView/DurationBadge.tsx +1 -1
- package/src/components/Livestream/ViewerLivestream/ViewerLivestream.tsx +1 -1
- package/src/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.tsx +10 -10
- package/src/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.tsx +15 -13
- package/src/components/Participant/ParticipantView/ParticipantLabel.tsx +1 -1
- package/src/components/Participant/ParticipantView/ParticipantNetworkQualityIndicator.tsx +1 -1
- package/src/components/Participant/ParticipantView/ParticipantReaction.tsx +3 -3
- package/src/components/Participant/ParticipantView/ParticipantView.tsx +1 -1
- package/src/components/Participant/ParticipantView/SpeechIndicator.tsx +3 -3
- package/src/components/Participant/ParticipantView/VideoRenderer.tsx +1 -1
- package/src/contexts/BackgroundFilters.tsx +7 -7
- package/src/contexts/StreamVideoContext.tsx +3 -3
- package/src/contexts/ThemeContext.tsx +2 -2
- package/src/hooks/internal/useCallMediaStreamCleanup.ts +2 -6
- package/src/hooks/push/useInitAndroidTokenAndRest.ts +7 -0
- package/src/hooks/push/useIosCallkeepWithCallingStateEffect.ts +55 -28
- package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +46 -17
- package/src/hooks/push/useProcessPushCallEffect.ts +8 -8
- package/src/hooks/push/useProcessPushNonRingingCallEffect.ts +1 -1
- package/src/hooks/useAndroidKeepCallAliveEffect.ts +10 -10
- package/src/hooks/useAutoEnterPiPEffect.tsx +2 -2
- package/src/hooks/useIsIosScreenshareBroadcastStarted.ts +2 -2
- package/src/hooks/usePaginatedLayoutSortPreset.ts +1 -1
- package/src/hooks/usePermissionNotification.tsx +1 -1
- package/src/hooks/usePermissionRequest.tsx +4 -4
- package/src/hooks/useScreenShareButton.ts +9 -10
- package/src/hooks/useTrackDimensions.ts +3 -3
- package/src/providers/StreamCall/AppStateListener.tsx +6 -6
- package/src/providers/StreamCall/DeviceStats.tsx +8 -8
- package/src/providers/StreamVideo.tsx +1 -1
- package/src/utils/StreamVideoRN/index.ts +4 -4
- package/src/utils/StreamVideoRN/types.ts +4 -4
- package/src/utils/enterPiPAndroid.ts +1 -1
- package/src/utils/index.ts +2 -2
- package/src/utils/internal/newNotificationCallbacks.ts +3 -3
- package/src/utils/internal/optionallibs/gestureHandler.ts +1 -1
- package/src/utils/internal/optionallibs/reanimated.ts +1 -1
- package/src/utils/internal/pushLogoutCallback.ts +1 -1
- package/src/utils/push/android.ts +63 -52
- package/src/utils/push/internal/ios.ts +133 -0
- package/src/utils/push/internal/utils.ts +10 -10
- package/src/utils/push/ios.ts +38 -164
- package/src/utils/push/libs/callkeep.ts +2 -2
- package/src/utils/push/libs/expoNotifications.ts +15 -4
- package/src/utils/push/libs/firebaseMessaging/index.ts +4 -4
- package/src/utils/push/libs/firebaseMessaging/lib.ts +1 -1
- package/src/utils/push/libs/iosPushNotification.ts +4 -4
- package/src/utils/push/libs/notifee/index.ts +7 -7
- package/src/utils/push/libs/notifee/lib.ts +1 -1
- package/src/utils/push/libs/voipPushNotification.ts +2 -2
- package/src/utils/push/setupIosCallKeepEvents.ts +24 -17
- package/src/utils/push/setupIosVoipPushEvents.ts +12 -4
- package/src/utils/push/utils.ts +2 -2
- package/src/version.ts +1 -1
|
@@ -27,14 +27,14 @@ const isAcceptedCallingState = (callingState: CallingState) => {
|
|
|
27
27
|
|
|
28
28
|
const unsubscribeCallkeepEvents = async (activeCallCid: string | undefined) => {
|
|
29
29
|
const voipPushNotificationCallCId = RxUtils.getCurrentValue(
|
|
30
|
-
voipPushNotificationCallCId
|
|
30
|
+
voipPushNotificationCallCId$,
|
|
31
31
|
);
|
|
32
32
|
if (activeCallCid && activeCallCid === voipPushNotificationCallCId) {
|
|
33
33
|
// callkeep events should not be listened anymore so clear the call cid
|
|
34
34
|
voipPushNotificationCallCId$.next(undefined);
|
|
35
35
|
}
|
|
36
36
|
return await NativeModules.StreamVideoReactNative?.removeIncomingCall(
|
|
37
|
-
activeCallCid
|
|
37
|
+
activeCallCid,
|
|
38
38
|
);
|
|
39
39
|
};
|
|
40
40
|
|
|
@@ -59,17 +59,26 @@ export const useIosCallkeepWithCallingStateEffect = () => {
|
|
|
59
59
|
useEffect(() => {
|
|
60
60
|
return () => {
|
|
61
61
|
const pushConfig = StreamVideoRN.getConfig().push;
|
|
62
|
-
if (
|
|
62
|
+
if (
|
|
63
|
+
Platform.OS !== 'ios' ||
|
|
64
|
+
!pushConfig ||
|
|
65
|
+
!pushConfig.ios?.pushProviderName
|
|
66
|
+
) {
|
|
63
67
|
return;
|
|
64
68
|
}
|
|
69
|
+
if (!pushConfig.android.incomingCallChannel) {
|
|
70
|
+
// TODO: remove this check and find a better way once we have telecom integration for android
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
|
|
65
74
|
const callkeep = getCallKeepLib();
|
|
66
75
|
// if the component is unmounted and the callID was not reported to callkeep, then report it now
|
|
67
76
|
if (acceptedForegroundCallkeepMap) {
|
|
68
77
|
log(
|
|
69
|
-
`Ending call in callkeep: ${acceptedForegroundCallkeepMap.cid}, reason: component unmounted and call was present in acceptedForegroundCallkeepMap
|
|
78
|
+
`Ending call in callkeep: ${acceptedForegroundCallkeepMap.cid}, reason: component unmounted and call was present in acceptedForegroundCallkeepMap`,
|
|
70
79
|
);
|
|
71
80
|
unsubscribeCallkeepEvents(acceptedForegroundCallkeepMap.cid).then(() =>
|
|
72
|
-
callkeep.endCall(acceptedForegroundCallkeepMap.uuid)
|
|
81
|
+
callkeep.endCall(acceptedForegroundCallkeepMap.uuid),
|
|
73
82
|
);
|
|
74
83
|
}
|
|
75
84
|
};
|
|
@@ -80,38 +89,56 @@ export const useIosCallkeepWithCallingStateEffect = () => {
|
|
|
80
89
|
useEffect(() => {
|
|
81
90
|
return () => {
|
|
82
91
|
const pushConfig = StreamVideoRN.getConfig().push;
|
|
83
|
-
if (
|
|
92
|
+
if (
|
|
93
|
+
Platform.OS !== 'ios' ||
|
|
94
|
+
!pushConfig ||
|
|
95
|
+
!pushConfig.ios?.pushProviderName ||
|
|
96
|
+
!activeCallCid
|
|
97
|
+
) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if (!pushConfig.android.incomingCallChannel) {
|
|
101
|
+
// TODO: remove this check and find a better way once we have telecom integration for android
|
|
84
102
|
return;
|
|
85
103
|
}
|
|
86
104
|
const nativeDialerAcceptedCallMap = RxUtils.getCurrentValue(
|
|
87
|
-
voipCallkeepAcceptedCallOnNativeDialerMap
|
|
105
|
+
voipCallkeepAcceptedCallOnNativeDialerMap$,
|
|
88
106
|
);
|
|
89
107
|
const foregroundIncomingCallkeepMap = RxUtils.getCurrentValue(
|
|
90
|
-
voipCallkeepCallOnForegroundMap
|
|
108
|
+
voipCallkeepCallOnForegroundMap$,
|
|
91
109
|
);
|
|
92
110
|
const callkeep = getCallKeepLib();
|
|
93
111
|
if (activeCallCid === nativeDialerAcceptedCallMap?.cid) {
|
|
94
112
|
log(
|
|
95
|
-
`Ending call in callkeep: ${activeCallCid}, reason: activeCallCid changed or was removed and call was present in nativeDialerAcceptedCallMap
|
|
113
|
+
`Ending call in callkeep: ${activeCallCid}, reason: activeCallCid changed or was removed and call was present in nativeDialerAcceptedCallMap`,
|
|
96
114
|
);
|
|
97
115
|
unsubscribeCallkeepEvents(activeCallCid).then(() =>
|
|
98
|
-
callkeep.endCall(nativeDialerAcceptedCallMap.uuid)
|
|
116
|
+
callkeep.endCall(nativeDialerAcceptedCallMap.uuid),
|
|
99
117
|
);
|
|
100
118
|
// no need to keep this reference anymore
|
|
101
119
|
voipCallkeepAcceptedCallOnNativeDialerMap$.next(undefined);
|
|
102
120
|
} else if (activeCallCid === foregroundIncomingCallkeepMap?.cid) {
|
|
103
121
|
log(
|
|
104
|
-
`Ending call in callkeep: ${activeCallCid}, reason: activeCallCid changed or was removed and call was present in foregroundIncomingCallkeepMap
|
|
122
|
+
`Ending call in callkeep: ${activeCallCid}, reason: activeCallCid changed or was removed and call was present in foregroundIncomingCallkeepMap`,
|
|
105
123
|
);
|
|
106
124
|
unsubscribeCallkeepEvents(activeCallCid).then(() =>
|
|
107
|
-
callkeep.endCall(foregroundIncomingCallkeepMap.uuid)
|
|
125
|
+
callkeep.endCall(foregroundIncomingCallkeepMap.uuid),
|
|
108
126
|
);
|
|
109
127
|
}
|
|
110
128
|
};
|
|
111
129
|
}, [activeCallCid]);
|
|
112
130
|
|
|
113
131
|
const pushConfig = StreamVideoRN.getConfig().push;
|
|
114
|
-
if (
|
|
132
|
+
if (
|
|
133
|
+
Platform.OS !== 'ios' ||
|
|
134
|
+
!pushConfig ||
|
|
135
|
+
!pushConfig.ios.pushProviderName ||
|
|
136
|
+
!activeCallCid
|
|
137
|
+
) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
if (!pushConfig.android.incomingCallChannel) {
|
|
141
|
+
// TODO: remove this check and find a better way once we have telecom integration for android
|
|
115
142
|
return;
|
|
116
143
|
}
|
|
117
144
|
|
|
@@ -126,17 +153,17 @@ export const useIosCallkeepWithCallingStateEffect = () => {
|
|
|
126
153
|
// push notification was displayed
|
|
127
154
|
// but the call has been accepted through the app and not through the native dialer
|
|
128
155
|
const foregroundCallkeepMap = RxUtils.getCurrentValue(
|
|
129
|
-
voipCallkeepCallOnForegroundMap
|
|
156
|
+
voipCallkeepCallOnForegroundMap$,
|
|
130
157
|
);
|
|
131
158
|
if (foregroundCallkeepMap && foregroundCallkeepMap.cid === activeCallCid) {
|
|
132
159
|
log(
|
|
133
|
-
// @ts-
|
|
134
|
-
`Accepting call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in foregroundCallkeepMap
|
|
160
|
+
// @ts-expect-error - types issue
|
|
161
|
+
`Accepting call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in foregroundCallkeepMap`,
|
|
135
162
|
);
|
|
136
163
|
// no need to keep this reference anymore
|
|
137
164
|
voipCallkeepCallOnForegroundMap$.next(undefined);
|
|
138
165
|
NativeModules.StreamVideoReactNative?.removeIncomingCall(
|
|
139
|
-
activeCallCid
|
|
166
|
+
activeCallCid,
|
|
140
167
|
).then(() => callkeep.answerIncomingCall(foregroundCallkeepMap.uuid));
|
|
141
168
|
// this call should be accepted in callkeep
|
|
142
169
|
setAcceptedForegroundCallkeepMap(foregroundCallkeepMap);
|
|
@@ -154,11 +181,11 @@ export const useIosCallkeepWithCallingStateEffect = () => {
|
|
|
154
181
|
// the call was left using the leave button in the app and not through native dialer
|
|
155
182
|
if (activeCallCid === acceptedForegroundCallkeepMap?.cid) {
|
|
156
183
|
log(
|
|
157
|
-
// @ts-
|
|
158
|
-
`Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in acceptedForegroundCallkeepMap
|
|
184
|
+
// @ts-expect-error - types issue
|
|
185
|
+
`Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in acceptedForegroundCallkeepMap`,
|
|
159
186
|
);
|
|
160
187
|
unsubscribeCallkeepEvents(activeCallCid).then(() =>
|
|
161
|
-
callkeep.endCall(acceptedForegroundCallkeepMap.uuid)
|
|
188
|
+
callkeep.endCall(acceptedForegroundCallkeepMap.uuid),
|
|
162
189
|
);
|
|
163
190
|
setAcceptedForegroundCallkeepMap(undefined);
|
|
164
191
|
return;
|
|
@@ -166,15 +193,15 @@ export const useIosCallkeepWithCallingStateEffect = () => {
|
|
|
166
193
|
// this was a call which had push notification displayed but never joined
|
|
167
194
|
// the user rejected in the app and not from native dialer
|
|
168
195
|
const foregroundIncomingCallkeepMap = RxUtils.getCurrentValue(
|
|
169
|
-
voipCallkeepCallOnForegroundMap
|
|
196
|
+
voipCallkeepCallOnForegroundMap$,
|
|
170
197
|
);
|
|
171
198
|
if (activeCallCid === foregroundIncomingCallkeepMap?.cid) {
|
|
172
199
|
log(
|
|
173
|
-
// @ts-
|
|
174
|
-
`Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in foregroundIncomingCallkeepMap
|
|
200
|
+
// @ts-expect-error - types issue
|
|
201
|
+
`Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in foregroundIncomingCallkeepMap`,
|
|
175
202
|
);
|
|
176
203
|
unsubscribeCallkeepEvents(activeCallCid).then(() =>
|
|
177
|
-
callkeep.endCall(foregroundIncomingCallkeepMap.uuid)
|
|
204
|
+
callkeep.endCall(foregroundIncomingCallkeepMap.uuid),
|
|
178
205
|
);
|
|
179
206
|
// no need to keep this reference anymore
|
|
180
207
|
voipCallkeepCallOnForegroundMap$.next(undefined);
|
|
@@ -184,15 +211,15 @@ export const useIosCallkeepWithCallingStateEffect = () => {
|
|
|
184
211
|
// it was an accepted call from native dialer and not from the app
|
|
185
212
|
// the user left using the leave button in the app
|
|
186
213
|
const nativeDialerAcceptedCallMap = RxUtils.getCurrentValue(
|
|
187
|
-
voipCallkeepAcceptedCallOnNativeDialerMap
|
|
214
|
+
voipCallkeepAcceptedCallOnNativeDialerMap$,
|
|
188
215
|
);
|
|
189
216
|
if (activeCallCid === nativeDialerAcceptedCallMap?.cid) {
|
|
190
217
|
log(
|
|
191
|
-
// @ts-
|
|
192
|
-
`Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in nativeDialerAcceptedCallMap
|
|
218
|
+
// @ts-expect-error - types issue
|
|
219
|
+
`Ending call in callkeep: ${activeCallCid}, reason: callingstate went to ${CallingState[callingState]} and call was present in nativeDialerAcceptedCallMap`,
|
|
193
220
|
);
|
|
194
221
|
unsubscribeCallkeepEvents(activeCallCid).then(() =>
|
|
195
|
-
callkeep.endCall(nativeDialerAcceptedCallMap.uuid)
|
|
222
|
+
callkeep.endCall(nativeDialerAcceptedCallMap.uuid),
|
|
196
223
|
);
|
|
197
224
|
// no need to keep this reference anymore
|
|
198
225
|
voipCallkeepAcceptedCallOnNativeDialerMap$.next(undefined);
|
|
@@ -2,13 +2,14 @@ import { type MutableRefObject, useEffect, useRef, useState } from 'react';
|
|
|
2
2
|
import { getVoipPushNotificationLib } from '../../utils/push/libs';
|
|
3
3
|
|
|
4
4
|
import { Platform } from 'react-native';
|
|
5
|
-
import {
|
|
5
|
+
import { StreamVideoRN } from '../../utils';
|
|
6
|
+
import { onVoipNotificationReceived } from '../../utils/push/internal/ios';
|
|
6
7
|
import {
|
|
7
8
|
useConnectedUser,
|
|
8
9
|
useStreamVideoClient,
|
|
9
10
|
} from '@stream-io/video-react-bindings';
|
|
10
11
|
import { setPushLogoutCallback } from '../../utils/internal/pushLogoutCallback';
|
|
11
|
-
import {
|
|
12
|
+
import { getLogger, StreamVideoClient } from '@stream-io/video-client';
|
|
12
13
|
|
|
13
14
|
const logger = getLogger(['useIosVoipPushEventsSetupEffect']);
|
|
14
15
|
|
|
@@ -16,12 +17,12 @@ const logger = getLogger(['useIosVoipPushEventsSetupEffect']);
|
|
|
16
17
|
hence to support login and logout scenario of multiple users we keep of the last count of the listener that was added
|
|
17
18
|
This helps in not removing the listeners when a new user logs in and overrides the last listener
|
|
18
19
|
*/
|
|
19
|
-
|
|
20
|
+
const lastListener = { count: 0 };
|
|
20
21
|
|
|
21
22
|
function setLogoutCallback(
|
|
22
23
|
client: StreamVideoClient,
|
|
23
24
|
token: string,
|
|
24
|
-
lastVoipTokenRef: MutableRefObject<{ token: string; userId: string }
|
|
25
|
+
lastVoipTokenRef: MutableRefObject<{ token: string; userId: string }>,
|
|
25
26
|
) {
|
|
26
27
|
setPushLogoutCallback(async () => {
|
|
27
28
|
lastVoipTokenRef.current = { token: '', userId: '' };
|
|
@@ -31,7 +32,7 @@ function setLogoutCallback(
|
|
|
31
32
|
logger(
|
|
32
33
|
'warn',
|
|
33
34
|
'PushLogoutCallback - Failed to remove voip token from stream',
|
|
34
|
-
err
|
|
35
|
+
err,
|
|
35
36
|
);
|
|
36
37
|
}
|
|
37
38
|
});
|
|
@@ -62,7 +63,7 @@ export const useIosVoipPushEventsSetupEffect = () => {
|
|
|
62
63
|
logger(
|
|
63
64
|
'debug',
|
|
64
65
|
'Sending unsent voip token to stream as user logged in after token was received, token: ' +
|
|
65
|
-
unsentToken
|
|
66
|
+
unsentToken,
|
|
66
67
|
);
|
|
67
68
|
client
|
|
68
69
|
.addVoipDevice(unsentToken, 'apn', pushConfig.ios.pushProviderName)
|
|
@@ -70,7 +71,7 @@ export const useIosVoipPushEventsSetupEffect = () => {
|
|
|
70
71
|
setLogoutCallback(client, unsentToken, lastVoipTokenRef);
|
|
71
72
|
logger(
|
|
72
73
|
'debug',
|
|
73
|
-
'Sent unsent voip token to stream - token: ' + unsentToken
|
|
74
|
+
'Sent unsent voip token to stream - token: ' + unsentToken,
|
|
74
75
|
);
|
|
75
76
|
lastVoipTokenRef.current = {
|
|
76
77
|
token: unsentToken,
|
|
@@ -86,7 +87,23 @@ export const useIosVoipPushEventsSetupEffect = () => {
|
|
|
86
87
|
useEffect(() => {
|
|
87
88
|
const pushConfig = StreamVideoRN.getConfig().push;
|
|
88
89
|
const pushProviderName = pushConfig?.ios.pushProviderName;
|
|
89
|
-
if (Platform.OS !== 'ios' || !
|
|
90
|
+
if (Platform.OS !== 'ios' || !client || !pushProviderName) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (!pushConfig.android.incomingCallChannel) {
|
|
94
|
+
// TODO: remove this check and find a better way once we have telecom integration for android
|
|
95
|
+
getLogger(['useIosVoipPushEventsSetupEffect'])(
|
|
96
|
+
'debug',
|
|
97
|
+
'android incomingCallChannel is not defined, so skipping the useIosVoipPushEventsSetupEffect',
|
|
98
|
+
);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (!pushConfig.android.incomingCallChannel) {
|
|
102
|
+
// TODO: remove this check and find a better way once we have telecom integration for android
|
|
103
|
+
getLogger(['useIosVoipPushEventsSetupEffect'])(
|
|
104
|
+
'debug',
|
|
105
|
+
'android incomingCallChannel is not defined, so skipping the useIosVoipPushEventsSetupEffect',
|
|
106
|
+
);
|
|
90
107
|
return;
|
|
91
108
|
}
|
|
92
109
|
|
|
@@ -99,10 +116,18 @@ export const useIosVoipPushEventsSetupEffect = () => {
|
|
|
99
116
|
|
|
100
117
|
const onTokenReceived = (token: string) => {
|
|
101
118
|
const userId = client.streamClient._user?.id ?? '';
|
|
119
|
+
if (!token) {
|
|
120
|
+
logger(
|
|
121
|
+
'debug',
|
|
122
|
+
`Skipped sending voip token to stream no token was present - userId: ${userId} (possibly using a simulator)`,
|
|
123
|
+
);
|
|
124
|
+
setUnsentToken(token);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
102
127
|
if (!userId) {
|
|
103
128
|
logger(
|
|
104
129
|
'debug',
|
|
105
|
-
`Skipped sending voip token to stream no user id was present - token: ${token}
|
|
130
|
+
`Skipped sending voip token to stream no user id was present - token: ${token}`,
|
|
106
131
|
);
|
|
107
132
|
setUnsentToken(token);
|
|
108
133
|
return;
|
|
@@ -111,27 +136,31 @@ export const useIosVoipPushEventsSetupEffect = () => {
|
|
|
111
136
|
if (lastVoipToken.token === token && lastVoipToken.userId === userId) {
|
|
112
137
|
logger(
|
|
113
138
|
'debug',
|
|
114
|
-
`Skipped sending voip token to stream as it is same as last token - token: ${token}, userId: ${userId}
|
|
139
|
+
`Skipped sending voip token to stream as it is same as last token - token: ${token}, userId: ${userId}`,
|
|
115
140
|
);
|
|
116
141
|
return;
|
|
117
142
|
}
|
|
118
143
|
logger(
|
|
119
144
|
'debug',
|
|
120
|
-
`Sending voip token to stream, token: ${token} userId: ${userId}
|
|
145
|
+
`Sending voip token to stream, token: ${token} userId: ${userId}`,
|
|
121
146
|
);
|
|
122
147
|
client
|
|
123
148
|
.addVoipDevice(token, 'apn', pushProviderName)
|
|
124
149
|
.then(() => {
|
|
125
150
|
logger(
|
|
126
151
|
'debug',
|
|
127
|
-
`Sent voip token to stream, token: ${token} userId: ${userId}
|
|
152
|
+
`Sent voip token to stream, token: ${token} userId: ${userId}`,
|
|
128
153
|
);
|
|
129
154
|
setLogoutCallback(client, token, lastVoipTokenRef);
|
|
130
155
|
lastVoipTokenRef.current = { token, userId };
|
|
131
156
|
})
|
|
132
157
|
.catch((err) => {
|
|
133
158
|
setUnsentToken(token);
|
|
134
|
-
logger(
|
|
159
|
+
logger(
|
|
160
|
+
'warn',
|
|
161
|
+
`Failed to send voip token to stream token: ${token} userId: ${userId}`,
|
|
162
|
+
err,
|
|
163
|
+
);
|
|
135
164
|
});
|
|
136
165
|
};
|
|
137
166
|
// fired when PushKit give us the latest token
|
|
@@ -144,12 +173,12 @@ export const useIosVoipPushEventsSetupEffect = () => {
|
|
|
144
173
|
if (!events || !Array.isArray(events) || events.length < 1) {
|
|
145
174
|
return;
|
|
146
175
|
}
|
|
147
|
-
for (
|
|
148
|
-
|
|
176
|
+
for (const voipPushEvent of events) {
|
|
177
|
+
const { name, data } = voipPushEvent;
|
|
149
178
|
if (name === 'RNVoipPushRemoteNotificationsRegisteredEvent') {
|
|
150
179
|
onTokenReceived(data);
|
|
151
180
|
} else if (name === 'RNVoipPushRemoteNotificationReceivedEvent') {
|
|
152
|
-
onVoipNotificationReceived(data);
|
|
181
|
+
onVoipNotificationReceived(data, pushConfig);
|
|
153
182
|
}
|
|
154
183
|
}
|
|
155
184
|
});
|
|
@@ -161,7 +190,7 @@ export const useIosVoipPushEventsSetupEffect = () => {
|
|
|
161
190
|
if (currentListenerCount !== lastListener.count) {
|
|
162
191
|
logger(
|
|
163
192
|
'debug',
|
|
164
|
-
'Skipped removing voip event listeners for user: ' + userId
|
|
193
|
+
'Skipped removing voip event listeners for user: ' + userId,
|
|
165
194
|
);
|
|
166
195
|
return;
|
|
167
196
|
}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
useStreamVideoClient,
|
|
12
12
|
} from '@stream-io/video-react-bindings';
|
|
13
13
|
import { BehaviorSubject } from 'rxjs';
|
|
14
|
-
import {
|
|
14
|
+
import { distinctUntilChanged, filter } from 'rxjs/operators';
|
|
15
15
|
import { processCallFromPush } from '../../utils/push/internal/utils';
|
|
16
16
|
import { getLogger, StreamVideoClient } from '@stream-io/video-client';
|
|
17
17
|
import type { StreamVideoConfig } from '../../utils/StreamVideoRN/types';
|
|
@@ -34,7 +34,7 @@ export const useProcessPushCallEffect = () => {
|
|
|
34
34
|
|
|
35
35
|
getLogger(['useProcessPushCallEffect'])(
|
|
36
36
|
'debug',
|
|
37
|
-
`Adding subscriptions to process incoming call from push notification
|
|
37
|
+
`Adding subscriptions to process incoming call from push notification`,
|
|
38
38
|
);
|
|
39
39
|
|
|
40
40
|
// if the user accepts the call from push notification we join the call
|
|
@@ -42,7 +42,7 @@ export const useProcessPushCallEffect = () => {
|
|
|
42
42
|
pushAcceptedIncomingCallCId$,
|
|
43
43
|
client,
|
|
44
44
|
pushConfig,
|
|
45
|
-
'accept'
|
|
45
|
+
'accept',
|
|
46
46
|
);
|
|
47
47
|
|
|
48
48
|
// if the user rejects the call from push notification we leave the call
|
|
@@ -50,7 +50,7 @@ export const useProcessPushCallEffect = () => {
|
|
|
50
50
|
pushRejectedIncomingCallCId$,
|
|
51
51
|
client,
|
|
52
52
|
pushConfig,
|
|
53
|
-
'decline'
|
|
53
|
+
'decline',
|
|
54
54
|
);
|
|
55
55
|
|
|
56
56
|
// if the user taps the call from push notification we do nothing as the only thing is to get the call which adds it to the client
|
|
@@ -58,14 +58,14 @@ export const useProcessPushCallEffect = () => {
|
|
|
58
58
|
pushTappedIncomingCallCId$,
|
|
59
59
|
client,
|
|
60
60
|
pushConfig,
|
|
61
|
-
'pressed'
|
|
61
|
+
'pressed',
|
|
62
62
|
);
|
|
63
63
|
|
|
64
64
|
const backgroundIncomingDeliveredCallSubscription = createCallSubscription(
|
|
65
65
|
pushAndroidBackgroundDeliveredIncomingCallCId$,
|
|
66
66
|
client,
|
|
67
67
|
pushConfig,
|
|
68
|
-
'backgroundDelivered'
|
|
68
|
+
'backgroundDelivered',
|
|
69
69
|
);
|
|
70
70
|
|
|
71
71
|
return () => {
|
|
@@ -91,14 +91,14 @@ const createCallSubscription = (
|
|
|
91
91
|
behaviourSubjectWithCallCid: BehaviorSubject<string | undefined>,
|
|
92
92
|
client: StreamVideoClient,
|
|
93
93
|
pushConfig: NonNullable<StreamVideoConfig['push']>,
|
|
94
|
-
action: 'accept' | 'decline' | 'pressed' | 'backgroundDelivered'
|
|
94
|
+
action: 'accept' | 'decline' | 'pressed' | 'backgroundDelivered',
|
|
95
95
|
) => {
|
|
96
96
|
return behaviourSubjectWithCallCid
|
|
97
97
|
.pipe(distinctUntilChanged(), filter(cidIsNotUndefined))
|
|
98
98
|
.subscribe(async (callCId) => {
|
|
99
99
|
getLogger(['useProcessPushCallEffect'])(
|
|
100
100
|
'debug',
|
|
101
|
-
`Processing call from push notification with action: ${action} and callCId: ${callCId}
|
|
101
|
+
`Processing call from push notification with action: ${action} and callCId: ${callCId}`,
|
|
102
102
|
);
|
|
103
103
|
await processCallFromPush(client, callCId, action, pushConfig);
|
|
104
104
|
behaviourSubjectWithCallCid.next(undefined); // remove the current call id to avoid processing again
|
|
@@ -29,7 +29,7 @@ export const useProcessPushNonRingingCallEffect = () => {
|
|
|
29
29
|
.subscribe(async ({ cid, type }) => {
|
|
30
30
|
getLogger(['useProcessPushNonRingingCallEffect'])(
|
|
31
31
|
'debug',
|
|
32
|
-
`processNonIncomingCallFromPush with callCId: ${cid} and type: ${type}
|
|
32
|
+
`processNonIncomingCallFromPush with callCId: ${cid} and type: ${type}`,
|
|
33
33
|
);
|
|
34
34
|
await processNonIncomingCallFromPush(client, cid, type);
|
|
35
35
|
pushNonRingingCallData$.next(undefined); // remove the current data to avoid processing again
|
|
@@ -2,15 +2,15 @@ import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { StreamVideoRN } from '../utils';
|
|
4
4
|
import {
|
|
5
|
-
NativeModules,
|
|
6
5
|
AppState,
|
|
7
6
|
type AppStateStatus,
|
|
7
|
+
NativeModules,
|
|
8
8
|
Platform,
|
|
9
9
|
} from 'react-native';
|
|
10
10
|
import { CallingState, getLogger } from '@stream-io/video-client';
|
|
11
11
|
import {
|
|
12
|
-
getNotifeeLibNoThrowForKeepCallAlive,
|
|
13
12
|
getKeepCallAliveForegroundServiceTypes,
|
|
13
|
+
getNotifeeLibNoThrowForKeepCallAlive,
|
|
14
14
|
} from '../utils/push/libs/notifee';
|
|
15
15
|
|
|
16
16
|
const notifeeLib = getNotifeeLibNoThrowForKeepCallAlive();
|
|
@@ -23,7 +23,7 @@ function setForegroundService() {
|
|
|
23
23
|
const logger = getLogger(['setForegroundService method']);
|
|
24
24
|
logger(
|
|
25
25
|
'info',
|
|
26
|
-
'KeepCallAlive is not configured. Skipping foreground service setup.'
|
|
26
|
+
'KeepCallAlive is not configured. Skipping foreground service setup.',
|
|
27
27
|
);
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
@@ -33,7 +33,7 @@ function setForegroundService() {
|
|
|
33
33
|
logger('info', 'Foreground service running for call in progress');
|
|
34
34
|
});
|
|
35
35
|
});
|
|
36
|
-
}
|
|
36
|
+
},
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -50,7 +50,7 @@ async function startForegroundService(call_cid: string) {
|
|
|
50
50
|
const logger = getLogger(['startForegroundService']);
|
|
51
51
|
logger(
|
|
52
52
|
'info',
|
|
53
|
-
'KeepCallAlive is not configured. Skipping foreground service setup.'
|
|
53
|
+
'KeepCallAlive is not configured. Skipping foreground service setup.',
|
|
54
54
|
);
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
@@ -61,13 +61,13 @@ async function startForegroundService(call_cid: string) {
|
|
|
61
61
|
const logger = getLogger(['startForegroundService']);
|
|
62
62
|
logger(
|
|
63
63
|
'info',
|
|
64
|
-
'Notification permission not granted, can not start foreground service to keep the call alive'
|
|
64
|
+
'Notification permission not granted, can not start foreground service to keep the call alive',
|
|
65
65
|
);
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
const channelId = foregroundServiceConfig.android.channel.id;
|
|
69
69
|
await notifeeLib.default.createChannel(
|
|
70
|
-
foregroundServiceConfig.android.channel
|
|
70
|
+
foregroundServiceConfig.android.channel,
|
|
71
71
|
);
|
|
72
72
|
const foregroundServiceTypes = await getKeepCallAliveForegroundServiceTypes();
|
|
73
73
|
// NOTE: we use requestAnimationFrame to ensure that the foreground service is started after all the current UI operations are done
|
|
@@ -138,7 +138,7 @@ export const useAndroidKeepCallAliveEffect = () => {
|
|
|
138
138
|
const displayedNotifications =
|
|
139
139
|
await notifee.getDisplayedNotifications();
|
|
140
140
|
const activeCallNotification = displayedNotifications.find(
|
|
141
|
-
(notification) => notification.id === activeCallCid
|
|
141
|
+
(notification) => notification.id === activeCallCid,
|
|
142
142
|
);
|
|
143
143
|
if (activeCallNotification) {
|
|
144
144
|
// this means that we have a incoming call notification shown as foreground service and we must stop it
|
|
@@ -163,7 +163,7 @@ export const useAndroidKeepCallAliveEffect = () => {
|
|
|
163
163
|
run();
|
|
164
164
|
sub.remove();
|
|
165
165
|
}
|
|
166
|
-
}
|
|
166
|
+
},
|
|
167
167
|
);
|
|
168
168
|
return () => {
|
|
169
169
|
sub.remove();
|
|
@@ -187,7 +187,7 @@ export const useAndroidKeepCallAliveEffect = () => {
|
|
|
187
187
|
.getDisplayedNotifications()
|
|
188
188
|
.then((displayedNotifications) => {
|
|
189
189
|
const activeCallNotification = displayedNotifications.find(
|
|
190
|
-
(notification) => notification.id === activeCallCid
|
|
190
|
+
(notification) => notification.id === activeCallCid,
|
|
191
191
|
);
|
|
192
192
|
if (activeCallNotification) {
|
|
193
193
|
// this means that we have a incoming call notification shown as foreground service and we must stop it
|
|
@@ -5,7 +5,7 @@ import { NativeModules, Platform } from 'react-native';
|
|
|
5
5
|
import { disablePiPMode$ } from '../utils/internal/rxSubjects';
|
|
6
6
|
|
|
7
7
|
export function useAutoEnterPiPEffect(
|
|
8
|
-
disablePictureInPicture: boolean | undefined
|
|
8
|
+
disablePictureInPicture: boolean | undefined,
|
|
9
9
|
) {
|
|
10
10
|
const { useCallCallingState } = useCallStateHooks();
|
|
11
11
|
|
|
@@ -19,7 +19,7 @@ export function useAutoEnterPiPEffect(
|
|
|
19
19
|
|
|
20
20
|
if (!disablePictureInPicture && callingState === CallingState.JOINED) {
|
|
21
21
|
NativeModules.StreamVideoReactNative.canAutoEnterPipMode(
|
|
22
|
-
!disablePictureInPicture
|
|
22
|
+
!disablePictureInPicture,
|
|
23
23
|
);
|
|
24
24
|
}
|
|
25
25
|
}, [callingState, disablePictureInPicture]);
|
|
@@ -14,14 +14,14 @@ export function useIsIosScreenshareBroadcastStarted() {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
const eventEmitter = new NativeEventEmitter(
|
|
17
|
-
NativeModules.StreamVideoReactNative
|
|
17
|
+
NativeModules.StreamVideoReactNative,
|
|
18
18
|
);
|
|
19
19
|
|
|
20
20
|
const subscription = eventEmitter.addListener(
|
|
21
21
|
'StreamVideoReactNative_Ios_Screenshare_Event',
|
|
22
22
|
(event: Event) => {
|
|
23
23
|
setHasStarted(event.name === 'iOS_BroadcastStarted');
|
|
24
|
-
}
|
|
24
|
+
},
|
|
25
25
|
);
|
|
26
26
|
|
|
27
27
|
return () => {
|
|
@@ -10,7 +10,7 @@ const resetSortPreset = (call: Call) => {
|
|
|
10
10
|
// reset the sorting to the default for the call type
|
|
11
11
|
const callConfig = CallTypes.get(call.type);
|
|
12
12
|
call.setSortParticipantsBy(
|
|
13
|
-
callConfig.options.sortParticipantsBy || defaultSortPreset
|
|
13
|
+
callConfig.options.sortParticipantsBy || defaultSortPreset,
|
|
14
14
|
);
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -24,7 +24,7 @@ export type PermissionNotificationProps = {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export const usePermissionNotification = (
|
|
27
|
-
props: PermissionNotificationProps
|
|
27
|
+
props: PermissionNotificationProps,
|
|
28
28
|
) => {
|
|
29
29
|
const { permission, messageApproved, messageRevoked } = props;
|
|
30
30
|
const { useCallCallingState, useHasPermissions } = useCallStateHooks();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
getLogger,
|
|
2
3
|
OwnCapability,
|
|
3
4
|
type PermissionRequestEvent,
|
|
4
|
-
getLogger,
|
|
5
5
|
} from '@stream-io/video-client';
|
|
6
6
|
import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
7
7
|
import { useCallback, useEffect } from 'react';
|
|
@@ -12,7 +12,7 @@ export const usePermissionRequest = () => {
|
|
|
12
12
|
|
|
13
13
|
const { useHasPermissions } = useCallStateHooks();
|
|
14
14
|
const userHasUpdateCallPermissionsCapability = useHasPermissions(
|
|
15
|
-
OwnCapability.UPDATE_CALL_PERMISSIONS
|
|
15
|
+
OwnCapability.UPDATE_CALL_PERMISSIONS,
|
|
16
16
|
);
|
|
17
17
|
|
|
18
18
|
const messageForPermission = (userName: string, permission: string) => {
|
|
@@ -44,7 +44,7 @@ export const usePermissionRequest = () => {
|
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
},
|
|
47
|
-
[call]
|
|
47
|
+
[call],
|
|
48
48
|
);
|
|
49
49
|
|
|
50
50
|
useEffect(() => {
|
|
@@ -69,7 +69,7 @@ export const usePermissionRequest = () => {
|
|
|
69
69
|
text: 'Allow',
|
|
70
70
|
onPress: handleUpdatePermission(event, true),
|
|
71
71
|
},
|
|
72
|
-
]
|
|
72
|
+
],
|
|
73
73
|
);
|
|
74
74
|
});
|
|
75
75
|
});
|