@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
package/CHANGELOG.md
CHANGED
|
@@ -2,18 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.40.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-1.39.0...@stream-io/video-react-native-sdk-1.40.0) (2026-06-26)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
- `@stream-io/noise-cancellation-react-native` updated to version `0.9.0`
|
|
10
|
+
- `@stream-io/react-native-callingx` updated to version `0.6.0`
|
|
11
|
+
- `@stream-io/video-filters-react-native` updated to version `0.14.0`
|
|
12
|
+
- `@stream-io/typescript-config` updated to version `0.1.0`
|
|
13
|
+
- `@stream-io/video-client` updated to version `1.55.0`
|
|
14
|
+
- **client:** don't tear down the SFU socket on a network blip during an in-flight reconnect ([#2300](https://github.com/GetStream/stream-video-js/issues/2300)) ([df729c0](https://github.com/GetStream/stream-video-js/commit/df729c01d9eaf9a7229d618b51381f6c6cfeb8ca))
|
|
15
|
+
- **client:** harden SFU reconnection and ICE-restart recovery ([#2285](https://github.com/GetStream/stream-video-js/issues/2285)) ([06e5f58](https://github.com/GetStream/stream-video-js/commit/06e5f5800498e14e47dc1cb8e46449c86d4a4387))
|
|
16
|
+
- **client:** omit client telemetry events for unregistered calls ([#2301](https://github.com/GetStream/stream-video-js/issues/2301)) ([86fc21a](https://github.com/GetStream/stream-video-js/commit/86fc21a82afb2db49ef4fc1562a5b5d456d85f27))
|
|
17
|
+
- **client:** reliably deliver delta-compressed WebRTC stats ([#2304](https://github.com/GetStream/stream-video-js/issues/2304)) ([c5803fc](https://github.com/GetStream/stream-video-js/commit/c5803fc777a241d25c975e316140700c773bc840))
|
|
18
|
+
- `@stream-io/video-react-bindings` updated to version `1.18.0`
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
- pre-call testing ([#2235](https://github.com/GetStream/stream-video-js/issues/2235)) ([87cfaa4](https://github.com/GetStream/stream-video-js/commit/87cfaa456e2ed7d1a0b5034a95d0f09f01903d2e))
|
|
23
|
+
- upgrade to TypeScript 6.0.3, pin ES2022, raise supported-browser floors ([#2290](https://github.com/GetStream/stream-video-js/issues/2290)) ([d9ea158](https://github.com/GetStream/stream-video-js/commit/d9ea15846582fa8db86b3b873eca2afe92ae3593))
|
|
24
|
+
|
|
25
|
+
### Performance Improvements
|
|
26
|
+
|
|
27
|
+
- **react-native-sdk:** reduce re-renders, fix listener cleanup, prune dead code ([#2274](https://github.com/GetStream/stream-video-js/issues/2274)) ([cbf1864](https://github.com/GetStream/stream-video-js/commit/cbf18642f9466614a9ee11d08ceaad8c2ce98d58))
|
|
28
|
+
|
|
5
29
|
## [1.39.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-1.38.2...@stream-io/video-react-native-sdk-1.39.0) (2026-06-19)
|
|
6
30
|
|
|
7
31
|
### Dependency Updates
|
|
8
32
|
|
|
9
33
|
- `@stream-io/video-client` updated to version `1.54.0`
|
|
10
|
-
- **Features**
|
|
11
|
-
- **client:** allow disabling client event reporter ([#2286](https://github.com/GetStream/stream-video-js/issues/2286)) ([d727916](https://github.com/GetStream/stream-video-js/commit/d72791614c98ca3bedafe0538e0ac68050260ead))
|
|
12
|
-
- **Bug Fixes**
|
|
13
|
-
- **client:** avoid SFU socket close when online fires without offline recovery ([#2292](https://github.com/GetStream/stream-video-js/issues/2292)) ([3034188](https://github.com/GetStream/stream-video-js/commit/30341888eddbe878e97d39bb2f11c5b4455755d6))
|
|
14
|
-
- **client:** send migrating_from after repeated rejoin failures ([#2287](https://github.com/GetStream/stream-video-js/issues/2287)) ([1c14617](https://github.com/GetStream/stream-video-js/commit/1c14617ce8cccbb97cc68e8ba75225f49607ccbe))
|
|
15
34
|
- `@stream-io/video-react-bindings` updated to version `1.17.0`
|
|
16
|
-
- **react-bindings:** declare @stream-io/video-client as a runtime dependency ([#2294](https://github.com/GetStream/stream-video-js/issues/2294)) ([978602c](https://github.com/GetStream/stream-video-js/commit/978602cd44e4551ff5af33d8da9f41a55036106f))
|
|
17
35
|
|
|
18
36
|
### Features
|
|
19
37
|
|
|
@@ -25,8 +25,10 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
|
25
25
|
import com.facebook.react.bridge.ReactMethod
|
|
26
26
|
import com.facebook.react.bridge.WritableMap
|
|
27
27
|
import com.facebook.react.modules.core.DeviceEventManagerModule.RCTDeviceEventEmitter
|
|
28
|
+
import com.facebook.react.bridge.ReadableMap
|
|
28
29
|
import com.oney.WebRTCModule.WebRTCModule
|
|
29
30
|
import com.oney.WebRTCModule.WebRTCModuleOptions
|
|
31
|
+
import com.streamvideo.reactnative.recorder.TracksRecorderManager
|
|
30
32
|
import com.streamvideo.reactnative.screenshare.ScreenAudioCapture
|
|
31
33
|
import com.streamvideo.reactnative.keepalive.StreamCallKeepAliveHeadlessService
|
|
32
34
|
import com.streamvideo.reactnative.util.CallAlivePermissionsHelper
|
|
@@ -41,6 +43,7 @@ import kotlinx.coroutines.launch
|
|
|
41
43
|
import org.webrtc.VideoSink
|
|
42
44
|
import org.webrtc.VideoTrack
|
|
43
45
|
import java.io.ByteArrayOutputStream
|
|
46
|
+
import java.io.File
|
|
44
47
|
import kotlin.math.sin
|
|
45
48
|
|
|
46
49
|
|
|
@@ -606,8 +609,86 @@ class StreamVideoReactNativeModule(reactContext: ReactApplicationContext) :
|
|
|
606
609
|
}
|
|
607
610
|
}
|
|
608
611
|
|
|
612
|
+
// ── Track recorder bridge ────────────────────────────────────────────
|
|
613
|
+
|
|
614
|
+
@ReactMethod
|
|
615
|
+
fun startTrackRecording(options: ReadableMap, promise: Promise) {
|
|
616
|
+
val videoTrackId = if (options.hasKey("videoTrackId") && !options.isNull("videoTrackId")) {
|
|
617
|
+
options.getString("videoTrackId")
|
|
618
|
+
} else {
|
|
619
|
+
null
|
|
620
|
+
}
|
|
621
|
+
val maxDurationMs = if (options.hasKey("maxDurationMs") && !options.isNull("maxDurationMs")) {
|
|
622
|
+
options.getInt("maxDurationMs").toLong()
|
|
623
|
+
} else {
|
|
624
|
+
DEFAULT_RECORDING_DURATION_MS
|
|
625
|
+
}
|
|
626
|
+
val targetWidth = if (options.hasKey("targetWidth") && !options.isNull("targetWidth")) {
|
|
627
|
+
options.getInt("targetWidth")
|
|
628
|
+
} else {
|
|
629
|
+
0
|
|
630
|
+
}
|
|
631
|
+
val targetHeight = if (options.hasKey("targetHeight") && !options.isNull("targetHeight")) {
|
|
632
|
+
options.getInt("targetHeight")
|
|
633
|
+
} else {
|
|
634
|
+
0
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
val webRTCModule = reactApplicationContext.getNativeModule(WebRTCModule::class.java)
|
|
638
|
+
if (webRTCModule == null) {
|
|
639
|
+
promise.reject(RECORDING_ERROR_CODE, "WebRTCModule not available")
|
|
640
|
+
return
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
TracksRecorderManager.shared.startRecording(
|
|
644
|
+
context = reactApplicationContext,
|
|
645
|
+
webRTCModule = webRTCModule,
|
|
646
|
+
videoTrackId = videoTrackId,
|
|
647
|
+
maxDurationMs = maxDurationMs,
|
|
648
|
+
targetWidth = targetWidth,
|
|
649
|
+
targetHeight = targetHeight,
|
|
650
|
+
) { file, error ->
|
|
651
|
+
if (error != null) {
|
|
652
|
+
promise.reject(RECORDING_ERROR_CODE, error.message ?: "recording failed", error)
|
|
653
|
+
} else {
|
|
654
|
+
promise.resolve(file?.let { "file://${it.absolutePath}" })
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
@ReactMethod
|
|
660
|
+
fun stopTrackRecording(promise: Promise) {
|
|
661
|
+
TracksRecorderManager.shared.stopRecording {
|
|
662
|
+
promise.resolve(null)
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
@ReactMethod
|
|
667
|
+
fun clearStreamRecordings(promise: Promise) {
|
|
668
|
+
TracksRecorderManager.shared.clearRecordingsDirectory(reactApplicationContext) { error ->
|
|
669
|
+
if (error != null) {
|
|
670
|
+
promise.reject(RECORDING_CLEAR_ERROR_CODE, error.message ?: "clear failed", error)
|
|
671
|
+
} else {
|
|
672
|
+
promise.resolve(null)
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
@ReactMethod
|
|
678
|
+
fun getStreamRecordings(promise: Promise) {
|
|
679
|
+
val files: List<File> = TracksRecorderManager.shared.listRecordings(reactApplicationContext)
|
|
680
|
+
val arr = Arguments.createArray()
|
|
681
|
+
for (f in files) {
|
|
682
|
+
arr.pushString("file://${f.absolutePath}")
|
|
683
|
+
}
|
|
684
|
+
promise.resolve(arr)
|
|
685
|
+
}
|
|
686
|
+
|
|
609
687
|
companion object {
|
|
610
688
|
private const val NAME = "StreamVideoReactNative"
|
|
611
689
|
private const val SAMPLE_RATE = 22050
|
|
690
|
+
private const val DEFAULT_RECORDING_DURATION_MS = 5000L
|
|
691
|
+
private const val RECORDING_ERROR_CODE = "recording_error"
|
|
692
|
+
private const val RECORDING_CLEAR_ERROR_CODE = "clear_error"
|
|
612
693
|
}
|
|
613
694
|
}
|
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
package com.streamvideo.reactnative.recorder
|
|
2
|
+
|
|
3
|
+
import android.media.MediaCodec
|
|
4
|
+
import android.media.MediaCodecInfo
|
|
5
|
+
import android.media.MediaFormat
|
|
6
|
+
import android.media.MediaMuxer
|
|
7
|
+
import android.util.Log
|
|
8
|
+
import com.oney.WebRTCModule.WebRTCModule
|
|
9
|
+
import com.oney.WebRTCModule.WebRTCModuleOptions
|
|
10
|
+
import java.nio.ByteBuffer
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Audio pipeline owned by [TracksRecorderManager]. Encapsulates the AAC
|
|
14
|
+
* audio path:
|
|
15
|
+
* - the [RecorderPlaybackSamplesSink] registered with
|
|
16
|
+
* `WebRTCModuleOptions.addPlaybackSamplesObserver` (the fork's
|
|
17
|
+
* multi-tenant fan-out over `JavaAudioDeviceModule.PlaybackSamplesReadyCallback`),
|
|
18
|
+
* - the [MediaCodec] AAC encoder + its configuration,
|
|
19
|
+
* - reflection-based speaker mute via `WebRtcAudioTrack.audioTrack.setVolume(0)`
|
|
20
|
+
* so the SFU loopback echo doesn't feed back into the mic,
|
|
21
|
+
* - encoder output drain (format-locked addTrack, sample append, EOS),
|
|
22
|
+
* - per-recording counters surfaced for the end-of-recording log line.
|
|
23
|
+
*
|
|
24
|
+
* All state mutation runs on the host's handler thread.
|
|
25
|
+
*/
|
|
26
|
+
internal class AudioPipeline(
|
|
27
|
+
private val host: PipelineHost,
|
|
28
|
+
private val webRTCModule: WebRTCModule,
|
|
29
|
+
) {
|
|
30
|
+
private companion object {
|
|
31
|
+
const val TAG = "TracksRecorder.Audio"
|
|
32
|
+
const val MIME = "audio/mp4a-latm"
|
|
33
|
+
const val BIT_RATE = 64_000
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
private val handler = host.handler
|
|
37
|
+
|
|
38
|
+
private var encoder: MediaCodec? = null
|
|
39
|
+
private var sink: RecorderPlaybackSamplesSink? = null
|
|
40
|
+
|
|
41
|
+
private var trackIndex: Int = -1
|
|
42
|
+
private var formatLocked = false
|
|
43
|
+
|
|
44
|
+
private var sampleRate: Int = 0
|
|
45
|
+
private var channelCount: Int = 0
|
|
46
|
+
private var bitsPerSample: Int = 0
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Reference to the system [android.media.AudioTrack] held while
|
|
50
|
+
* playback is muted for recording, so cleanup can restore the
|
|
51
|
+
* original volume. `@Volatile` because [restoreLoopbackPlaybackMute]
|
|
52
|
+
* is invoked from both the recorder handler (manual stop) and the
|
|
53
|
+
* main looper (auto-stop runnable).
|
|
54
|
+
*/
|
|
55
|
+
@Volatile
|
|
56
|
+
private var mutedSystemAudioTrack: android.media.AudioTrack? = null
|
|
57
|
+
|
|
58
|
+
@Volatile
|
|
59
|
+
private var muteUnavailable: Boolean = false
|
|
60
|
+
|
|
61
|
+
//diagnostic counters
|
|
62
|
+
private var buffersReceived = 0
|
|
63
|
+
private var samplesAppended = 0
|
|
64
|
+
private var buffersDropped = 0
|
|
65
|
+
private var firstSamplePtsUs: Long = -1
|
|
66
|
+
private var lastSamplePtsUs: Long = -1
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Register the playback-samples observer with the fork's fan-out and
|
|
70
|
+
* mute the system playback track. Future audio buffers post to the
|
|
71
|
+
* handler.
|
|
72
|
+
*/
|
|
73
|
+
fun start() {
|
|
74
|
+
val s = RecorderPlaybackSamplesSink { data, sr, ch, frames ->
|
|
75
|
+
onAudioBufferDelivered(data, sr, ch, frames)
|
|
76
|
+
}
|
|
77
|
+
sink = s
|
|
78
|
+
WebRTCModuleOptions.getInstance().addPlaybackSamplesObserver(s)
|
|
79
|
+
|
|
80
|
+
// Always mute the speaker so the loopback echo doesn't feed
|
|
81
|
+
// back into the mic. First attempt may fail due to a race condition
|
|
82
|
+
// where the system AudioTrack hasn't been created yet.
|
|
83
|
+
ensureLoopbackPlaybackMuted()
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Detach the sink and restore speaker volume synchronously from any
|
|
88
|
+
* thread. Both operations are off-handler so they take effect
|
|
89
|
+
* immediately — routing them through the handler would queue them
|
|
90
|
+
* behind the encoder backlog and keep accepting samples / leave the
|
|
91
|
+
* speaker muted past the user-facing stop point.
|
|
92
|
+
*/
|
|
93
|
+
fun detachSink() {
|
|
94
|
+
try {
|
|
95
|
+
sink?.let {
|
|
96
|
+
WebRTCModuleOptions.getInstance().removePlaybackSamplesObserver(it)
|
|
97
|
+
}
|
|
98
|
+
} catch (t: Throwable) {
|
|
99
|
+
Log.w(TAG, "removePlaybackSamplesObserver threw", t)
|
|
100
|
+
}
|
|
101
|
+
sink = null
|
|
102
|
+
restoreLoopbackPlaybackMute()
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** On-handler. Submit EOS to the encoder. Returns `true` if queued. */
|
|
106
|
+
fun signalEndOfStream(muxerInstance: MediaMuxer): Boolean {
|
|
107
|
+
val enc = encoder ?: return false
|
|
108
|
+
return signalEoS(enc, muxerInstance)
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** On-handler. Drain until BUFFER_FLAG_END_OF_STREAM or budget expires. */
|
|
112
|
+
fun drainAfterEoS(muxerInstance: MediaMuxer) {
|
|
113
|
+
val enc = encoder ?: return
|
|
114
|
+
drain(enc, muxerInstance, endOfStream = true)
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** On-handler. Stop + release the encoder. */
|
|
118
|
+
fun stopAndRelease() {
|
|
119
|
+
try {
|
|
120
|
+
encoder?.stop()
|
|
121
|
+
} catch (t: Throwable) {
|
|
122
|
+
Log.w(TAG, "encoder.stop() threw", t)
|
|
123
|
+
}
|
|
124
|
+
try {
|
|
125
|
+
encoder?.release()
|
|
126
|
+
} catch (t: Throwable) {
|
|
127
|
+
Log.w(TAG, "encoder.release() threw", t)
|
|
128
|
+
}
|
|
129
|
+
encoder = null
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
fun logSummary() {
|
|
133
|
+
val durationMs = if (firstSamplePtsUs >= 0 && lastSamplePtsUs >= firstSamplePtsUs) {
|
|
134
|
+
(lastSamplePtsUs - firstSamplePtsUs) / 1000
|
|
135
|
+
} else {
|
|
136
|
+
-1
|
|
137
|
+
}
|
|
138
|
+
Log.i(
|
|
139
|
+
TAG,
|
|
140
|
+
"summary received=$buffersReceived appended=$samplesAppended dropped=$buffersDropped firstPtsUs=$firstSamplePtsUs lastPtsUs=$lastSamplePtsUs durationMs=$durationMs",
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Idempotent: try to mute the system playback track by setting its
|
|
146
|
+
* volume to 0. Returns `true` if mute is now in place (either it
|
|
147
|
+
* was just applied, or it was already applied).
|
|
148
|
+
*
|
|
149
|
+
* `WebRtcAudioTrack.audioTrack` is `null` until WebRTC calls
|
|
150
|
+
* `startPlayout()`, which happens **asynchronously after** the
|
|
151
|
+
* loopback `MediaStreamTrack` is enabled. The retry path
|
|
152
|
+
* lives in [handleAudioBufferOnHandler], which only runs after
|
|
153
|
+
* `startPlayout()` has created the system AudioTrack (that's the
|
|
154
|
+
* precondition for the JADM playback callback firing at all).
|
|
155
|
+
*
|
|
156
|
+
* Reflection is required because `WebRtcAudioTrack` is package-
|
|
157
|
+
* private and its `audioTrack` field private. Best-effort — if
|
|
158
|
+
* reflection fails because the class layout changed, recording
|
|
159
|
+
* still works; the user just hears the echo.
|
|
160
|
+
*/
|
|
161
|
+
private fun ensureLoopbackPlaybackMuted(): Boolean {
|
|
162
|
+
if (mutedSystemAudioTrack != null) return true
|
|
163
|
+
if (muteUnavailable) return false
|
|
164
|
+
|
|
165
|
+
try {
|
|
166
|
+
val adm = webRTCModule.audioDeviceModule ?: return false
|
|
167
|
+
val audioOutputField = adm.javaClass.getField("audioOutput")
|
|
168
|
+
val audioOutput = audioOutputField.get(adm) ?: return false
|
|
169
|
+
val audioTrackField = audioOutput.javaClass.getDeclaredField("audioTrack")
|
|
170
|
+
audioTrackField.isAccessible = true
|
|
171
|
+
val systemAudioTrack = audioTrackField.get(audioOutput) as? android.media.AudioTrack
|
|
172
|
+
if (systemAudioTrack == null) {
|
|
173
|
+
// Expected on initial call from start(); WebRTC's startPlayout hasn't created the AudioTrack yet.
|
|
174
|
+
return false
|
|
175
|
+
}
|
|
176
|
+
systemAudioTrack.setVolume(0f)
|
|
177
|
+
mutedSystemAudioTrack = systemAudioTrack
|
|
178
|
+
return true
|
|
179
|
+
} catch (t: Throwable) {
|
|
180
|
+
muteUnavailable = true
|
|
181
|
+
Log.w(TAG, "speaker mute failed — recording will still work but speaker will play loopback", t)
|
|
182
|
+
return false
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
private fun restoreLoopbackPlaybackMute() {
|
|
187
|
+
muteUnavailable = false
|
|
188
|
+
val track = mutedSystemAudioTrack ?: return
|
|
189
|
+
try {
|
|
190
|
+
track.setVolume(1f)
|
|
191
|
+
} catch (t: Throwable) {
|
|
192
|
+
Log.w(TAG, "restoreLoopbackPlaybackMute failed", t)
|
|
193
|
+
}
|
|
194
|
+
mutedSystemAudioTrack = null
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
private fun onAudioBufferDelivered(
|
|
198
|
+
data: ByteBuffer,
|
|
199
|
+
sampleRate: Int,
|
|
200
|
+
channels: Int,
|
|
201
|
+
frames: Int,
|
|
202
|
+
) {
|
|
203
|
+
// System.nanoTime() shares the monotonic source WebRTC uses
|
|
204
|
+
// for video frame timestamps, so audio and video PTS line up
|
|
205
|
+
// against the same origin.
|
|
206
|
+
val arrivalNs = System.nanoTime()
|
|
207
|
+
handler.post {
|
|
208
|
+
try {
|
|
209
|
+
handleAudioBufferOnHandler(data, sampleRate, channels, frames, arrivalNs)
|
|
210
|
+
} catch (t: Throwable) {
|
|
211
|
+
Log.e(TAG, "handleAudioBufferOnHandler threw", t)
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
private fun handleAudioBufferOnHandler(
|
|
217
|
+
data: ByteBuffer,
|
|
218
|
+
sr: Int,
|
|
219
|
+
ch: Int,
|
|
220
|
+
frames: Int,
|
|
221
|
+
arrivalNs: Long,
|
|
222
|
+
) {
|
|
223
|
+
// Retry the speaker mute on every sample arrival until it
|
|
224
|
+
// sticks.The very first delivery is the earliest moment we can be sure
|
|
225
|
+
// WebRTC's `startPlayout()` has created the system AudioTrack
|
|
226
|
+
// — the JADM playback callback wouldn't fire otherwise — so
|
|
227
|
+
// this is the tightest mute window we can achieve from native.
|
|
228
|
+
ensureLoopbackPlaybackMuted()
|
|
229
|
+
|
|
230
|
+
val muxerInstance = host.muxer ?: return
|
|
231
|
+
|
|
232
|
+
// JADM playback always uses 16-bit signed PCM
|
|
233
|
+
// (`WebRtcAudioTrack.BITS_PER_SAMPLE`).
|
|
234
|
+
val bps = 16
|
|
235
|
+
val enc = encoder ?: createEncoder(sr, ch, bps) ?: return
|
|
236
|
+
|
|
237
|
+
// MediaCodec can't re-negotiate format mid-stream; drop
|
|
238
|
+
// mismatched buffers. Rare in practice — WebRTC keeps PCM
|
|
239
|
+
// format constant per render session.
|
|
240
|
+
if (sr != sampleRate || ch != channelCount) {
|
|
241
|
+
buffersDropped++
|
|
242
|
+
if (buffersDropped <= 5 || buffersDropped % 30 == 0) {
|
|
243
|
+
Log.w(
|
|
244
|
+
TAG,
|
|
245
|
+
"dropping audio buffer sr=$sr ch=$ch (configured sr=$sampleRate ch=$channelCount dropped=$buffersDropped)",
|
|
246
|
+
)
|
|
247
|
+
}
|
|
248
|
+
return
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// First buffer of any kind establishes the shared origin so
|
|
252
|
+
// video and audio PTS share zero.
|
|
253
|
+
val originNs = host.seedOriginNs(arrivalNs)
|
|
254
|
+
|
|
255
|
+
// Wall-clock PTS bounds the file's reported duration to the
|
|
256
|
+
// actual recording window. A sample-counter approach would
|
|
257
|
+
// over-count if JADM delivered a burst (e.g. playback-startup
|
|
258
|
+
// buffer flush), making the MP4 longer than the recording
|
|
259
|
+
// window. Jitter in delivery cadence shows up as a few-ms
|
|
260
|
+
// variance in sample spacing — below audible threshold.
|
|
261
|
+
val ptsUs = ((arrivalNs - originNs) / 1000L).coerceAtLeast(0L)
|
|
262
|
+
|
|
263
|
+
val byteCount = frames * ch * (bps / 8)
|
|
264
|
+
val inputIndex = try {
|
|
265
|
+
enc.dequeueInputBuffer(EncoderConstants.DEQUEUE_TIMEOUT_US)
|
|
266
|
+
} catch (t: Throwable) {
|
|
267
|
+
Log.e(TAG, "audio dequeueInputBuffer threw", t)
|
|
268
|
+
buffersDropped++
|
|
269
|
+
return
|
|
270
|
+
}
|
|
271
|
+
if (inputIndex < 0) {
|
|
272
|
+
buffersDropped++
|
|
273
|
+
return
|
|
274
|
+
}
|
|
275
|
+
val input = enc.getInputBuffer(inputIndex)
|
|
276
|
+
if (input == null) {
|
|
277
|
+
buffersDropped++
|
|
278
|
+
enc.queueInputBuffer(inputIndex, 0, 0, ptsUs, 0)
|
|
279
|
+
return
|
|
280
|
+
}
|
|
281
|
+
input.clear()
|
|
282
|
+
if (input.capacity() < byteCount) {
|
|
283
|
+
Log.w(
|
|
284
|
+
TAG,
|
|
285
|
+
"audio input buffer too small (${input.capacity()} < $byteCount) — dropping",
|
|
286
|
+
)
|
|
287
|
+
enc.queueInputBuffer(inputIndex, 0, 0, ptsUs, 0)
|
|
288
|
+
buffersDropped++
|
|
289
|
+
return
|
|
290
|
+
}
|
|
291
|
+
input.put(data)
|
|
292
|
+
enc.queueInputBuffer(inputIndex, 0, byteCount, ptsUs, 0)
|
|
293
|
+
buffersReceived++
|
|
294
|
+
|
|
295
|
+
drain(enc, muxerInstance, endOfStream = false)
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
private fun createEncoder(sr: Int, ch: Int, bps: Int): MediaCodec? {
|
|
299
|
+
val format = MediaFormat.createAudioFormat(MIME, sr, ch).apply {
|
|
300
|
+
setInteger(
|
|
301
|
+
MediaFormat.KEY_AAC_PROFILE,
|
|
302
|
+
MediaCodecInfo.CodecProfileLevel.AACObjectLC,
|
|
303
|
+
)
|
|
304
|
+
setInteger(MediaFormat.KEY_BIT_RATE, BIT_RATE)
|
|
305
|
+
// 4× the typical 10 ms PCM buffer — generous so the input
|
|
306
|
+
// slot is never tight.
|
|
307
|
+
val pcmBytesPerBuffer = sr * ch * (bps / 8) / 100
|
|
308
|
+
setInteger(MediaFormat.KEY_MAX_INPUT_SIZE, pcmBytesPerBuffer * 4)
|
|
309
|
+
}
|
|
310
|
+
return try {
|
|
311
|
+
val enc = MediaCodec.createEncoderByType(MIME)
|
|
312
|
+
enc.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE)
|
|
313
|
+
enc.start()
|
|
314
|
+
encoder = enc
|
|
315
|
+
sampleRate = sr
|
|
316
|
+
channelCount = ch
|
|
317
|
+
bitsPerSample = bps
|
|
318
|
+
// INVARIANT: see the symmetric comment in [VideoPipeline.createEncoder].
|
|
319
|
+
// The host's pending-pipeline counter must remain positive for this
|
|
320
|
+
// pipeline until `muxer.addTrack(audio)` has been called or the
|
|
321
|
+
// muxer would start without the audio track.
|
|
322
|
+
enc
|
|
323
|
+
} catch (t: Throwable) {
|
|
324
|
+
Log.e(TAG, "failed to create AAC encoder", t)
|
|
325
|
+
host.onFatalError(t)
|
|
326
|
+
null
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Queues a zero-length input buffer with `BUFFER_FLAG_END_OF_STREAM`.
|
|
332
|
+
* Drains output between input attempts so the encoder's input
|
|
333
|
+
* slots can free up — a polling-only loop deadlocks when output
|
|
334
|
+
* queues are full. Returns `true` only if the marker was
|
|
335
|
+
* successfully queued; the caller skips the EOS drain otherwise so
|
|
336
|
+
* the handler doesn't hang waiting for a marker that won't arrive.
|
|
337
|
+
*/
|
|
338
|
+
private fun signalEoS(enc: MediaCodec, muxerInstance: MediaMuxer): Boolean {
|
|
339
|
+
repeat(EncoderConstants.EOS_INPUT_RETRIES) {
|
|
340
|
+
val idx = try {
|
|
341
|
+
enc.dequeueInputBuffer(EncoderConstants.DEQUEUE_TIMEOUT_US)
|
|
342
|
+
} catch (t: Throwable) {
|
|
343
|
+
Log.w(TAG, "dequeueInputBuffer during EOS threw", t)
|
|
344
|
+
return false
|
|
345
|
+
}
|
|
346
|
+
if (idx >= 0) {
|
|
347
|
+
enc.queueInputBuffer(
|
|
348
|
+
idx, 0, 0, 0L,
|
|
349
|
+
MediaCodec.BUFFER_FLAG_END_OF_STREAM,
|
|
350
|
+
)
|
|
351
|
+
return true
|
|
352
|
+
}
|
|
353
|
+
// Keep output flowing so input slots can be released.
|
|
354
|
+
try {
|
|
355
|
+
drain(enc, muxerInstance, endOfStream = false)
|
|
356
|
+
} catch (t: Throwable) {
|
|
357
|
+
Log.w(TAG, "drainEncoder during EOS retry threw", t)
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
Log.w(TAG, "could not queue EOS — skipping EOS drain to avoid hang")
|
|
361
|
+
return false
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
private fun drain(
|
|
365
|
+
enc: MediaCodec,
|
|
366
|
+
muxerInstance: MediaMuxer,
|
|
367
|
+
endOfStream: Boolean,
|
|
368
|
+
) {
|
|
369
|
+
val info = MediaCodec.BufferInfo()
|
|
370
|
+
val timeoutUs =
|
|
371
|
+
if (endOfStream) EncoderConstants.DEQUEUE_TIMEOUT_US_EOS else 0L
|
|
372
|
+
val deadlineMs = System.currentTimeMillis() +
|
|
373
|
+
if (endOfStream) EncoderConstants.EOS_DRAIN_BUDGET_MS else Long.MAX_VALUE
|
|
374
|
+
|
|
375
|
+
while (true) {
|
|
376
|
+
val outIndex = try {
|
|
377
|
+
enc.dequeueOutputBuffer(info, timeoutUs)
|
|
378
|
+
} catch (t: Throwable) {
|
|
379
|
+
Log.e(TAG, "dequeueOutputBuffer threw", t)
|
|
380
|
+
return
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
when {
|
|
384
|
+
outIndex == MediaCodec.INFO_TRY_AGAIN_LATER -> {
|
|
385
|
+
if (!endOfStream) return
|
|
386
|
+
if (System.currentTimeMillis() >= deadlineMs) {
|
|
387
|
+
Log.w(
|
|
388
|
+
TAG,
|
|
389
|
+
"EOS drain timed out without seeing BUFFER_FLAG_END_OF_STREAM — bailing out",
|
|
390
|
+
)
|
|
391
|
+
return
|
|
392
|
+
}
|
|
393
|
+
// During EOS keep polling until the marker arrives.
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
outIndex == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED -> {
|
|
397
|
+
if (formatLocked) {
|
|
398
|
+
Log.w(TAG, "output format changed twice — ignoring")
|
|
399
|
+
continue
|
|
400
|
+
}
|
|
401
|
+
val newIndex = muxerInstance.addTrack(enc.outputFormat)
|
|
402
|
+
trackIndex = newIndex
|
|
403
|
+
formatLocked = true
|
|
404
|
+
host.onTrackAdded()
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
outIndex >= 0 -> {
|
|
408
|
+
val out = enc.getOutputBuffer(outIndex)
|
|
409
|
+
if (out != null && info.size > 0 && host.muxerStarted &&
|
|
410
|
+
trackIndex >= 0 &&
|
|
411
|
+
info.flags and MediaCodec.BUFFER_FLAG_CODEC_CONFIG == 0
|
|
412
|
+
) {
|
|
413
|
+
out.position(info.offset)
|
|
414
|
+
out.limit(info.offset + info.size)
|
|
415
|
+
try {
|
|
416
|
+
muxerInstance.writeSampleData(trackIndex, out, info)
|
|
417
|
+
samplesAppended++
|
|
418
|
+
if (firstSamplePtsUs < 0 || info.presentationTimeUs < firstSamplePtsUs) {
|
|
419
|
+
firstSamplePtsUs = info.presentationTimeUs
|
|
420
|
+
}
|
|
421
|
+
if (info.presentationTimeUs > lastSamplePtsUs) {
|
|
422
|
+
lastSamplePtsUs = info.presentationTimeUs
|
|
423
|
+
}
|
|
424
|
+
} catch (t: Throwable) {
|
|
425
|
+
Log.e(TAG, "writeSampleData failed", t)
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
enc.releaseOutputBuffer(outIndex, false)
|
|
429
|
+
if (info.flags and MediaCodec.BUFFER_FLAG_END_OF_STREAM != 0) return
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
if (!endOfStream && outIndex < 0) return
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
package com.streamvideo.reactnative.recorder
|
|
2
|
+
|
|
3
|
+
internal object EncoderConstants {
|
|
4
|
+
/** Non-blocking dequeue timeout used during normal frame/buffer feed. */
|
|
5
|
+
const val DEQUEUE_TIMEOUT_US: Long = 10_000L
|
|
6
|
+
|
|
7
|
+
/** Slower poll used while waiting for the EOS marker to surface. */
|
|
8
|
+
const val DEQUEUE_TIMEOUT_US_EOS: Long = 100_000L
|
|
9
|
+
|
|
10
|
+
/** Max attempts to queue an EOS input buffer before giving up. */
|
|
11
|
+
const val EOS_INPUT_RETRIES: Int = 50
|
|
12
|
+
|
|
13
|
+
/** Wall-clock cap on the EOS-mode drain so a missed EOS can't hang the handler. */
|
|
14
|
+
const val EOS_DRAIN_BUDGET_MS: Long = 2_000L
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
class RecordingError(message: String) : RuntimeException(message)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
package com.streamvideo.reactnative.recorder
|
|
2
|
+
|
|
3
|
+
import android.media.MediaMuxer
|
|
4
|
+
import android.os.Handler
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal coordination contract between [TracksRecorderManager] and audio/video pipelines.
|
|
8
|
+
* The pipelines own their encoder + sink + drain logic; the host owns lifecycle, the muxer,
|
|
9
|
+
* the muxer-start gate, the shared time origin, and the terminal-completion barrier.
|
|
10
|
+
*
|
|
11
|
+
* Every method on this interface is called from the host's handler thread
|
|
12
|
+
* — pipelines must post to [handler] before calling back into the host.
|
|
13
|
+
*/
|
|
14
|
+
internal interface PipelineHost {
|
|
15
|
+
/** The recorder's serial handler thread. */
|
|
16
|
+
val handler: Handler
|
|
17
|
+
|
|
18
|
+
val muxer: MediaMuxer?
|
|
19
|
+
|
|
20
|
+
val muxerStarted: Boolean
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Returns the recording's shared time origin in nanoseconds. The
|
|
24
|
+
* first pipeline to deliver a sample seeds the origin with its
|
|
25
|
+
* timestamp; subsequent calls return the established value.
|
|
26
|
+
*/
|
|
27
|
+
fun seedOriginNs(timestampNs: Long): Long
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Pipeline has added a track to the muxer. The host
|
|
31
|
+
* muxer once all expected pipelines have reported their track.
|
|
32
|
+
*/
|
|
33
|
+
fun onTrackAdded()
|
|
34
|
+
|
|
35
|
+
fun onFatalError(error: Throwable)
|
|
36
|
+
}
|