@stream-io/video-react-native-sdk 1.39.0 → 1.40.0
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 +24 -6
- package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNativeModule.kt +81 -0
- package/android/src/main/java/com/streamvideo/reactnative/recorder/AudioPipeline.kt +436 -0
- package/android/src/main/java/com/streamvideo/reactnative/recorder/EncoderConstants.kt +17 -0
- package/android/src/main/java/com/streamvideo/reactnative/recorder/PipelineHost.kt +36 -0
- package/android/src/main/java/com/streamvideo/reactnative/recorder/RecorderPlaybackSamplesSink.kt +60 -0
- package/android/src/main/java/com/streamvideo/reactnative/recorder/RecorderVideoSink.kt +31 -0
- package/android/src/main/java/com/streamvideo/reactnative/recorder/TracksRecorderManager.kt +338 -0
- package/android/src/main/java/com/streamvideo/reactnative/recorder/VideoPipeline.kt +472 -0
- package/dist/commonjs/components/Call/CallContent/CallContent.js +93 -48
- package/dist/commonjs/components/Call/CallContent/CallContent.js.map +1 -1
- package/dist/commonjs/components/Call/CallContent/RTCViewPipIOS.js +22 -20
- package/dist/commonjs/components/Call/CallContent/RTCViewPipIOS.js.map +1 -1
- package/dist/commonjs/components/Call/CallContent/RTCViewPipNative.js +2 -1
- package/dist/commonjs/components/Call/CallContent/RTCViewPipNative.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/AcceptCallButton.js +10 -6
- package/dist/commonjs/components/Call/CallControls/AcceptCallButton.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/CallControls.js +7 -5
- package/dist/commonjs/components/Call/CallControls/CallControls.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/CallControlsButton.js +11 -8
- package/dist/commonjs/components/Call/CallControls/CallControlsButton.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/HangupCallButton.js +10 -6
- package/dist/commonjs/components/Call/CallControls/HangupCallButton.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/IncomingCallControls.js +11 -9
- package/dist/commonjs/components/Call/CallControls/IncomingCallControls.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/LobbyControls.js +5 -3
- package/dist/commonjs/components/Call/CallControls/LobbyControls.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/OutgoingCallControls.js +12 -9
- package/dist/commonjs/components/Call/CallControls/OutgoingCallControls.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/ReactionsButton.js +22 -15
- package/dist/commonjs/components/Call/CallControls/ReactionsButton.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/RejectCallButton.js +10 -6
- package/dist/commonjs/components/Call/CallControls/RejectCallButton.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/ScreenShareToggleButton.js +15 -11
- package/dist/commonjs/components/Call/CallControls/ScreenShareToggleButton.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/ToggleAudioPreviewButton.js +13 -9
- package/dist/commonjs/components/Call/CallControls/ToggleAudioPreviewButton.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/ToggleAudioPublishingButton.js +18 -13
- package/dist/commonjs/components/Call/CallControls/ToggleAudioPublishingButton.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/ToggleCameraFaceButton.js +17 -12
- package/dist/commonjs/components/Call/CallControls/ToggleCameraFaceButton.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/ToggleVideoPreviewButton.js +13 -9
- package/dist/commonjs/components/Call/CallControls/ToggleVideoPreviewButton.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/ToggleVideoPublishingButton.js +17 -12
- package/dist/commonjs/components/Call/CallControls/ToggleVideoPublishingButton.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/internal/ReactionsPicker.js +39 -34
- package/dist/commonjs/components/Call/CallControls/internal/ReactionsPicker.js.map +1 -1
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsGrid.js +17 -12
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsGrid.js.map +1 -1
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsSpotlight.js +36 -24
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsSpotlight.js.map +1 -1
- package/dist/commonjs/components/Call/CallParticipantsList/CallParticipantsList.js +30 -28
- package/dist/commonjs/components/Call/CallParticipantsList/CallParticipantsList.js.map +1 -1
- package/dist/commonjs/components/Call/Lobby/JoinCallButton.js +10 -7
- package/dist/commonjs/components/Call/Lobby/JoinCallButton.js.map +1 -1
- package/dist/commonjs/components/Call/Lobby/Lobby.js +45 -35
- package/dist/commonjs/components/Call/Lobby/Lobby.js.map +1 -1
- package/dist/commonjs/components/Call/Lobby/LobbyFooter.js +21 -16
- package/dist/commonjs/components/Call/Lobby/LobbyFooter.js.map +1 -1
- package/dist/commonjs/components/Call/RingingCallContent/CallLeftIndicator.js +2 -1
- package/dist/commonjs/components/Call/RingingCallContent/CallLeftIndicator.js.map +1 -1
- package/dist/commonjs/components/Call/RingingCallContent/CallPreparingIndicator.js +2 -1
- package/dist/commonjs/components/Call/RingingCallContent/CallPreparingIndicator.js.map +1 -1
- package/dist/commonjs/components/Call/RingingCallContent/IncomingCall.js +32 -22
- package/dist/commonjs/components/Call/RingingCallContent/IncomingCall.js.map +1 -1
- package/dist/commonjs/components/Call/RingingCallContent/OutgoingCall.js +37 -27
- package/dist/commonjs/components/Call/RingingCallContent/OutgoingCall.js.map +1 -1
- package/dist/commonjs/components/Call/RingingCallContent/RingingCallContent.js +13 -11
- package/dist/commonjs/components/Call/RingingCallContent/RingingCallContent.js.map +1 -1
- package/dist/commonjs/components/Call/RingingCallContent/TextBasedIndicator.js +28 -22
- package/dist/commonjs/components/Call/RingingCallContent/TextBasedIndicator.js.map +1 -1
- package/dist/commonjs/components/Call/RingingCallContent/UserInfo.js +25 -22
- package/dist/commonjs/components/Call/RingingCallContent/UserInfo.js.map +1 -1
- package/dist/commonjs/components/Livestream/HostLivestream/HostLivestream.js +38 -34
- package/dist/commonjs/components/Livestream/HostLivestream/HostLivestream.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamControls/HostLivestreamControls.js +16 -12
- package/dist/commonjs/components/Livestream/LivestreamControls/HostLivestreamControls.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamControls/HostStartStreamButton.js +16 -12
- package/dist/commonjs/components/Livestream/LivestreamControls/HostStartStreamButton.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js +19 -14
- package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamMediaControls.js +5 -3
- package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamMediaControls.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamScreenShareToggleButton.js +19 -16
- package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamScreenShareToggleButton.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js +19 -14
- package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js +11 -8
- package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLivestreamControls.js +78 -57
- package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLivestreamControls.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamLayout/LivestreamLayout.js +13 -46
- package/dist/commonjs/components/Livestream/LivestreamLayout/LivestreamLayout.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamPlayer/LivestreamEnded.js +48 -22
- package/dist/commonjs/components/Livestream/LivestreamPlayer/LivestreamEnded.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamPlayer/LivestreamPlayer.js +7 -5
- package/dist/commonjs/components/Livestream/LivestreamPlayer/LivestreamPlayer.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamTopView/DurationBadge.js +12 -9
- package/dist/commonjs/components/Livestream/LivestreamTopView/DurationBadge.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamTopView/FollowerCount.js +11 -7
- package/dist/commonjs/components/Livestream/LivestreamTopView/FollowerCount.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamTopView/HostLivestreamTopView.js +18 -13
- package/dist/commonjs/components/Livestream/LivestreamTopView/HostLivestreamTopView.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamTopView/LiveIndicator.js +10 -7
- package/dist/commonjs/components/Livestream/LivestreamTopView/LiveIndicator.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.js +18 -13
- package/dist/commonjs/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.js.map +1 -1
- package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLivestream.js +41 -37
- package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLivestream.js.map +1 -1
- package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLobby.js +33 -23
- package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLobby.js.map +1 -1
- package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js +18 -15
- package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js.map +1 -1
- package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js +20 -16
- package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js.map +1 -1
- package/dist/commonjs/components/Participant/FloatingParticipantView/index.js +55 -48
- package/dist/commonjs/components/Participant/FloatingParticipantView/index.js.map +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/ParticipantLabel.js +64 -52
- package/dist/commonjs/components/Participant/ParticipantView/ParticipantLabel.js.map +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/ParticipantNetworkQualityIndicator.js +30 -27
- package/dist/commonjs/components/Participant/ParticipantView/ParticipantNetworkQualityIndicator.js.map +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/ParticipantReaction.js +11 -7
- package/dist/commonjs/components/Participant/ParticipantView/ParticipantReaction.js.map +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/ParticipantVideoFallback.js +17 -14
- package/dist/commonjs/components/Participant/ParticipantView/ParticipantVideoFallback.js.map +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/ParticipantView.js +27 -24
- package/dist/commonjs/components/Participant/ParticipantView/ParticipantView.js.map +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/SpeechIndicator.js +8 -7
- package/dist/commonjs/components/Participant/ParticipantView/SpeechIndicator.js.map +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/index.js +35 -32
- package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/index.js.map +1 -1
- package/dist/commonjs/components/utility/Avatar.js +18 -15
- package/dist/commonjs/components/utility/Avatar.js.map +1 -1
- package/dist/commonjs/components/utility/ScreenShareOverlay.js +35 -29
- package/dist/commonjs/components/utility/ScreenShareOverlay.js.map +1 -1
- package/dist/commonjs/contexts/BackgroundFilters.js +5 -3
- package/dist/commonjs/contexts/BackgroundFilters.js.map +1 -1
- package/dist/commonjs/contexts/ThemeContext.js +5 -3
- package/dist/commonjs/contexts/ThemeContext.js.map +1 -1
- package/dist/commonjs/contexts/internal/ScreenshotIosContext.js +5 -3
- package/dist/commonjs/contexts/internal/ScreenshotIosContext.js.map +1 -1
- package/dist/commonjs/hooks/index.js +11 -0
- package/dist/commonjs/hooks/index.js.map +1 -1
- package/dist/commonjs/hooks/useAutoEnterPiPEffect.js +5 -10
- package/dist/commonjs/hooks/useAutoEnterPiPEffect.js.map +1 -1
- package/dist/commonjs/hooks/useLoopbackRecording.js +263 -0
- package/dist/commonjs/hooks/useLoopbackRecording.js.map +1 -0
- package/dist/commonjs/hooks/useModeration.js +4 -1
- package/dist/commonjs/hooks/useModeration.js.map +1 -1
- package/dist/commonjs/icons/Back.js +8 -6
- package/dist/commonjs/icons/Back.js.map +1 -1
- package/dist/commonjs/icons/BadNetwork.js +11 -9
- package/dist/commonjs/icons/BadNetwork.js.map +1 -1
- package/dist/commonjs/icons/CameraSwitch.js +8 -6
- package/dist/commonjs/icons/CameraSwitch.js.map +1 -1
- package/dist/commonjs/icons/EndStreamIcon.js +8 -6
- package/dist/commonjs/icons/EndStreamIcon.js.map +1 -1
- package/dist/commonjs/icons/Eye.js +8 -6
- package/dist/commonjs/icons/Eye.js.map +1 -1
- package/dist/commonjs/icons/IconWrapper.js +5 -3
- package/dist/commonjs/icons/IconWrapper.js.map +1 -1
- package/dist/commonjs/icons/LivestreamControls.js +44 -39
- package/dist/commonjs/icons/LivestreamControls.js.map +1 -1
- package/dist/commonjs/icons/Lock.js +8 -6
- package/dist/commonjs/icons/Lock.js.map +1 -1
- package/dist/commonjs/icons/Maximize.js +33 -31
- package/dist/commonjs/icons/Maximize.js.map +1 -1
- package/dist/commonjs/icons/Mic.js +8 -6
- package/dist/commonjs/icons/Mic.js.map +1 -1
- package/dist/commonjs/icons/MicOff.js +8 -6
- package/dist/commonjs/icons/MicOff.js.map +1 -1
- package/dist/commonjs/icons/Phone.js +8 -6
- package/dist/commonjs/icons/Phone.js.map +1 -1
- package/dist/commonjs/icons/PhoneDown.js +8 -6
- package/dist/commonjs/icons/PhoneDown.js.map +1 -1
- package/dist/commonjs/icons/PinVertical.js +8 -6
- package/dist/commonjs/icons/PinVertical.js.map +1 -1
- package/dist/commonjs/icons/Reaction.js +8 -6
- package/dist/commonjs/icons/Reaction.js.map +1 -1
- package/dist/commonjs/icons/ScreenShare.js +8 -6
- package/dist/commonjs/icons/ScreenShare.js.map +1 -1
- package/dist/commonjs/icons/ScreenShareIndicator.js +21 -18
- package/dist/commonjs/icons/ScreenShareIndicator.js.map +1 -1
- package/dist/commonjs/icons/StartStreamIcon.js +8 -6
- package/dist/commonjs/icons/StartStreamIcon.js.map +1 -1
- package/dist/commonjs/icons/StopScreenShare.js +11 -9
- package/dist/commonjs/icons/StopScreenShare.js.map +1 -1
- package/dist/commonjs/icons/Video.js +8 -6
- package/dist/commonjs/icons/Video.js.map +1 -1
- package/dist/commonjs/icons/VideoSlash.js +8 -6
- package/dist/commonjs/icons/VideoSlash.js.map +1 -1
- package/dist/commonjs/icons/index.js +0 -66
- package/dist/commonjs/icons/index.js.map +1 -1
- package/dist/commonjs/package.json +1 -0
- package/dist/commonjs/providers/BusyTonePlayer.js +7 -7
- package/dist/commonjs/providers/BusyTonePlayer.js.map +1 -1
- package/dist/commonjs/providers/NoiseCancellation/NoiseCancellationProvider.js +5 -3
- package/dist/commonjs/providers/NoiseCancellation/NoiseCancellationProvider.js.map +1 -1
- package/dist/commonjs/providers/StreamCall/AppStateListener.js +3 -0
- package/dist/commonjs/providers/StreamCall/AppStateListener.js.map +1 -1
- package/dist/commonjs/providers/StreamCall/DeviceStats.js +1 -1
- package/dist/commonjs/providers/StreamCall/DeviceStats.js.map +1 -1
- package/dist/commonjs/providers/StreamCall/index.js +5 -3
- package/dist/commonjs/providers/StreamCall/index.js.map +1 -1
- package/dist/commonjs/providers/StreamVideo.js +10 -5
- package/dist/commonjs/providers/StreamVideo.js.map +1 -1
- package/dist/commonjs/utils/StreamVideoRN/index.js +0 -1
- package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/commonjs/utils/internal/callingx/callingx.js +4 -4
- package/dist/commonjs/utils/internal/callingx/callingx.js.map +1 -1
- package/dist/commonjs/utils/internal/registerSDKGlobals.js +2 -2
- package/dist/commonjs/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/commonjs/utils/push/libs/firebaseMessaging/index.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/module/components/Call/CallContent/CallContent.js +95 -48
- package/dist/module/components/Call/CallContent/CallContent.js.map +1 -1
- package/dist/module/components/Call/CallContent/RTCViewPipIOS.js +24 -20
- package/dist/module/components/Call/CallContent/RTCViewPipIOS.js.map +1 -1
- package/dist/module/components/Call/CallContent/RTCViewPipNative.js +4 -1
- package/dist/module/components/Call/CallContent/RTCViewPipNative.js.map +1 -1
- package/dist/module/components/Call/CallContent/index.js +2 -0
- package/dist/module/components/Call/CallContent/index.js.map +1 -1
- package/dist/module/components/Call/CallControls/AcceptCallButton.js +12 -7
- package/dist/module/components/Call/CallControls/AcceptCallButton.js.map +1 -1
- package/dist/module/components/Call/CallControls/CallControls.js +9 -6
- package/dist/module/components/Call/CallControls/CallControls.js.map +1 -1
- package/dist/module/components/Call/CallControls/CallControlsButton.js +13 -8
- package/dist/module/components/Call/CallControls/CallControlsButton.js.map +1 -1
- package/dist/module/components/Call/CallControls/HangupCallButton.js +12 -7
- package/dist/module/components/Call/CallControls/HangupCallButton.js.map +1 -1
- package/dist/module/components/Call/CallControls/IncomingCallControls.js +13 -10
- package/dist/module/components/Call/CallControls/IncomingCallControls.js.map +1 -1
- package/dist/module/components/Call/CallControls/LobbyControls.js +7 -3
- package/dist/module/components/Call/CallControls/LobbyControls.js.map +1 -1
- package/dist/module/components/Call/CallControls/OutgoingCallControls.js +14 -10
- package/dist/module/components/Call/CallControls/OutgoingCallControls.js.map +1 -1
- package/dist/module/components/Call/CallControls/ReactionsButton.js +24 -16
- package/dist/module/components/Call/CallControls/ReactionsButton.js.map +1 -1
- package/dist/module/components/Call/CallControls/RejectCallButton.js +12 -7
- package/dist/module/components/Call/CallControls/RejectCallButton.js.map +1 -1
- package/dist/module/components/Call/CallControls/ScreenShareToggleButton.js +17 -12
- package/dist/module/components/Call/CallControls/ScreenShareToggleButton.js.map +1 -1
- package/dist/module/components/Call/CallControls/ToggleAudioPreviewButton.js +15 -10
- package/dist/module/components/Call/CallControls/ToggleAudioPreviewButton.js.map +1 -1
- package/dist/module/components/Call/CallControls/ToggleAudioPublishingButton.js +20 -14
- package/dist/module/components/Call/CallControls/ToggleAudioPublishingButton.js.map +1 -1
- package/dist/module/components/Call/CallControls/ToggleCameraFaceButton.js +19 -13
- package/dist/module/components/Call/CallControls/ToggleCameraFaceButton.js.map +1 -1
- package/dist/module/components/Call/CallControls/ToggleVideoPreviewButton.js +15 -10
- package/dist/module/components/Call/CallControls/ToggleVideoPreviewButton.js.map +1 -1
- package/dist/module/components/Call/CallControls/ToggleVideoPublishingButton.js +19 -13
- package/dist/module/components/Call/CallControls/ToggleVideoPublishingButton.js.map +1 -1
- package/dist/module/components/Call/CallControls/index.js +2 -0
- package/dist/module/components/Call/CallControls/index.js.map +1 -1
- package/dist/module/components/Call/CallControls/internal/ReactionsPicker.js +41 -34
- package/dist/module/components/Call/CallControls/internal/ReactionsPicker.js.map +1 -1
- package/dist/module/components/Call/CallLayout/CallParticipantsGrid.js +19 -13
- package/dist/module/components/Call/CallLayout/CallParticipantsGrid.js.map +1 -1
- package/dist/module/components/Call/CallLayout/CallParticipantsSpotlight.js +38 -25
- package/dist/module/components/Call/CallLayout/CallParticipantsSpotlight.js.map +1 -1
- package/dist/module/components/Call/CallLayout/index.js +2 -0
- package/dist/module/components/Call/CallLayout/index.js.map +1 -1
- package/dist/module/components/Call/CallParticipantsList/CallParticipantsList.js +32 -28
- package/dist/module/components/Call/CallParticipantsList/CallParticipantsList.js.map +1 -1
- package/dist/module/components/Call/CallParticipantsList/index.js +2 -0
- package/dist/module/components/Call/CallParticipantsList/index.js.map +1 -1
- package/dist/module/components/Call/Lobby/JoinCallButton.js +12 -8
- package/dist/module/components/Call/Lobby/JoinCallButton.js.map +1 -1
- package/dist/module/components/Call/Lobby/Lobby.js +47 -36
- package/dist/module/components/Call/Lobby/Lobby.js.map +1 -1
- package/dist/module/components/Call/Lobby/LobbyFooter.js +23 -17
- package/dist/module/components/Call/Lobby/LobbyFooter.js.map +1 -1
- package/dist/module/components/Call/Lobby/index.js +2 -0
- package/dist/module/components/Call/Lobby/index.js.map +1 -1
- package/dist/module/components/Call/RingingCallContent/CallLeftIndicator.js +4 -1
- package/dist/module/components/Call/RingingCallContent/CallLeftIndicator.js.map +1 -1
- package/dist/module/components/Call/RingingCallContent/CallPreparingIndicator.js +4 -1
- package/dist/module/components/Call/RingingCallContent/CallPreparingIndicator.js.map +1 -1
- package/dist/module/components/Call/RingingCallContent/IncomingCall.js +34 -23
- package/dist/module/components/Call/RingingCallContent/IncomingCall.js.map +1 -1
- package/dist/module/components/Call/RingingCallContent/OutgoingCall.js +39 -28
- package/dist/module/components/Call/RingingCallContent/OutgoingCall.js.map +1 -1
- package/dist/module/components/Call/RingingCallContent/RingingCallContent.js +15 -12
- package/dist/module/components/Call/RingingCallContent/RingingCallContent.js.map +1 -1
- package/dist/module/components/Call/RingingCallContent/TextBasedIndicator.js +30 -22
- package/dist/module/components/Call/RingingCallContent/TextBasedIndicator.js.map +1 -1
- package/dist/module/components/Call/RingingCallContent/UserInfo.js +27 -22
- package/dist/module/components/Call/RingingCallContent/UserInfo.js.map +1 -1
- package/dist/module/components/Call/RingingCallContent/index.js +2 -0
- package/dist/module/components/Call/RingingCallContent/index.js.map +1 -1
- package/dist/module/components/Call/index.js +2 -0
- package/dist/module/components/Call/index.js.map +1 -1
- package/dist/module/components/Livestream/HostLivestream/HostLivestream.js +40 -35
- package/dist/module/components/Livestream/HostLivestream/HostLivestream.js.map +1 -1
- package/dist/module/components/Livestream/HostLivestream/index.js +2 -0
- package/dist/module/components/Livestream/HostLivestream/index.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamControls/HostLivestreamControls.js +18 -13
- package/dist/module/components/Livestream/LivestreamControls/HostLivestreamControls.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamControls/HostStartStreamButton.js +18 -13
- package/dist/module/components/Livestream/LivestreamControls/HostStartStreamButton.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js +21 -14
- package/dist/module/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamControls/LivestreamMediaControls.js +7 -4
- package/dist/module/components/Livestream/LivestreamControls/LivestreamMediaControls.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamControls/LivestreamScreenShareToggleButton.js +21 -16
- package/dist/module/components/Livestream/LivestreamControls/LivestreamScreenShareToggleButton.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js +21 -14
- package/dist/module/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js +13 -9
- package/dist/module/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamControls/ViewerLivestreamControls.js +80 -58
- package/dist/module/components/Livestream/LivestreamControls/ViewerLivestreamControls.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamControls/index.js +2 -0
- package/dist/module/components/Livestream/LivestreamControls/index.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamLayout/LivestreamLayout.js +14 -46
- package/dist/module/components/Livestream/LivestreamLayout/LivestreamLayout.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamLayout/index.js +2 -0
- package/dist/module/components/Livestream/LivestreamLayout/index.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamPlayer/LivestreamEnded.js +52 -25
- package/dist/module/components/Livestream/LivestreamPlayer/LivestreamEnded.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamPlayer/LivestreamPlayer.js +9 -5
- package/dist/module/components/Livestream/LivestreamPlayer/LivestreamPlayer.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamPlayer/index.js +2 -0
- package/dist/module/components/Livestream/LivestreamPlayer/index.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamTopView/DurationBadge.js +14 -10
- package/dist/module/components/Livestream/LivestreamTopView/DurationBadge.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamTopView/FollowerCount.js +13 -8
- package/dist/module/components/Livestream/LivestreamTopView/FollowerCount.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamTopView/HostLivestreamTopView.js +20 -14
- package/dist/module/components/Livestream/LivestreamTopView/HostLivestreamTopView.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamTopView/LiveIndicator.js +12 -8
- package/dist/module/components/Livestream/LivestreamTopView/LiveIndicator.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.js +20 -14
- package/dist/module/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamTopView/index.js +2 -0
- package/dist/module/components/Livestream/LivestreamTopView/index.js.map +1 -1
- package/dist/module/components/Livestream/ViewerLivestream/ViewerLivestream.js +43 -38
- package/dist/module/components/Livestream/ViewerLivestream/ViewerLivestream.js.map +1 -1
- package/dist/module/components/Livestream/ViewerLivestream/ViewerLobby.js +35 -23
- package/dist/module/components/Livestream/ViewerLivestream/ViewerLobby.js.map +1 -1
- package/dist/module/components/Livestream/ViewerLivestream/index.js +2 -0
- package/dist/module/components/Livestream/ViewerLivestream/index.js.map +1 -1
- package/dist/module/components/Livestream/index.js +2 -0
- package/dist/module/components/Livestream/index.js.map +1 -1
- package/dist/module/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js +20 -15
- package/dist/module/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js.map +1 -1
- package/dist/module/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js +22 -16
- package/dist/module/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js.map +1 -1
- package/dist/module/components/Participant/FloatingParticipantView/FloatingView/common.js +2 -0
- package/dist/module/components/Participant/FloatingParticipantView/FloatingView/common.js.map +1 -1
- package/dist/module/components/Participant/FloatingParticipantView/FloatingView/index.js +2 -0
- package/dist/module/components/Participant/FloatingParticipantView/FloatingView/index.js.map +1 -1
- package/dist/module/components/Participant/FloatingParticipantView/index.js +56 -49
- package/dist/module/components/Participant/FloatingParticipantView/index.js.map +1 -1
- package/dist/module/components/Participant/FloatingParticipantView/useFloatingVideoDimensions.js +2 -0
- package/dist/module/components/Participant/FloatingParticipantView/useFloatingVideoDimensions.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/ParticipantLabel.js +66 -53
- package/dist/module/components/Participant/ParticipantView/ParticipantLabel.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/ParticipantNetworkQualityIndicator.js +32 -28
- package/dist/module/components/Participant/ParticipantView/ParticipantNetworkQualityIndicator.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/ParticipantReaction.js +13 -8
- package/dist/module/components/Participant/ParticipantView/ParticipantReaction.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/ParticipantVideoFallback.js +19 -15
- package/dist/module/components/Participant/ParticipantView/ParticipantVideoFallback.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/ParticipantView.js +29 -24
- package/dist/module/components/Participant/ParticipantView/ParticipantView.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/SpeechIndicator.js +10 -8
- package/dist/module/components/Participant/ParticipantView/SpeechIndicator.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js +2 -0
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/index.js +37 -31
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/index.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/index.js +2 -0
- package/dist/module/components/Participant/ParticipantView/index.js.map +1 -1
- package/dist/module/components/Participant/index.js +2 -0
- package/dist/module/components/Participant/index.js.map +1 -1
- package/dist/module/components/index.js +2 -0
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/utility/Avatar.js +20 -16
- package/dist/module/components/utility/Avatar.js.map +1 -1
- package/dist/module/components/utility/ScreenShareOverlay.js +37 -30
- package/dist/module/components/utility/ScreenShareOverlay.js.map +1 -1
- package/dist/module/components/utility/index.js +2 -0
- package/dist/module/components/utility/index.js.map +1 -1
- package/dist/module/constants/TestIds.js +2 -0
- package/dist/module/constants/TestIds.js.map +1 -1
- package/dist/module/constants/index.js +2 -0
- package/dist/module/constants/index.js.map +1 -1
- package/dist/module/contexts/BackgroundFilters.js +7 -4
- package/dist/module/contexts/BackgroundFilters.js.map +1 -1
- package/dist/module/contexts/ThemeContext.js +7 -4
- package/dist/module/contexts/ThemeContext.js.map +1 -1
- package/dist/module/contexts/index.js +2 -0
- package/dist/module/contexts/index.js.map +1 -1
- package/dist/module/contexts/internal/BackgroundFiltersContext.js +2 -0
- package/dist/module/contexts/internal/BackgroundFiltersContext.js.map +1 -1
- package/dist/module/contexts/internal/ScreenshotIosContext.js +7 -3
- package/dist/module/contexts/internal/ScreenshotIosContext.js.map +1 -1
- package/dist/module/hooks/index.js +3 -0
- package/dist/module/hooks/index.js.map +1 -1
- package/dist/module/hooks/push/index.js +2 -0
- package/dist/module/hooks/push/index.js.map +1 -1
- package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js +2 -0
- package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js.map +1 -1
- package/dist/module/hooks/push/useInitAndroidTokenAndRest.js +2 -0
- package/dist/module/hooks/push/useInitAndroidTokenAndRest.js.map +1 -1
- package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +2 -0
- package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +2 -0
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/module/hooks/useAutoEnterPiPEffect.js +7 -10
- package/dist/module/hooks/useAutoEnterPiPEffect.js.map +1 -1
- package/dist/module/hooks/useIsInPiPMode.js +2 -0
- package/dist/module/hooks/useIsInPiPMode.js.map +1 -1
- package/dist/module/hooks/useIsIosScreenshareBroadcastStarted.js +2 -0
- package/dist/module/hooks/useIsIosScreenshareBroadcastStarted.js.map +1 -1
- package/dist/module/hooks/useLoopbackRecording.js +260 -0
- package/dist/module/hooks/useLoopbackRecording.js.map +1 -0
- package/dist/module/hooks/useModeration.js +6 -1
- package/dist/module/hooks/useModeration.js.map +1 -1
- package/dist/module/hooks/usePaginatedLayoutSortPreset.js +2 -0
- package/dist/module/hooks/usePaginatedLayoutSortPreset.js.map +1 -1
- package/dist/module/hooks/usePermissionNotification.js +2 -0
- package/dist/module/hooks/usePermissionNotification.js.map +1 -1
- package/dist/module/hooks/usePermissionRequest.js +2 -0
- package/dist/module/hooks/usePermissionRequest.js.map +1 -1
- package/dist/module/hooks/useScreenShareAudioMixing.js +2 -0
- package/dist/module/hooks/useScreenShareAudioMixing.js.map +1 -1
- package/dist/module/hooks/useScreenShareButton.js +2 -0
- package/dist/module/hooks/useScreenShareButton.js.map +1 -1
- package/dist/module/hooks/useScreenshot.js +2 -0
- package/dist/module/hooks/useScreenshot.js.map +1 -1
- package/dist/module/hooks/useTrackDimensions.js +2 -0
- package/dist/module/hooks/useTrackDimensions.js.map +1 -1
- package/dist/module/icons/Back.js +10 -6
- package/dist/module/icons/Back.js.map +1 -1
- package/dist/module/icons/BadNetwork.js +13 -9
- package/dist/module/icons/BadNetwork.js.map +1 -1
- package/dist/module/icons/CameraSwitch.js +10 -6
- package/dist/module/icons/CameraSwitch.js.map +1 -1
- package/dist/module/icons/EndStreamIcon.js +10 -6
- package/dist/module/icons/EndStreamIcon.js.map +1 -1
- package/dist/module/icons/Eye.js +10 -6
- package/dist/module/icons/Eye.js.map +1 -1
- package/dist/module/icons/IconWrapper.js +7 -3
- package/dist/module/icons/IconWrapper.js.map +1 -1
- package/dist/module/icons/LivestreamControls.js +46 -39
- package/dist/module/icons/LivestreamControls.js.map +1 -1
- package/dist/module/icons/Lock.js +10 -6
- package/dist/module/icons/Lock.js.map +1 -1
- package/dist/module/icons/Maximize.js +35 -31
- package/dist/module/icons/Maximize.js.map +1 -1
- package/dist/module/icons/Mic.js +10 -6
- package/dist/module/icons/Mic.js.map +1 -1
- package/dist/module/icons/MicOff.js +10 -6
- package/dist/module/icons/MicOff.js.map +1 -1
- package/dist/module/icons/Phone.js +10 -6
- package/dist/module/icons/Phone.js.map +1 -1
- package/dist/module/icons/PhoneDown.js +10 -6
- package/dist/module/icons/PhoneDown.js.map +1 -1
- package/dist/module/icons/PinVertical.js +10 -6
- package/dist/module/icons/PinVertical.js.map +1 -1
- package/dist/module/icons/Reaction.js +10 -6
- package/dist/module/icons/Reaction.js.map +1 -1
- package/dist/module/icons/ScreenShare.js +10 -6
- package/dist/module/icons/ScreenShare.js.map +1 -1
- package/dist/module/icons/ScreenShareIndicator.js +23 -18
- package/dist/module/icons/ScreenShareIndicator.js.map +1 -1
- package/dist/module/icons/StartStreamIcon.js +10 -6
- package/dist/module/icons/StartStreamIcon.js.map +1 -1
- package/dist/module/icons/StopScreenShare.js +13 -9
- package/dist/module/icons/StopScreenShare.js.map +1 -1
- package/dist/module/icons/Video.js +10 -6
- package/dist/module/icons/Video.js.map +1 -1
- package/dist/module/icons/VideoSlash.js +10 -6
- package/dist/module/icons/VideoSlash.js.map +1 -1
- package/dist/module/icons/index.js +2 -6
- package/dist/module/icons/index.js.map +1 -1
- package/dist/module/index.js +2 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/modules/ScreenShareAudioManager.js +2 -0
- package/dist/module/modules/ScreenShareAudioManager.js.map +1 -1
- package/dist/module/modules/call-manager/CallManager.js +2 -0
- package/dist/module/modules/call-manager/CallManager.js.map +1 -1
- package/dist/module/modules/call-manager/PrevLibDetection.js +2 -0
- package/dist/module/modules/call-manager/PrevLibDetection.js.map +1 -1
- package/dist/module/modules/call-manager/index.js +2 -0
- package/dist/module/modules/call-manager/index.js.map +1 -1
- package/dist/module/modules/call-manager/native-module.d.js +2 -0
- package/dist/module/modules/call-manager/native-module.d.js.map +1 -1
- package/dist/module/modules/call-manager/types.js +1 -1
- package/dist/module/providers/BusyTonePlayer.js +9 -7
- package/dist/module/providers/BusyTonePlayer.js.map +1 -1
- package/dist/module/providers/NoiseCancellation/NoiseCancellationProvider.js +7 -4
- package/dist/module/providers/NoiseCancellation/NoiseCancellationProvider.js.map +1 -1
- package/dist/module/providers/NoiseCancellation/index.js +2 -0
- package/dist/module/providers/NoiseCancellation/index.js.map +1 -1
- package/dist/module/providers/NoiseCancellation/lib.js +2 -0
- package/dist/module/providers/NoiseCancellation/lib.js.map +1 -1
- package/dist/module/providers/StreamCall/AppStateListener.js +5 -0
- package/dist/module/providers/StreamCall/AppStateListener.js.map +1 -1
- package/dist/module/providers/StreamCall/AudioInterruptionTracer.js +2 -0
- package/dist/module/providers/StreamCall/AudioInterruptionTracer.js.map +1 -1
- package/dist/module/providers/StreamCall/DeviceStats.js +3 -1
- package/dist/module/providers/StreamCall/DeviceStats.js.map +1 -1
- package/dist/module/providers/StreamCall/index.js +7 -4
- package/dist/module/providers/StreamCall/index.js.map +1 -1
- package/dist/module/providers/StreamVideo.js +12 -5
- package/dist/module/providers/StreamVideo.js.map +1 -1
- package/dist/module/theme/colors.js +2 -0
- package/dist/module/theme/colors.js.map +1 -1
- package/dist/module/theme/constants.js +2 -0
- package/dist/module/theme/constants.js.map +1 -1
- package/dist/module/theme/index.js +2 -0
- package/dist/module/theme/index.js.map +1 -1
- package/dist/module/theme/theme.js +2 -0
- package/dist/module/theme/theme.js.map +1 -1
- package/dist/module/theme/types.js +2 -0
- package/dist/module/translations/index.js +2 -0
- package/dist/module/translations/index.js.map +1 -1
- package/dist/module/utils/StreamVideoRN/index.js +2 -1
- package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/module/utils/StreamVideoRN/types.js +2 -0
- package/dist/module/utils/enterPiPAndroid.js +2 -0
- package/dist/module/utils/enterPiPAndroid.js.map +1 -1
- package/dist/module/utils/getAndroidDefaultRingtoneUrl.js +2 -0
- package/dist/module/utils/getAndroidDefaultRingtoneUrl.js.map +1 -1
- package/dist/module/utils/hooks/index.js +2 -0
- package/dist/module/utils/hooks/index.js.map +1 -1
- package/dist/module/utils/hooks/usePrevious.js +2 -0
- package/dist/module/utils/hooks/usePrevious.js.map +1 -1
- package/dist/module/utils/index.js +2 -0
- package/dist/module/utils/index.js.map +1 -1
- package/dist/module/utils/internal/callingx/audioSessionPromise.js +2 -0
- package/dist/module/utils/internal/callingx/audioSessionPromise.js.map +1 -1
- package/dist/module/utils/internal/callingx/callingx.js +6 -4
- package/dist/module/utils/internal/callingx/callingx.js.map +1 -1
- package/dist/module/utils/internal/optionallibs/gestureHandler.js +2 -0
- package/dist/module/utils/internal/optionallibs/gestureHandler.js.map +1 -1
- package/dist/module/utils/internal/optionallibs/index.js +2 -0
- package/dist/module/utils/internal/optionallibs/index.js.map +1 -1
- package/dist/module/utils/internal/optionallibs/reanimated.js +2 -0
- package/dist/module/utils/internal/optionallibs/reanimated.js.map +1 -1
- package/dist/module/utils/internal/pushLogoutCallback.js +2 -0
- package/dist/module/utils/internal/pushLogoutCallback.js.map +1 -1
- package/dist/module/utils/internal/registerSDKGlobals.js +4 -2
- package/dist/module/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/module/utils/internal/rxSubjects.js +2 -0
- package/dist/module/utils/internal/rxSubjects.js.map +1 -1
- package/dist/module/utils/internal/shouldDisableIOSLocalVideoOnBackground.js +2 -0
- package/dist/module/utils/internal/shouldDisableIOSLocalVideoOnBackground.js.map +1 -1
- package/dist/module/utils/keepCallAliveHeadlessTask.js +2 -0
- package/dist/module/utils/keepCallAliveHeadlessTask.js.map +1 -1
- package/dist/module/utils/push/android.js +2 -0
- package/dist/module/utils/push/android.js.map +1 -1
- package/dist/module/utils/push/index.js +2 -0
- package/dist/module/utils/push/index.js.map +1 -1
- package/dist/module/utils/push/internal/constants.js +2 -0
- package/dist/module/utils/push/internal/constants.js.map +1 -1
- package/dist/module/utils/push/internal/ios.js +2 -0
- package/dist/module/utils/push/internal/ios.js.map +1 -1
- package/dist/module/utils/push/internal/utils.js +2 -0
- package/dist/module/utils/push/internal/utils.js.map +1 -1
- package/dist/module/utils/push/libs/callingx.js +2 -0
- package/dist/module/utils/push/libs/callingx.js.map +1 -1
- package/dist/module/utils/push/libs/firebaseMessaging/index.js +2 -0
- package/dist/module/utils/push/libs/firebaseMessaging/index.js.map +1 -1
- package/dist/module/utils/push/libs/firebaseMessaging/lib.js +2 -0
- package/dist/module/utils/push/libs/firebaseMessaging/lib.js.map +1 -1
- package/dist/module/utils/push/libs/index.js +2 -0
- package/dist/module/utils/push/libs/index.js.map +1 -1
- package/dist/module/utils/push/setupCallingExpEvents.js +2 -0
- package/dist/module/utils/push/setupCallingExpEvents.js.map +1 -1
- package/dist/module/utils/push/setupIosVoipPushEvents.js +2 -0
- package/dist/module/utils/push/setupIosVoipPushEvents.js.map +1 -1
- package/dist/module/utils/push/utils.js +2 -0
- package/dist/module/utils/push/utils.js.map +1 -1
- package/dist/module/utils/setClientDetails.js +2 -0
- package/dist/module/utils/setClientDetails.js.map +1 -1
- package/dist/module/version.js +3 -1
- package/dist/module/version.js.map +1 -1
- package/dist/typescript/components/Call/CallContent/CallContent.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/Lobby.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/HostLivestream/HostLivestream.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/LivestreamLayout/LivestreamLayout.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/LivestreamPlayer/LivestreamEnded.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/ViewerLivestream/ViewerLivestream.d.ts.map +1 -1
- package/dist/typescript/components/Participant/FloatingParticipantView/index.d.ts.map +1 -1
- package/dist/typescript/components/Participant/ParticipantView/ParticipantView.d.ts +1 -1
- package/dist/typescript/components/Participant/ParticipantView/ParticipantView.d.ts.map +1 -1
- package/dist/typescript/components/Participant/ParticipantView/VideoRenderer/index.d.ts +1 -1
- package/dist/typescript/components/Participant/ParticipantView/VideoRenderer/index.d.ts.map +1 -1
- package/dist/typescript/contexts/BackgroundFilters.d.ts +1 -1
- package/dist/typescript/contexts/BackgroundFilters.d.ts.map +1 -1
- package/dist/typescript/hooks/index.d.ts +1 -0
- package/dist/typescript/hooks/index.d.ts.map +1 -1
- package/dist/typescript/hooks/useAutoEnterPiPEffect.d.ts.map +1 -1
- package/dist/typescript/hooks/useLoopbackRecording.d.ts +85 -0
- package/dist/typescript/hooks/useLoopbackRecording.d.ts.map +1 -0
- package/dist/typescript/hooks/useModeration.d.ts.map +1 -1
- package/dist/typescript/icons/index.d.ts +0 -6
- package/dist/typescript/icons/index.d.ts.map +1 -1
- package/dist/typescript/providers/StreamCall/AppStateListener.d.ts.map +1 -1
- package/dist/typescript/providers/StreamCall/DeviceStats.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/index.d.ts +0 -1
- package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
- package/dist/typescript/utils/internal/callingx/callingx.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts +2 -16
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
- package/dist/typescript/version.d.ts +1 -1
- package/ios/StreamVideoReactNative-Bridging-Header.h +2 -0
- package/ios/StreamVideoReactNative.m +81 -0
- package/ios/TracksRecorder/AudioPipeline.swift +270 -0
- package/ios/TracksRecorder/PipelineHost.swift +56 -0
- package/ios/TracksRecorder/RecorderAudioRenderTap.swift +144 -0
- package/ios/TracksRecorder/RecorderVideoSink.swift +137 -0
- package/ios/TracksRecorder/TracksRecorderManager.swift +333 -0
- package/ios/TracksRecorder/VideoPipeline.swift +297 -0
- package/package.json +10 -8
- package/src/components/Call/CallContent/CallContent.tsx +69 -39
- package/src/components/Call/CallLayout/CallParticipantsGrid.tsx +4 -6
- package/src/components/Call/CallLayout/CallParticipantsSpotlight.tsx +30 -21
- package/src/components/Call/CallParticipantsList/CallParticipantsList.tsx +23 -9
- package/src/components/Call/Lobby/Lobby.tsx +9 -5
- package/src/components/Livestream/HostLivestream/HostLivestream.tsx +5 -6
- package/src/components/Livestream/LivestreamControls/ViewerLivestreamControls.tsx +1 -1
- package/src/components/Livestream/LivestreamLayout/LivestreamLayout.tsx +4 -64
- package/src/components/Livestream/LivestreamPlayer/LivestreamEnded.tsx +54 -18
- package/src/components/Livestream/LivestreamTopView/DurationBadge.tsx +2 -2
- package/src/components/Livestream/ViewerLivestream/ViewerLivestream.tsx +10 -12
- package/src/components/Participant/FloatingParticipantView/index.tsx +26 -18
- package/src/components/Participant/ParticipantView/ParticipantReaction.tsx +1 -1
- package/src/components/Participant/ParticipantView/ParticipantView.tsx +68 -64
- package/src/components/Participant/ParticipantView/VideoRenderer/index.tsx +192 -179
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useAutoEnterPiPEffect.tsx +5 -11
- package/src/hooks/useLoopbackRecording.ts +448 -0
- package/src/hooks/useModeration.ts +4 -1
- package/src/icons/index.tsx +0 -6
- package/src/providers/BusyTonePlayer.tsx +11 -11
- package/src/providers/StreamCall/AppStateListener.tsx +3 -0
- package/src/providers/StreamCall/DeviceStats.tsx +2 -1
- package/src/utils/StreamVideoRN/index.ts +0 -1
- package/src/utils/internal/callingx/callingx.ts +20 -10
- package/src/utils/internal/registerSDKGlobals.ts +2 -2
- package/src/utils/push/libs/firebaseMessaging/index.ts +4 -2
- package/src/version.ts +1 -1
- package/dist/commonjs/icons/LeaveStreamIcon.js +0 -20
- package/dist/commonjs/icons/LeaveStreamIcon.js.map +0 -1
- package/dist/commonjs/icons/Settings.js +0 -22
- package/dist/commonjs/icons/Settings.js.map +0 -1
- package/dist/commonjs/icons/ShieldBadge.js +0 -20
- package/dist/commonjs/icons/ShieldBadge.js.map +0 -1
- package/dist/commonjs/icons/Spotlight.js +0 -21
- package/dist/commonjs/icons/Spotlight.js.map +0 -1
- package/dist/commonjs/icons/ThreeDots.js +0 -31
- package/dist/commonjs/icons/ThreeDots.js.map +0 -1
- package/dist/commonjs/icons/TopViewBackground.js +0 -35
- package/dist/commonjs/icons/TopViewBackground.js.map +0 -1
- package/dist/module/icons/LeaveStreamIcon.js +0 -12
- package/dist/module/icons/LeaveStreamIcon.js.map +0 -1
- package/dist/module/icons/Settings.js +0 -13
- package/dist/module/icons/Settings.js.map +0 -1
- package/dist/module/icons/ShieldBadge.js +0 -12
- package/dist/module/icons/ShieldBadge.js.map +0 -1
- package/dist/module/icons/Spotlight.js +0 -13
- package/dist/module/icons/Spotlight.js.map +0 -1
- package/dist/module/icons/ThreeDots.js +0 -23
- package/dist/module/icons/ThreeDots.js.map +0 -1
- package/dist/module/icons/TopViewBackground.js +0 -27
- package/dist/module/icons/TopViewBackground.js.map +0 -1
- package/dist/typescript/icons/LeaveStreamIcon.d.ts +0 -3
- package/dist/typescript/icons/LeaveStreamIcon.d.ts.map +0 -1
- package/dist/typescript/icons/Settings.d.ts +0 -7
- package/dist/typescript/icons/Settings.d.ts.map +0 -1
- package/dist/typescript/icons/ShieldBadge.d.ts +0 -3
- package/dist/typescript/icons/ShieldBadge.d.ts.map +0 -1
- package/dist/typescript/icons/Spotlight.d.ts +0 -8
- package/dist/typescript/icons/Spotlight.d.ts.map +0 -1
- package/dist/typescript/icons/ThreeDots.d.ts +0 -7
- package/dist/typescript/icons/ThreeDots.d.ts.map +0 -1
- package/dist/typescript/icons/TopViewBackground.d.ts +0 -15
- package/dist/typescript/icons/TopViewBackground.d.ts.map +0 -1
- package/src/icons/LeaveStreamIcon.tsx +0 -13
- package/src/icons/Settings.tsx +0 -14
- package/src/icons/ShieldBadge.tsx +0 -13
- package/src/icons/Spotlight.tsx +0 -18
- package/src/icons/ThreeDots.tsx +0 -14
- package/src/icons/TopViewBackground.tsx +0 -43
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright © 2026 Stream.io Inc. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import AVFoundation
|
|
6
|
+
import CoreMedia
|
|
7
|
+
import Foundation
|
|
8
|
+
import WebRTC
|
|
9
|
+
|
|
10
|
+
/// Render-side audio tap used by `TracksRecorderManager`. Implements
|
|
11
|
+
/// `RTCAudioCustomProcessingDelegate` and is installed on
|
|
12
|
+
/// `RTCDefaultAudioProcessingModule.renderPreProcessingDelegate` for the
|
|
13
|
+
/// duration of a recording.
|
|
14
|
+
///
|
|
15
|
+
/// The render path WebRTC is using:
|
|
16
|
+
/// ```
|
|
17
|
+
/// SFU → decoder → audio mixer → renderPreProcessingDelegate →
|
|
18
|
+
/// render-side processing → speaker
|
|
19
|
+
/// ```
|
|
20
|
+
///
|
|
21
|
+
/// What the delegate sees per call: an `RTCAudioBuffer` that holds the
|
|
22
|
+
/// **post-mix** decoded audio about to be played to the speaker. In a
|
|
23
|
+
/// self-sub-only call, that's exactly the SFU echo of the local mic. In a
|
|
24
|
+
/// call with multiple remote participants the buffer contains the
|
|
25
|
+
/// post-mix output (everyone blended together).
|
|
26
|
+
///
|
|
27
|
+
/// **Important:** `RTCAudioBuffer` exposes `rawBuffer(forChannel:)` as
|
|
28
|
+
/// `UnsafeMutablePointer<Float>` in **FloatS16** format — i.e. Float32 values
|
|
29
|
+
/// in the Int16 range -32768…32767. Cast/clamp to `Int16` for the PCM
|
|
30
|
+
/// destination buffer (no normalisation needed).
|
|
31
|
+
///
|
|
32
|
+
/// **Threading:** all three protocol methods run on a WebRTC audio
|
|
33
|
+
/// processing thread. The buffer handler closure is invoked from there; the
|
|
34
|
+
/// caller is responsible for hopping queues if needed.
|
|
35
|
+
///
|
|
36
|
+
/// **Lifetime:** `RTCDefaultAudioProcessingModule.renderPreProcessingDelegate`
|
|
37
|
+
/// is `weak`, so the manager must keep this instance alive for the duration
|
|
38
|
+
/// of recording.
|
|
39
|
+
@objc public final class RecorderAudioRenderTap: NSObject, RTCAudioCustomProcessingDelegate {
|
|
40
|
+
|
|
41
|
+
typealias BufferHandler = (AVAudioPCMBuffer) -> Void
|
|
42
|
+
|
|
43
|
+
private let bufferHandler: BufferHandler
|
|
44
|
+
|
|
45
|
+
/// When `true`, the WebRTC `RTCAudioBuffer` is zero-filled in place
|
|
46
|
+
/// *after* the samples have been copied into the recording PCM buffer.
|
|
47
|
+
/// The recording keeps the original audio; everything downstream of
|
|
48
|
+
/// this delegate (render-side APM → audio device module → speaker)
|
|
49
|
+
/// sees silence. This yields "audio in the file, silence at the
|
|
50
|
+
/// speaker" without disrupting the recording — `track.setVolume(0)`
|
|
51
|
+
/// / `track.isEnabled = false` mutes apply *before* this tap and
|
|
52
|
+
/// would silence the recording too.
|
|
53
|
+
///
|
|
54
|
+
/// Side effect to be aware of: this mutes the entire post-mix
|
|
55
|
+
/// playback, not just one track. In a self-sub-only call post-mix ==
|
|
56
|
+
/// loopback, so it's effectively a per-track mute. With other remote
|
|
57
|
+
/// participants in the call they would be muted at the speaker too
|
|
58
|
+
/// while recording is active.
|
|
59
|
+
private let muteOriginal: Bool
|
|
60
|
+
|
|
61
|
+
private var processingSampleRate: Double = 0
|
|
62
|
+
private var processingChannels: Int = 0
|
|
63
|
+
private var avFormat: AVAudioFormat?
|
|
64
|
+
|
|
65
|
+
/// Atomic-style call counter — exposes whether the APM is invoking
|
|
66
|
+
/// `audioProcessingProcess(audioBuffer:)` at all.
|
|
67
|
+
private let counterLock = NSLock()
|
|
68
|
+
private var _callCount: Int = 0
|
|
69
|
+
@objc public var callCount: Int {
|
|
70
|
+
counterLock.lock()
|
|
71
|
+
defer { counterLock.unlock() }
|
|
72
|
+
return _callCount
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
init(muteOriginal: Bool, bufferHandler: @escaping BufferHandler) {
|
|
76
|
+
self.muteOriginal = muteOriginal
|
|
77
|
+
self.bufferHandler = bufferHandler
|
|
78
|
+
super.init()
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// MARK: - RTCAudioCustomProcessingDelegate
|
|
82
|
+
|
|
83
|
+
public func audioProcessingInitialize(sampleRate: Int, channels: Int) {
|
|
84
|
+
processingSampleRate = Double(sampleRate)
|
|
85
|
+
processingChannels = channels
|
|
86
|
+
avFormat = AVAudioFormat(
|
|
87
|
+
commonFormat: .pcmFormatInt16,
|
|
88
|
+
sampleRate: processingSampleRate,
|
|
89
|
+
channels: AVAudioChannelCount(channels),
|
|
90
|
+
interleaved: false
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
public func audioProcessingProcess(audioBuffer: RTCAudioBuffer) {
|
|
95
|
+
counterLock.lock()
|
|
96
|
+
_callCount += 1
|
|
97
|
+
counterLock.unlock()
|
|
98
|
+
|
|
99
|
+
guard let format = avFormat else { return }
|
|
100
|
+
let frames = Int(audioBuffer.frames)
|
|
101
|
+
let channels = Int(audioBuffer.channels)
|
|
102
|
+
guard frames > 0, channels > 0 else { return }
|
|
103
|
+
|
|
104
|
+
guard let pcm = AVAudioPCMBuffer(
|
|
105
|
+
pcmFormat: format,
|
|
106
|
+
frameCapacity: AVAudioFrameCount(frames)
|
|
107
|
+
) else {
|
|
108
|
+
return
|
|
109
|
+
}
|
|
110
|
+
pcm.frameLength = AVAudioFrameCount(frames)
|
|
111
|
+
guard let dst = pcm.int16ChannelData else { return }
|
|
112
|
+
|
|
113
|
+
// Copy each channel: FloatS16 (Float32 in Int16 range) → Int16.
|
|
114
|
+
// No normalisation needed — values already span the Int16 range.
|
|
115
|
+
for ch in 0..<channels {
|
|
116
|
+
let src = audioBuffer.rawBuffer(forChannel: ch)
|
|
117
|
+
let dstChannel = dst[ch]
|
|
118
|
+
for i in 0..<frames {
|
|
119
|
+
let v = src[i]
|
|
120
|
+
if v >= 32767 {
|
|
121
|
+
dstChannel[i] = Int16.max
|
|
122
|
+
} else if v <= -32768 {
|
|
123
|
+
dstChannel[i] = Int16.min
|
|
124
|
+
} else {
|
|
125
|
+
dstChannel[i] = Int16(v)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// If `muteOriginal` is on, zero the source buffer in the same pass
|
|
129
|
+
// so the data continuing downstream to the speaker is silence.
|
|
130
|
+
if muteOriginal {
|
|
131
|
+
src[i] = 0
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
bufferHandler(pcm)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
public func audioProcessingRelease() {
|
|
140
|
+
avFormat = nil
|
|
141
|
+
// Deliberately preserve `_callCount` — useful in end-of-recording
|
|
142
|
+
// diagnostics even after release.
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright © 2026 Stream.io Inc. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import CoreMedia
|
|
6
|
+
import CoreVideo
|
|
7
|
+
import Foundation
|
|
8
|
+
import WebRTC
|
|
9
|
+
|
|
10
|
+
/// Per-track video sink used by `TracksRecorderManager`. Implements
|
|
11
|
+
/// `RTCVideoRenderer` so it can be attached directly to an `RTCVideoTrack`.
|
|
12
|
+
///
|
|
13
|
+
/// Each delivered `RTCVideoFrame` is normalised to a CVPixelBuffer in the
|
|
14
|
+
/// hardware H.264 encoder's native format — **NV12**
|
|
15
|
+
/// (`kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange`).
|
|
16
|
+
/// `RTCCVPixelBuffer` sources (camera passthrough) are forwarded with
|
|
17
|
+
/// the underlying pixel buffer unchanged. `RTCI420Buffer` and other YUV
|
|
18
|
+
/// sources are converted into a fresh IOSurface-backed NV12 buffer via
|
|
19
|
+
/// a plane reorder (no color-space conversion required).
|
|
20
|
+
///
|
|
21
|
+
/// **Why NV12 and not BGRA?** AVAssetWriter's hardware encoder accepts
|
|
22
|
+
/// both, but BGRA requires an internal colour-space conversion that
|
|
23
|
+
/// fails with VideoToolbox `-16364` on certain stride/alignment
|
|
24
|
+
/// combinations a few frames in. NV12 is the encoder's native input;
|
|
25
|
+
/// passing it directly bypasses the failure entirely.
|
|
26
|
+
///
|
|
27
|
+
/// Threading: `renderFrame` runs on a WebRTC frame-delivery thread; the
|
|
28
|
+
/// callback must be safe to invoke from there. The manager serialises
|
|
29
|
+
/// further access on its own queue.
|
|
30
|
+
@objc final class RecorderVideoSink: NSObject, RTCVideoRenderer {
|
|
31
|
+
|
|
32
|
+
typealias FrameHandler = (_ pixelBuffer: CVPixelBuffer, _ width: Int32, _ height: Int32, _ timestampNs: Int64) -> Void
|
|
33
|
+
|
|
34
|
+
private let frameHandler: FrameHandler
|
|
35
|
+
|
|
36
|
+
init(frameHandler: @escaping FrameHandler) {
|
|
37
|
+
self.frameHandler = frameHandler
|
|
38
|
+
super.init()
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// MARK: - RTCVideoRenderer
|
|
42
|
+
|
|
43
|
+
func setSize(_ size: CGSize) {
|
|
44
|
+
// No-op: pixel buffer dimensions are derived from each incoming frame.
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
func renderFrame(_ frame: RTCVideoFrame?) {
|
|
48
|
+
guard let frame = frame, frame.width > 0, frame.height > 0 else { return }
|
|
49
|
+
|
|
50
|
+
let pixelBuffer: CVPixelBuffer?
|
|
51
|
+
if let cvBuffer = frame.buffer as? RTCCVPixelBuffer {
|
|
52
|
+
// Camera passthrough — already a CVPixelBuffer (typically NV12 on iOS).
|
|
53
|
+
pixelBuffer = cvBuffer.pixelBuffer
|
|
54
|
+
} else if let i420 = frame.buffer as? RTCI420Buffer {
|
|
55
|
+
pixelBuffer = Self.makeNV12PixelBuffer(fromI420: i420)
|
|
56
|
+
} else {
|
|
57
|
+
// Other YUV variants — normalise via toI420() first.
|
|
58
|
+
let i420 = frame.buffer.toI420()
|
|
59
|
+
if let concrete = i420 as? RTCI420Buffer {
|
|
60
|
+
pixelBuffer = Self.makeNV12PixelBuffer(fromI420: concrete)
|
|
61
|
+
} else {
|
|
62
|
+
pixelBuffer = nil
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
guard let outputBuffer = pixelBuffer else { return }
|
|
67
|
+
frameHandler(outputBuffer, frame.width, frame.height, frame.timeStampNs)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// MARK: - I420 → NV12
|
|
71
|
+
|
|
72
|
+
/// Allocates a fresh IOSurface-backed NV12 `CVPixelBuffer` and copies
|
|
73
|
+
/// the I420 source's planes into it (Y as-is, U+V interleaved into the
|
|
74
|
+
/// UV plane). No colour-space conversion — this is purely a plane
|
|
75
|
+
/// reorder, so the operation is both fast and bit-exact.
|
|
76
|
+
private static func makeNV12PixelBuffer(fromI420 i420: RTCI420Buffer) -> CVPixelBuffer? {
|
|
77
|
+
let width = Int(i420.width)
|
|
78
|
+
let height = Int(i420.height)
|
|
79
|
+
let chromaWidth = Int(i420.chromaWidth)
|
|
80
|
+
let chromaHeight = Int(i420.chromaHeight)
|
|
81
|
+
|
|
82
|
+
var pixelBuffer: CVPixelBuffer?
|
|
83
|
+
let attrs: [String: Any] = [
|
|
84
|
+
kCVPixelBufferIOSurfacePropertiesKey as String: [:] as [String: Any],
|
|
85
|
+
]
|
|
86
|
+
let status = CVPixelBufferCreate(
|
|
87
|
+
kCFAllocatorDefault,
|
|
88
|
+
width,
|
|
89
|
+
height,
|
|
90
|
+
kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange,
|
|
91
|
+
attrs as CFDictionary,
|
|
92
|
+
&pixelBuffer
|
|
93
|
+
)
|
|
94
|
+
guard status == kCVReturnSuccess, let buffer = pixelBuffer else { return nil }
|
|
95
|
+
|
|
96
|
+
CVPixelBufferLockBaseAddress(buffer, [])
|
|
97
|
+
defer { CVPixelBufferUnlockBaseAddress(buffer, []) }
|
|
98
|
+
|
|
99
|
+
// Plane 0: Y — direct copy.
|
|
100
|
+
guard let yDest = CVPixelBufferGetBaseAddressOfPlane(buffer, 0) else { return nil }
|
|
101
|
+
let yDestStride = CVPixelBufferGetBytesPerRowOfPlane(buffer, 0)
|
|
102
|
+
let ySrcStride = Int(i420.strideY)
|
|
103
|
+
let ySrc = UnsafeRawPointer(i420.dataY)
|
|
104
|
+
if ySrcStride == yDestStride {
|
|
105
|
+
memcpy(yDest, ySrc, ySrcStride * height)
|
|
106
|
+
} else {
|
|
107
|
+
let copyBytes = min(ySrcStride, yDestStride)
|
|
108
|
+
for row in 0..<height {
|
|
109
|
+
memcpy(
|
|
110
|
+
yDest.advanced(by: row * yDestStride),
|
|
111
|
+
ySrc.advanced(by: row * ySrcStride),
|
|
112
|
+
copyBytes
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Plane 1: UV — interleave I420's U and V planes.
|
|
118
|
+
guard let uvDestRaw = CVPixelBufferGetBaseAddressOfPlane(buffer, 1) else { return nil }
|
|
119
|
+
let uvDestStride = CVPixelBufferGetBytesPerRowOfPlane(buffer, 1)
|
|
120
|
+
let uvDest = uvDestRaw.assumingMemoryBound(to: UInt8.self)
|
|
121
|
+
let uSrcStride = Int(i420.strideU)
|
|
122
|
+
let vSrcStride = Int(i420.strideV)
|
|
123
|
+
let uSrc = i420.dataU
|
|
124
|
+
let vSrc = i420.dataV
|
|
125
|
+
for row in 0..<chromaHeight {
|
|
126
|
+
let uRow = uSrc.advanced(by: row * uSrcStride)
|
|
127
|
+
let vRow = vSrc.advanced(by: row * vSrcStride)
|
|
128
|
+
let uvRow = uvDest.advanced(by: row * uvDestStride)
|
|
129
|
+
for col in 0..<chromaWidth {
|
|
130
|
+
uvRow[col * 2] = uRow[col]
|
|
131
|
+
uvRow[col * 2 + 1] = vRow[col]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return buffer
|
|
136
|
+
}
|
|
137
|
+
}
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright © 2026 Stream.io Inc. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import AVFoundation
|
|
6
|
+
import CoreMedia
|
|
7
|
+
import Foundation
|
|
8
|
+
import WebRTC
|
|
9
|
+
|
|
10
|
+
/// Orchestrator for the React Native track recorder. Owns the
|
|
11
|
+
/// `AVAssetWriter`, the recording lifecycle, the writer-start gate, and
|
|
12
|
+
/// the terminal-completion barrier. Delegates the encoder + sink + drain
|
|
13
|
+
/// work to `VideoPipeline` and `AudioPipeline` respectively (composed via
|
|
14
|
+
/// `PipelineHost`).
|
|
15
|
+
///
|
|
16
|
+
/// The `startRecording` completion is the *lifecycle* signal — it fires once at the terminal moment of the
|
|
17
|
+
/// recording (auto-stop timer expired, manual stop, or fatal error),
|
|
18
|
+
/// carrying the resulting file URL or an error. The `stopRecording`
|
|
19
|
+
/// completion is just a synchronization point — `void` — so callers can
|
|
20
|
+
/// `await stopTrackRecording(); await getStreamRecordings()` without
|
|
21
|
+
/// racing the disk flush.
|
|
22
|
+
@objc public final class TracksRecorderManager: NSObject, PipelineHost {
|
|
23
|
+
|
|
24
|
+
@objc public static let shared = TracksRecorderManager()
|
|
25
|
+
|
|
26
|
+
// MARK: - Configuration
|
|
27
|
+
|
|
28
|
+
@objc public var recordingsDirectory: URL {
|
|
29
|
+
let tmp = NSTemporaryDirectory()
|
|
30
|
+
let url = URL(fileURLWithPath: tmp).appendingPathComponent("StreamRecordings", isDirectory: true)
|
|
31
|
+
try? FileManager.default.createDirectory(
|
|
32
|
+
at: url,
|
|
33
|
+
withIntermediateDirectories: true,
|
|
34
|
+
attributes: nil
|
|
35
|
+
)
|
|
36
|
+
return url
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// MARK: - PipelineHost
|
|
40
|
+
|
|
41
|
+
let queue = DispatchQueue(label: "io.stream.video.tracks-recorder")
|
|
42
|
+
|
|
43
|
+
private(set) var assetWriter: AVAssetWriter?
|
|
44
|
+
private(set) var isRecording = false
|
|
45
|
+
|
|
46
|
+
// MARK: - State
|
|
47
|
+
|
|
48
|
+
private var videoPipeline: VideoPipeline?
|
|
49
|
+
private var audioPipeline: AudioPipeline?
|
|
50
|
+
|
|
51
|
+
private var outputURL: URL?
|
|
52
|
+
private var recordingCompletion: ((URL?, NSError?) -> Void)?
|
|
53
|
+
private var isCompleted = false
|
|
54
|
+
|
|
55
|
+
private var pendingPipelines = 0
|
|
56
|
+
private var recordingStartHostTimeNs: UInt64?
|
|
57
|
+
private var autoStopTimer: DispatchSourceTimer?
|
|
58
|
+
|
|
59
|
+
// MARK: - Public API
|
|
60
|
+
|
|
61
|
+
@objc public func startRecording(
|
|
62
|
+
videoTrackId: String?,
|
|
63
|
+
maxDurationMs: Int,
|
|
64
|
+
targetWidth: Int,
|
|
65
|
+
targetHeight: Int,
|
|
66
|
+
webRTCModule: WebRTCModule,
|
|
67
|
+
completion: @escaping (URL?, NSError?) -> Void
|
|
68
|
+
) {
|
|
69
|
+
queue.async { [weak self] in
|
|
70
|
+
guard let self = self else { return }
|
|
71
|
+
|
|
72
|
+
if self.isRecording {
|
|
73
|
+
completion(nil, makeRecorderError("recording_in_progress", code: 1))
|
|
74
|
+
return
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
let videoTrack = videoTrackId
|
|
78
|
+
.flatMap { webRTCModule.track(forId: $0) } as? RTCVideoTrack
|
|
79
|
+
|
|
80
|
+
// Resolve the APM for the render-side audio tap before opening
|
|
81
|
+
// any files — so a missing/incompatible APM fails fast. Audio
|
|
82
|
+
// is captured through the APM render-pre delegate (post-mix
|
|
83
|
+
// decoded audio); no per-track lookup is needed.
|
|
84
|
+
let apmId = WebRTCModuleOptions.sharedInstance().audioProcessingModule
|
|
85
|
+
guard let apm = apmId as? RTCDefaultAudioProcessingModule else {
|
|
86
|
+
completion(nil, makeRecorderError("audio_processing_module_unavailable", code: 5))
|
|
87
|
+
return
|
|
88
|
+
}
|
|
89
|
+
if apm.renderPreProcessingDelegate != nil {
|
|
90
|
+
completion(nil, makeRecorderError("recording_blocked_by_audio_render_tap", code: 6))
|
|
91
|
+
return
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
let dir = self.recordingsDirectory
|
|
95
|
+
let timestamp = Int(Date().timeIntervalSince1970 * 1000)
|
|
96
|
+
let outputURL = dir.appendingPathComponent("recording_\(timestamp).mp4")
|
|
97
|
+
|
|
98
|
+
let writer: AVAssetWriter
|
|
99
|
+
do {
|
|
100
|
+
writer = try AVAssetWriter(url: outputURL, fileType: .mp4)
|
|
101
|
+
} catch {
|
|
102
|
+
completion(nil, error as NSError)
|
|
103
|
+
return
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
self.assetWriter = writer
|
|
107
|
+
self.outputURL = outputURL
|
|
108
|
+
self.recordingCompletion = completion
|
|
109
|
+
self.isCompleted = false
|
|
110
|
+
self.recordingStartHostTimeNs = nil
|
|
111
|
+
self.pendingPipelines = 0
|
|
112
|
+
self.isRecording = true
|
|
113
|
+
|
|
114
|
+
if let videoTrack = videoTrack {
|
|
115
|
+
let pipeline = VideoPipeline(
|
|
116
|
+
host: self,
|
|
117
|
+
videoTrack: videoTrack,
|
|
118
|
+
targetWidth: Int32(targetWidth),
|
|
119
|
+
targetHeight: Int32(targetHeight)
|
|
120
|
+
)
|
|
121
|
+
self.videoPipeline = pipeline
|
|
122
|
+
self.pendingPipelines += 1
|
|
123
|
+
pipeline.start()
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
let audio = AudioPipeline(host: self, apm: apm)
|
|
127
|
+
self.audioPipeline = audio
|
|
128
|
+
self.pendingPipelines += 1
|
|
129
|
+
audio.start()
|
|
130
|
+
|
|
131
|
+
if maxDurationMs > 0 {
|
|
132
|
+
let timer = DispatchSource.makeTimerSource(queue: self.queue)
|
|
133
|
+
timer.schedule(deadline: .now() + .milliseconds(maxDurationMs))
|
|
134
|
+
timer.setEventHandler { [weak self] in
|
|
135
|
+
self?.stopRecording { }
|
|
136
|
+
}
|
|
137
|
+
timer.resume()
|
|
138
|
+
self.autoStopTimer = timer
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
NSLog("[TracksRecorder] recording started video=%@ audio=YES → %@",
|
|
142
|
+
videoTrack != nil ? "YES" : "NO",
|
|
143
|
+
outputURL.absoluteString)
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@objc public func stopRecording(completion: @escaping () -> Void) {
|
|
148
|
+
queue.async { [weak self] in
|
|
149
|
+
guard let self = self else {
|
|
150
|
+
DispatchQueue.main.async { completion() }
|
|
151
|
+
return
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if !self.isRecording {
|
|
155
|
+
DispatchQueue.main.async { completion() }
|
|
156
|
+
return
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
self.autoStopTimer?.cancel()
|
|
160
|
+
self.autoStopTimer = nil
|
|
161
|
+
|
|
162
|
+
// Detach sinks/taps so no more frames arrive on the recorder path.
|
|
163
|
+
self.videoPipeline?.detachSink()
|
|
164
|
+
self.audioPipeline?.detachSink()
|
|
165
|
+
|
|
166
|
+
let video = self.videoPipeline
|
|
167
|
+
let audio = self.audioPipeline
|
|
168
|
+
let writer = self.assetWriter
|
|
169
|
+
let outputURL = self.outputURL
|
|
170
|
+
|
|
171
|
+
self.isRecording = false
|
|
172
|
+
|
|
173
|
+
// If the writer never started (no encoded sample ever made it
|
|
174
|
+
// out), there's nothing to finalise.
|
|
175
|
+
guard let assetWriter = writer, assetWriter.status == .writing else {
|
|
176
|
+
NSLog("[TracksRecorder] stopRecording: writer not in .writing (status=%ld) — no file produced",
|
|
177
|
+
Int(writer?.status.rawValue ?? -1))
|
|
178
|
+
video?.logSummary()
|
|
179
|
+
audio?.logSummary()
|
|
180
|
+
self.fireTerminalCompletion(url: nil, error: writer?.error as NSError?)
|
|
181
|
+
self.cleanupAfterStop()
|
|
182
|
+
DispatchQueue.main.async { completion() }
|
|
183
|
+
return
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
video?.markInputAsFinished()
|
|
187
|
+
audio?.markInputAsFinished()
|
|
188
|
+
|
|
189
|
+
assetWriter.finishWriting { [weak self] in
|
|
190
|
+
guard let self = self else {
|
|
191
|
+
DispatchQueue.main.async { completion() }
|
|
192
|
+
return
|
|
193
|
+
}
|
|
194
|
+
self.queue.async {
|
|
195
|
+
let resolved: URL? = (assetWriter.status == .completed) ? outputURL : nil
|
|
196
|
+
let writerError: NSError? = (assetWriter.status == .failed)
|
|
197
|
+
? (assetWriter.error as NSError?)
|
|
198
|
+
: nil
|
|
199
|
+
video?.logSummary()
|
|
200
|
+
audio?.logSummary()
|
|
201
|
+
NSLog("[TracksRecorder] recording finalised → %@",
|
|
202
|
+
resolved?.absoluteString ?? "(no file produced)")
|
|
203
|
+
self.fireTerminalCompletion(url: resolved, error: writerError)
|
|
204
|
+
self.cleanupAfterStop()
|
|
205
|
+
DispatchQueue.main.async { completion() }
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
@objc public func clearRecordingsDirectory(completion: @escaping (NSError?) -> Void) {
|
|
212
|
+
queue.async { [weak self] in
|
|
213
|
+
guard let self = self else { return }
|
|
214
|
+
if self.isRecording {
|
|
215
|
+
DispatchQueue.main.async {
|
|
216
|
+
completion(makeRecorderError("recording_in_progress", code: 1))
|
|
217
|
+
}
|
|
218
|
+
return
|
|
219
|
+
}
|
|
220
|
+
let fm = FileManager.default
|
|
221
|
+
do {
|
|
222
|
+
let contents = try fm.contentsOfDirectory(
|
|
223
|
+
at: self.recordingsDirectory,
|
|
224
|
+
includingPropertiesForKeys: nil,
|
|
225
|
+
options: []
|
|
226
|
+
)
|
|
227
|
+
for url in contents {
|
|
228
|
+
try? fm.removeItem(at: url)
|
|
229
|
+
}
|
|
230
|
+
DispatchQueue.main.async { completion(nil) }
|
|
231
|
+
} catch {
|
|
232
|
+
DispatchQueue.main.async { completion(error as NSError) }
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@objc public func listRecordings() -> [URL] {
|
|
238
|
+
let fm = FileManager.default
|
|
239
|
+
guard let contents = try? fm.contentsOfDirectory(
|
|
240
|
+
at: recordingsDirectory,
|
|
241
|
+
includingPropertiesForKeys: [.contentModificationDateKey],
|
|
242
|
+
options: [.skipsHiddenFiles]
|
|
243
|
+
) else {
|
|
244
|
+
return []
|
|
245
|
+
}
|
|
246
|
+
return contents.sorted { lhs, rhs in
|
|
247
|
+
let lDate = (try? lhs.resourceValues(forKeys: [.contentModificationDateKey]).contentModificationDate) ?? .distantPast
|
|
248
|
+
let rDate = (try? rhs.resourceValues(forKeys: [.contentModificationDateKey]).contentModificationDate) ?? .distantPast
|
|
249
|
+
return lDate > rDate
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// MARK: - PipelineHost
|
|
254
|
+
|
|
255
|
+
func seedOriginNs(_ timestampNs: UInt64) -> UInt64 {
|
|
256
|
+
if let existing = recordingStartHostTimeNs { return existing }
|
|
257
|
+
recordingStartHostTimeNs = timestampNs
|
|
258
|
+
return timestampNs
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
func onTrackAdded() {
|
|
262
|
+
pendingPipelines = max(0, pendingPipelines - 1)
|
|
263
|
+
maybeStartSession()
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
func onFatalError(_ error: NSError) {
|
|
267
|
+
fireTerminalCompletion(url: nil, error: error)
|
|
268
|
+
cleanupAfterFailure()
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// MARK: - Internal helpers
|
|
272
|
+
|
|
273
|
+
/// Starts the writer once every active pipeline has reported its input
|
|
274
|
+
/// added. Calling `startWriting()` / `startSession(.zero)` before all
|
|
275
|
+
/// inputs are present would leave un-added tracks orphaned; the gate
|
|
276
|
+
/// is load-bearing.
|
|
277
|
+
private func maybeStartSession() {
|
|
278
|
+
guard let writer = assetWriter else { return }
|
|
279
|
+
if pendingPipelines > 0 { return }
|
|
280
|
+
if writer.status != .unknown { return }
|
|
281
|
+
|
|
282
|
+
guard writer.startWriting() else {
|
|
283
|
+
let err = (writer.error as NSError?) ?? makeRecorderError("start_failed", code: 3)
|
|
284
|
+
fireTerminalCompletion(url: nil, error: err)
|
|
285
|
+
cleanupAfterFailure()
|
|
286
|
+
return
|
|
287
|
+
}
|
|
288
|
+
// The session origin is `.zero`; PTS values are computed relative
|
|
289
|
+
// to `recordingStartHostTimeNs` before being passed to
|
|
290
|
+
// `VTCompressionSessionEncodeFrame`, so the first encoded sample
|
|
291
|
+
// already carries pts=0.
|
|
292
|
+
writer.startSession(atSourceTime: .zero)
|
|
293
|
+
NSLog("[TracksRecorder] writer.startWriting() + startSession(.zero)")
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
private func fireTerminalCompletion(url: URL?, error: NSError?) {
|
|
297
|
+
guard !isCompleted else { return }
|
|
298
|
+
isCompleted = true
|
|
299
|
+
let cb = recordingCompletion
|
|
300
|
+
recordingCompletion = nil
|
|
301
|
+
DispatchQueue.main.async { cb?(url, error) }
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
private func cleanupAfterFailure() {
|
|
305
|
+
videoPipeline?.detachSink()
|
|
306
|
+
audioPipeline?.detachSink()
|
|
307
|
+
autoStopTimer?.cancel()
|
|
308
|
+
autoStopTimer = nil
|
|
309
|
+
resetTransientState()
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
private func cleanupAfterStop() {
|
|
313
|
+
resetTransientState()
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/// Resets every transient field to its initial value. Single source of
|
|
317
|
+
/// truth for "the manager is between recordings". Does NOT release
|
|
318
|
+
/// native resources — the caller must have already torn down the
|
|
319
|
+
/// pipelines and the writer.
|
|
320
|
+
private func resetTransientState() {
|
|
321
|
+
videoPipeline = nil
|
|
322
|
+
audioPipeline = nil
|
|
323
|
+
assetWriter = nil
|
|
324
|
+
outputURL = nil
|
|
325
|
+
recordingCompletion = nil
|
|
326
|
+
isCompleted = false
|
|
327
|
+
isRecording = false
|
|
328
|
+
pendingPipelines = 0
|
|
329
|
+
recordingStartHostTimeNs = nil
|
|
330
|
+
autoStopTimer?.cancel()
|
|
331
|
+
autoStopTimer = nil
|
|
332
|
+
}
|
|
333
|
+
}
|