@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,472 @@
|
|
|
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 org.webrtc.VideoFrame
|
|
9
|
+
import org.webrtc.VideoTrack
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Video pipeline encapsulates everything specific to the H.264 video path:
|
|
13
|
+
* - the [RecorderVideoSink] attached to the source [VideoTrack],
|
|
14
|
+
* - the [MediaCodec] H.264 encoder + its configuration,
|
|
15
|
+
* - per-frame I420→NV12 normalisation (via [YuvHelper.I420ToNV12]),
|
|
16
|
+
* - encoder output drain (format-locked addTrack, sample append, EOS),
|
|
17
|
+
* - per-recording counters surfaced for the end-of-recording log line.
|
|
18
|
+
*
|
|
19
|
+
* Reports format-locked / sample-appended events to the host so the host
|
|
20
|
+
* can gate the muxer-start and track file duration. All state mutation
|
|
21
|
+
* runs on the host's handler thread.
|
|
22
|
+
*/
|
|
23
|
+
internal class VideoPipeline(
|
|
24
|
+
private val host: PipelineHost,
|
|
25
|
+
private val videoTrack: VideoTrack,
|
|
26
|
+
private val targetWidth: Int = 0,
|
|
27
|
+
private val targetHeight: Int = 0,
|
|
28
|
+
) {
|
|
29
|
+
private companion object {
|
|
30
|
+
const val TAG = "TracksRecorder.Video"
|
|
31
|
+
const val MIME = "video/avc"
|
|
32
|
+
const val BIT_RATE = 1_000_000
|
|
33
|
+
const val FRAME_RATE = 30
|
|
34
|
+
const val I_FRAME_INTERVAL_SECS = 1
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
private val handler = host.handler
|
|
38
|
+
|
|
39
|
+
private var encoder: MediaCodec? = null
|
|
40
|
+
private var sink: RecorderVideoSink? = null
|
|
41
|
+
|
|
42
|
+
private var trackIndex: Int = -1
|
|
43
|
+
private var formatLocked = false
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Dimensions the encoder was configured with (locked to the first
|
|
47
|
+
* delivered frame). MediaCodec's input buffer slot size is fixed at
|
|
48
|
+
* `configure()` time, so frames at a different resolution are
|
|
49
|
+
* rescaled before encoding.
|
|
50
|
+
*/
|
|
51
|
+
private var encoderWidth: Int = 0
|
|
52
|
+
private var encoderHeight: Int = 0
|
|
53
|
+
private var rotationApplied = false
|
|
54
|
+
|
|
55
|
+
//diagnostic counters
|
|
56
|
+
private var framesEncoded = 0
|
|
57
|
+
private var samplesAppended = 0
|
|
58
|
+
private var framesDropped = 0
|
|
59
|
+
private var framesScaled = 0
|
|
60
|
+
private var firstSamplePtsUs: Long = -1
|
|
61
|
+
private var lastSamplePtsUs: Long = -1
|
|
62
|
+
|
|
63
|
+
/** Attach the sink to the video track. Future frames post to the handler. */
|
|
64
|
+
fun start() {
|
|
65
|
+
val s = RecorderVideoSink { frame -> onFrameDelivered(frame) }
|
|
66
|
+
sink = s
|
|
67
|
+
videoTrack.addSink(s)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Detach the sink synchronously from any thread. `VideoTrack.removeSink`
|
|
72
|
+
* is thread-safe and idempotent. Called off the recorder handler so
|
|
73
|
+
* no new frames arrive while the backlog drains — going through the
|
|
74
|
+
* handler would queue the detach behind the encoder backlog.
|
|
75
|
+
*/
|
|
76
|
+
fun detachSink() {
|
|
77
|
+
try {
|
|
78
|
+
sink?.let { videoTrack.removeSink(it) }
|
|
79
|
+
} catch (t: Throwable) {
|
|
80
|
+
Log.w(TAG, "removeSink threw", t)
|
|
81
|
+
}
|
|
82
|
+
sink = null
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** On-handler. Submit EOS to the encoder. Returns `true` if queued. */
|
|
86
|
+
fun signalEndOfStream(muxerInstance: MediaMuxer): Boolean {
|
|
87
|
+
val enc = encoder ?: return false
|
|
88
|
+
return signalEoS(enc, muxerInstance)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** On-handler. Drain until BUFFER_FLAG_END_OF_STREAM or budget expires. */
|
|
92
|
+
fun drainAfterEoS(muxerInstance: MediaMuxer) {
|
|
93
|
+
val enc = encoder ?: return
|
|
94
|
+
drain(enc, muxerInstance, endOfStream = true)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** On-handler. Stop + release the encoder. */
|
|
98
|
+
fun stopAndRelease() {
|
|
99
|
+
try {
|
|
100
|
+
encoder?.stop()
|
|
101
|
+
} catch (t: Throwable) {
|
|
102
|
+
Log.w(TAG, "encoder.stop() threw", t)
|
|
103
|
+
}
|
|
104
|
+
try {
|
|
105
|
+
encoder?.release()
|
|
106
|
+
} catch (t: Throwable) {
|
|
107
|
+
Log.w(TAG, "encoder.release() threw", t)
|
|
108
|
+
}
|
|
109
|
+
encoder = null
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
fun logSummary() {
|
|
113
|
+
val durationMs = if (firstSamplePtsUs >= 0 && lastSamplePtsUs >= firstSamplePtsUs) {
|
|
114
|
+
(lastSamplePtsUs - firstSamplePtsUs) / 1000
|
|
115
|
+
} else {
|
|
116
|
+
-1
|
|
117
|
+
}
|
|
118
|
+
Log.i(
|
|
119
|
+
TAG,
|
|
120
|
+
"summary encoded=$framesEncoded appended=$samplesAppended scaled=$framesScaled dropped=$framesDropped firstPtsUs=$firstSamplePtsUs lastPtsUs=$lastSamplePtsUs durationMs=$durationMs",
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
private fun onFrameDelivered(frame: VideoFrame) {
|
|
125
|
+
// Sink already retained the frame on the WebRTC delivery thread;
|
|
126
|
+
// release once on the recorder handler after encoding.
|
|
127
|
+
handler.post {
|
|
128
|
+
try {
|
|
129
|
+
handleVideoFrameOnHandler(frame)
|
|
130
|
+
} finally {
|
|
131
|
+
frame.release()
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
private fun handleVideoFrameOnHandler(frame: VideoFrame) {
|
|
137
|
+
val muxerInstance = host.muxer ?: return
|
|
138
|
+
val width = frame.buffer.width
|
|
139
|
+
val height = frame.buffer.height
|
|
140
|
+
if (width <= 0 || height <= 0) return
|
|
141
|
+
|
|
142
|
+
// Lazy-create the encoder on the first frame. Prefer the
|
|
143
|
+
// publisher's max video dimensions so the encoder is sized for the
|
|
144
|
+
// highest layer the SFU might ever forward; fall back to the
|
|
145
|
+
// first frame's actual dimensions when no target is supplied.
|
|
146
|
+
val (encW, encH) = resolveEncoderDimensions(
|
|
147
|
+
targetW = targetWidth,
|
|
148
|
+
targetH = targetHeight,
|
|
149
|
+
frameW = width,
|
|
150
|
+
frameH = height,
|
|
151
|
+
)
|
|
152
|
+
val enc = encoder ?: createEncoder(encW, encH) ?: return
|
|
153
|
+
|
|
154
|
+
// WebRTC's adaptive layers can change resolution mid-recording.
|
|
155
|
+
// The encoder's input slots are sized to its configured
|
|
156
|
+
// dimensions, so frames are rescaled instead of dropped.
|
|
157
|
+
// Aspect-ratio mismatches stretch (no crop) — in practice the
|
|
158
|
+
// adaptive layers preserve ratio.
|
|
159
|
+
val needsScale = (width != encoderWidth || height != encoderHeight)
|
|
160
|
+
val originNs = host.seedOriginNs(frame.timestampNs)
|
|
161
|
+
val ptsUs = ((frame.timestampNs - originNs) / 1000L).coerceAtLeast(0L)
|
|
162
|
+
|
|
163
|
+
if (!rotationApplied) {
|
|
164
|
+
rotationApplied = true
|
|
165
|
+
try {
|
|
166
|
+
muxerInstance.setOrientationHint(((frame.rotation % 360) + 360) % 360)
|
|
167
|
+
} catch (t: Throwable) {
|
|
168
|
+
Log.w(TAG, "setOrientationHint failed", t)
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Both branches end with a buffer the caller owns and must
|
|
173
|
+
// release: `cropAndScale` produces a new ref-counted buffer,
|
|
174
|
+
// and the no-scale branch retains the original. Every exit
|
|
175
|
+
// path below calls `sourceBuffer.release()`.
|
|
176
|
+
val sourceBuffer: VideoFrame.Buffer = if (needsScale) {
|
|
177
|
+
framesScaled++
|
|
178
|
+
try {
|
|
179
|
+
frame.buffer.cropAndScale(0, 0, width, height, encoderWidth, encoderHeight)
|
|
180
|
+
} catch (t: Throwable) {
|
|
181
|
+
Log.e(TAG, "cropAndScale failed", t)
|
|
182
|
+
framesDropped++
|
|
183
|
+
return
|
|
184
|
+
}
|
|
185
|
+
} else {
|
|
186
|
+
frame.buffer.also { it.retain() }
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
val i420 = sourceBuffer.toI420()
|
|
190
|
+
if (i420 == null) {
|
|
191
|
+
sourceBuffer.release()
|
|
192
|
+
framesDropped++
|
|
193
|
+
return
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
val inputIndex = try {
|
|
197
|
+
enc.dequeueInputBuffer(EncoderConstants.DEQUEUE_TIMEOUT_US)
|
|
198
|
+
} catch (t: Throwable) {
|
|
199
|
+
Log.e(TAG, "dequeueInputBuffer threw", t)
|
|
200
|
+
i420.release()
|
|
201
|
+
sourceBuffer.release()
|
|
202
|
+
framesDropped++
|
|
203
|
+
return
|
|
204
|
+
}
|
|
205
|
+
if (inputIndex < 0) {
|
|
206
|
+
i420.release()
|
|
207
|
+
sourceBuffer.release()
|
|
208
|
+
framesDropped++
|
|
209
|
+
return
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// The codec's Image exposes each plane's actual `rowStride` /
|
|
213
|
+
// `pixelStride`, so libyuv can write into the slot honouring
|
|
214
|
+
// whatever alignment the hardware needs. A tightly-packed
|
|
215
|
+
// ByteBuffer would produce green chroma + grey Y banding
|
|
216
|
+
// whenever the encoder pads rows or slice height.
|
|
217
|
+
val image = enc.getInputImage(inputIndex)
|
|
218
|
+
val bytesQueued = if (image != null) {
|
|
219
|
+
try {
|
|
220
|
+
writeI420ToCodecImage(i420, image, encoderWidth, encoderHeight)
|
|
221
|
+
} catch (t: Throwable) {
|
|
222
|
+
Log.e(TAG, "writeI420ToCodecImage failed", t)
|
|
223
|
+
-1
|
|
224
|
+
}
|
|
225
|
+
} else {
|
|
226
|
+
-1
|
|
227
|
+
}
|
|
228
|
+
i420.release()
|
|
229
|
+
sourceBuffer.release()
|
|
230
|
+
|
|
231
|
+
if (bytesQueued <= 0) {
|
|
232
|
+
// Release the codec slot without queueing real data.
|
|
233
|
+
enc.queueInputBuffer(inputIndex, 0, 0, ptsUs, 0)
|
|
234
|
+
framesDropped++
|
|
235
|
+
return
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
enc.queueInputBuffer(inputIndex, 0, bytesQueued, ptsUs, 0)
|
|
239
|
+
framesEncoded++
|
|
240
|
+
|
|
241
|
+
drain(enc, muxerInstance, endOfStream = false)
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Converts an I420 frame to NV12 directly into the codec's `Image`
|
|
246
|
+
* plane buffers via libyuv. For NV12 semi-planar, `planes[1]` is
|
|
247
|
+
* the U-byte view of the UV plane and its underlying buffer is a
|
|
248
|
+
* contiguous U,V,U,V,… byte sequence — exactly what `I420ToNV12`
|
|
249
|
+
* writes, so it can be passed directly as `dstUV`. libyuv honours
|
|
250
|
+
* the supplied row strides, handling any encoder padding
|
|
251
|
+
* automatically.
|
|
252
|
+
*
|
|
253
|
+
* Returns the logical NV12 frame size (`width * height * 3 / 2`).
|
|
254
|
+
* NOT the strided sum: `queueInputBuffer`'s underlying input
|
|
255
|
+
* buffer is sized to the natural frame, and passing the strided
|
|
256
|
+
* value would crash with `IllegalArgumentException: buffer offset
|
|
257
|
+
* and size goes beyond the capacity`.
|
|
258
|
+
*/
|
|
259
|
+
private fun writeI420ToCodecImage(
|
|
260
|
+
i420: VideoFrame.I420Buffer,
|
|
261
|
+
image: android.media.Image,
|
|
262
|
+
width: Int,
|
|
263
|
+
height: Int,
|
|
264
|
+
): Int {
|
|
265
|
+
val planes = image.planes
|
|
266
|
+
if (planes.size < 3) return -1
|
|
267
|
+
|
|
268
|
+
val planeY = planes[0]
|
|
269
|
+
val planeUV = planes[1]
|
|
270
|
+
try {
|
|
271
|
+
org.webrtc.YuvHelper.I420ToNV12(
|
|
272
|
+
i420.dataY, i420.strideY,
|
|
273
|
+
i420.dataU, i420.strideU,
|
|
274
|
+
i420.dataV, i420.strideV,
|
|
275
|
+
planeY.buffer, planeY.rowStride,
|
|
276
|
+
planeUV.buffer, planeUV.rowStride,
|
|
277
|
+
width, height,
|
|
278
|
+
)
|
|
279
|
+
} catch (t: Throwable) {
|
|
280
|
+
Log.e(TAG, "YuvHelper.I420ToNV12 failed", t)
|
|
281
|
+
return -1
|
|
282
|
+
}
|
|
283
|
+
return width * height * 3 / 2
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Picks the encoder dimensions, preferring the caller-supplied
|
|
288
|
+
* `targetW`/`targetH` (publisher's max video publish dimension) but
|
|
289
|
+
* oriented to match the actual frame buffer. Publish options are
|
|
290
|
+
* expressed in WebRTC's canonical landscape form; the buffer may
|
|
291
|
+
* be portrait. When they disagree, swap the target axes so the
|
|
292
|
+
* encoder slot is in the same orientation as the frames flowing
|
|
293
|
+
* through it. Falls back to the frame's own dimensions if no
|
|
294
|
+
* target was supplied (target ≤ 0).
|
|
295
|
+
*/
|
|
296
|
+
private fun resolveEncoderDimensions(
|
|
297
|
+
targetW: Int,
|
|
298
|
+
targetH: Int,
|
|
299
|
+
frameW: Int,
|
|
300
|
+
frameH: Int,
|
|
301
|
+
): Pair<Int, Int> {
|
|
302
|
+
if (targetW <= 0 || targetH <= 0) return frameW to frameH
|
|
303
|
+
|
|
304
|
+
val framePortrait = frameH > frameW
|
|
305
|
+
val targetPortrait = targetH > targetW
|
|
306
|
+
return if (framePortrait == targetPortrait) {
|
|
307
|
+
targetW to targetH
|
|
308
|
+
} else {
|
|
309
|
+
targetH to targetW
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
private fun createEncoder(width: Int, height: Int): MediaCodec? {
|
|
314
|
+
// Without KEY_MAX_INPUT_SIZE MediaCodec picks a small default
|
|
315
|
+
// (~64 KB) and `put(nv12)` overflows at any non-trivial size.
|
|
316
|
+
val nv12FrameSize = width * height * 3 / 2
|
|
317
|
+
val format = MediaFormat.createVideoFormat(MIME, width, height).apply {
|
|
318
|
+
setInteger(
|
|
319
|
+
MediaFormat.KEY_COLOR_FORMAT,
|
|
320
|
+
MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420SemiPlanar,
|
|
321
|
+
)
|
|
322
|
+
setInteger(MediaFormat.KEY_BIT_RATE, BIT_RATE)
|
|
323
|
+
setInteger(MediaFormat.KEY_FRAME_RATE, FRAME_RATE)
|
|
324
|
+
setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, I_FRAME_INTERVAL_SECS)
|
|
325
|
+
setInteger(MediaFormat.KEY_MAX_INPUT_SIZE, nv12FrameSize)
|
|
326
|
+
// Baseline profile suppresses B-frames. With B-frames the
|
|
327
|
+
// output `presentationTimeUs` arrives in coded (DTS) order
|
|
328
|
+
// and MediaMuxer silently truncates the file's reported
|
|
329
|
+
// duration at the first non-monotonic transition. Level 3.1
|
|
330
|
+
// covers up to 720p30, well above the SFU loopback range.
|
|
331
|
+
setInteger(
|
|
332
|
+
MediaFormat.KEY_PROFILE,
|
|
333
|
+
MediaCodecInfo.CodecProfileLevel.AVCProfileBaseline,
|
|
334
|
+
)
|
|
335
|
+
setInteger(
|
|
336
|
+
MediaFormat.KEY_LEVEL,
|
|
337
|
+
MediaCodecInfo.CodecProfileLevel.AVCLevel31,
|
|
338
|
+
)
|
|
339
|
+
// API 30+: low-latency encode = no reorder. Harmless on
|
|
340
|
+
// older API levels (key ignored).
|
|
341
|
+
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.R) {
|
|
342
|
+
setInteger(MediaFormat.KEY_LATENCY, 1)
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
return try {
|
|
346
|
+
val enc = MediaCodec.createEncoderByType(MIME)
|
|
347
|
+
enc.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE)
|
|
348
|
+
enc.start()
|
|
349
|
+
encoder = enc
|
|
350
|
+
encoderWidth = width
|
|
351
|
+
encoderHeight = height
|
|
352
|
+
// INVARIANT: the host's "pending pipelines" counter must
|
|
353
|
+
// stay positive for this pipeline until INFO_OUTPUT_FORMAT_CHANGED
|
|
354
|
+
// has fired and `muxer.addTrack(video)` has been called.
|
|
355
|
+
// Reporting onTrackAdded() here would let the muxer start
|
|
356
|
+
// before the video track was added, and a later `addTrack`
|
|
357
|
+
// would crash with "Muxer is not initialized".
|
|
358
|
+
enc
|
|
359
|
+
} catch (t: Throwable) {
|
|
360
|
+
Log.e(TAG, "failed to create H.264 encoder", t)
|
|
361
|
+
host.onFatalError(t)
|
|
362
|
+
null
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Queues a zero-length input buffer with `BUFFER_FLAG_END_OF_STREAM`.
|
|
368
|
+
* Drains output between input attempts so the encoder's input
|
|
369
|
+
* slots can free up — a polling-only loop deadlocks when output
|
|
370
|
+
* queues are full. Returns `true` only if the marker was
|
|
371
|
+
* successfully queued; the caller skips the EOS drain otherwise so
|
|
372
|
+
* the handler doesn't hang waiting for a marker that won't arrive.
|
|
373
|
+
*/
|
|
374
|
+
private fun signalEoS(enc: MediaCodec, muxerInstance: MediaMuxer): Boolean {
|
|
375
|
+
repeat(EncoderConstants.EOS_INPUT_RETRIES) {
|
|
376
|
+
val idx = try {
|
|
377
|
+
enc.dequeueInputBuffer(EncoderConstants.DEQUEUE_TIMEOUT_US)
|
|
378
|
+
} catch (t: Throwable) {
|
|
379
|
+
Log.w(TAG, "dequeueInputBuffer during EOS threw", t)
|
|
380
|
+
return false
|
|
381
|
+
}
|
|
382
|
+
if (idx >= 0) {
|
|
383
|
+
enc.queueInputBuffer(
|
|
384
|
+
idx, 0, 0, 0L,
|
|
385
|
+
MediaCodec.BUFFER_FLAG_END_OF_STREAM,
|
|
386
|
+
)
|
|
387
|
+
return true
|
|
388
|
+
}
|
|
389
|
+
// Keep output flowing so input slots can be released.
|
|
390
|
+
try {
|
|
391
|
+
drain(enc, muxerInstance, endOfStream = false)
|
|
392
|
+
} catch (t: Throwable) {
|
|
393
|
+
Log.w(TAG, "drainEncoder during EOS retry threw", t)
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
Log.w(TAG, "could not queue EOS — skipping EOS drain to avoid hang")
|
|
397
|
+
return false
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
private fun drain(
|
|
401
|
+
enc: MediaCodec,
|
|
402
|
+
muxerInstance: MediaMuxer,
|
|
403
|
+
endOfStream: Boolean,
|
|
404
|
+
) {
|
|
405
|
+
val info = MediaCodec.BufferInfo()
|
|
406
|
+
val timeoutUs =
|
|
407
|
+
if (endOfStream) EncoderConstants.DEQUEUE_TIMEOUT_US_EOS else 0L
|
|
408
|
+
val deadlineMs = System.currentTimeMillis() +
|
|
409
|
+
if (endOfStream) EncoderConstants.EOS_DRAIN_BUDGET_MS else Long.MAX_VALUE
|
|
410
|
+
|
|
411
|
+
while (true) {
|
|
412
|
+
val outIndex = try {
|
|
413
|
+
enc.dequeueOutputBuffer(info, timeoutUs)
|
|
414
|
+
} catch (t: Throwable) {
|
|
415
|
+
Log.e(TAG, "dequeueOutputBuffer threw", t)
|
|
416
|
+
return
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
when {
|
|
420
|
+
outIndex == MediaCodec.INFO_TRY_AGAIN_LATER -> {
|
|
421
|
+
if (!endOfStream) return
|
|
422
|
+
if (System.currentTimeMillis() >= deadlineMs) {
|
|
423
|
+
Log.w(
|
|
424
|
+
TAG,
|
|
425
|
+
"EOS drain timed out without seeing BUFFER_FLAG_END_OF_STREAM — bailing out",
|
|
426
|
+
)
|
|
427
|
+
return
|
|
428
|
+
}
|
|
429
|
+
// During EOS keep polling until the marker arrives.
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
outIndex == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED -> {
|
|
433
|
+
if (formatLocked) {
|
|
434
|
+
Log.w(TAG, "output format changed twice — ignoring")
|
|
435
|
+
continue
|
|
436
|
+
}
|
|
437
|
+
val newIndex = muxerInstance.addTrack(enc.outputFormat)
|
|
438
|
+
trackIndex = newIndex
|
|
439
|
+
formatLocked = true
|
|
440
|
+
host.onTrackAdded()
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
outIndex >= 0 -> {
|
|
444
|
+
val out = enc.getOutputBuffer(outIndex)
|
|
445
|
+
if (out != null && info.size > 0 && host.muxerStarted &&
|
|
446
|
+
trackIndex >= 0 &&
|
|
447
|
+
info.flags and MediaCodec.BUFFER_FLAG_CODEC_CONFIG == 0
|
|
448
|
+
) {
|
|
449
|
+
out.position(info.offset)
|
|
450
|
+
out.limit(info.offset + info.size)
|
|
451
|
+
try {
|
|
452
|
+
muxerInstance.writeSampleData(trackIndex, out, info)
|
|
453
|
+
samplesAppended++
|
|
454
|
+
if (firstSamplePtsUs < 0 || info.presentationTimeUs < firstSamplePtsUs) {
|
|
455
|
+
firstSamplePtsUs = info.presentationTimeUs
|
|
456
|
+
}
|
|
457
|
+
if (info.presentationTimeUs > lastSamplePtsUs) {
|
|
458
|
+
lastSamplePtsUs = info.presentationTimeUs
|
|
459
|
+
}
|
|
460
|
+
} catch (t: Throwable) {
|
|
461
|
+
Log.e(TAG, "writeSampleData failed", t)
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
enc.releaseOutputBuffer(outIndex, false)
|
|
465
|
+
if (info.flags and MediaCodec.BUFFER_FLAG_END_OF_STREAM != 0) return
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
if (!endOfStream && outIndex < 0) return
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
@@ -18,8 +18,8 @@ var _hooks = require("../../../hooks");
|
|
|
18
18
|
var _ScreenShareOverlay = require("../../utility/ScreenShareOverlay");
|
|
19
19
|
var _RTCViewPipIOS = require("./RTCViewPipIOS");
|
|
20
20
|
var _PrevLibDetection = require("../../../modules/call-manager/PrevLibDetection");
|
|
21
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
22
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
22
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
23
23
|
const CallContent = ({
|
|
24
24
|
onHangupCallHandler,
|
|
25
25
|
CallParticipantsList,
|
|
@@ -53,13 +53,39 @@ const CallContent = ({
|
|
|
53
53
|
useLocalParticipant
|
|
54
54
|
} = (0, _videoReactBindings.useCallStateHooks)();
|
|
55
55
|
(0, _hooks.useAutoEnterPiPEffect)(disablePictureInPicture);
|
|
56
|
-
|
|
56
|
+
|
|
57
|
+
// CallContent only needs to know whether to show the floating view (0 / 1-2 / 3+
|
|
58
|
+
// remote participants) and the single participant to render in it. Storing a count
|
|
59
|
+
// bucket plus that one participant - instead of the whole array - means CallContent
|
|
60
|
+
// re-renders only on bucket-boundary crossings, not on every debounced emission.
|
|
61
|
+
const [floatingViewState, setFloatingViewState] = (0, _react.useState)(() => {
|
|
62
|
+
const remote = call?.state.remoteParticipants ?? [];
|
|
63
|
+
return {
|
|
64
|
+
remoteCountBucket: Math.min(remote.length, 3),
|
|
65
|
+
firstRemoteParticipant: remote.length === 1 ? remote[0] : undefined
|
|
66
|
+
};
|
|
67
|
+
});
|
|
57
68
|
(0, _react.useEffect)(() => {
|
|
58
69
|
if (!call) {
|
|
59
|
-
|
|
70
|
+
setFloatingViewState({
|
|
71
|
+
remoteCountBucket: 0,
|
|
72
|
+
firstRemoteParticipant: undefined
|
|
73
|
+
});
|
|
60
74
|
return;
|
|
61
75
|
}
|
|
62
|
-
const sub = call.state.remoteParticipants$.pipe((0, _rxjs.debounceTime)(300)).subscribe(
|
|
76
|
+
const sub = call.state.remoteParticipants$.pipe((0, _rxjs.debounceTime)(300)).subscribe(remoteParticipants => {
|
|
77
|
+
const remoteCountBucket = Math.min(remoteParticipants.length, 3);
|
|
78
|
+
const firstRemoteParticipant = remoteParticipants.length === 1 ? remoteParticipants[0] : undefined;
|
|
79
|
+
setFloatingViewState(prev => {
|
|
80
|
+
if (prev.remoteCountBucket === remoteCountBucket && prev.firstRemoteParticipant === firstRemoteParticipant) {
|
|
81
|
+
return prev;
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
remoteCountBucket,
|
|
85
|
+
firstRemoteParticipant
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
});
|
|
63
89
|
return () => sub.unsubscribe();
|
|
64
90
|
}, [call]);
|
|
65
91
|
const localParticipant = useLocalParticipant();
|
|
@@ -67,25 +93,28 @@ const CallContent = ({
|
|
|
67
93
|
const hasScreenShare = useHasOngoingScreenShare();
|
|
68
94
|
const showSpotlightLayout = hasScreenShare || layout === 'spotlight';
|
|
69
95
|
(0, _react.useEffect)(() => {
|
|
70
|
-
if (isInPiPMode
|
|
71
|
-
|
|
72
|
-
|
|
96
|
+
if (!isInPiPMode || _reactNative.Platform.OS !== 'android') return;
|
|
97
|
+
const unsubFunc = call?.on('call.ended', () => {
|
|
98
|
+
_videoClient.videoLoggerSystem.getLogger('CallContent').debug(`exiting PiP mode due to call.ended`);
|
|
99
|
+
_reactNative.NativeModules.StreamVideoReactNative.exitPipMode();
|
|
100
|
+
});
|
|
101
|
+
const subscription = call?.state.callingState$.subscribe(state => {
|
|
102
|
+
if (state === _videoClient.CallingState.LEFT) {
|
|
103
|
+
_videoClient.videoLoggerSystem.getLogger('CallContent').debug(`exiting PiP mode due to callingState: LEFT`);
|
|
73
104
|
_reactNative.NativeModules.StreamVideoReactNative.exitPipMode();
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
});
|
|
81
|
-
return () => {
|
|
82
|
-
unsubFunc?.();
|
|
83
|
-
subscription?.unsubscribe();
|
|
84
|
-
};
|
|
85
|
-
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
return () => {
|
|
108
|
+
unsubFunc?.();
|
|
109
|
+
subscription?.unsubscribe();
|
|
110
|
+
};
|
|
86
111
|
}, [isInPiPMode, call]);
|
|
87
|
-
const
|
|
88
|
-
|
|
112
|
+
const {
|
|
113
|
+
remoteCountBucket,
|
|
114
|
+
firstRemoteParticipant
|
|
115
|
+
} = floatingViewState;
|
|
116
|
+
const showFloatingView = !showSpotlightLayout && !isInPiPMode && remoteCountBucket > 0 && remoteCountBucket < 3;
|
|
117
|
+
const isRemoteParticipantInFloatingView = showFloatingView && showRemoteParticipantInFloatingView && remoteCountBucket === 1;
|
|
89
118
|
|
|
90
119
|
/**
|
|
91
120
|
* This hook is used to handle IncallManager specs of the application.
|
|
@@ -101,9 +130,10 @@ const CallContent = ({
|
|
|
101
130
|
prevInCallManager.stop();
|
|
102
131
|
};
|
|
103
132
|
}
|
|
133
|
+
return undefined;
|
|
104
134
|
}, []);
|
|
105
135
|
const handleFloatingViewParticipantSwitch = () => {
|
|
106
|
-
if (
|
|
136
|
+
if (remoteCountBucket !== 1) {
|
|
107
137
|
return;
|
|
108
138
|
}
|
|
109
139
|
setShowRemoteParticipantInFloatingView(prevState => !prevState);
|
|
@@ -133,34 +163,49 @@ const CallContent = ({
|
|
|
133
163
|
ScreenShareOverlay,
|
|
134
164
|
supportedReactions
|
|
135
165
|
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
166
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
167
|
+
children: [!disablePictureInPicture && /*#__PURE__*/(0, _jsxRuntime.jsx)(_RTCViewPipIOS.RTCViewPipIOS, {
|
|
168
|
+
includeLocalParticipantVideo: iOSPiPIncludeLocalParticipantVideo,
|
|
169
|
+
mirror: mirror
|
|
170
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
171
|
+
style: [styles.container, landscape ? landscapeStyles.row : landscapeStyles.column, callContent.container],
|
|
172
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
173
|
+
style: [styles.content, callContent.callParticipantsContainer],
|
|
174
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
175
|
+
style: [_reactNative.StyleSheet.absoluteFill, styles.view, callContent.topContainer]
|
|
176
|
+
// "box-none" disallows the container view to be not take up touches
|
|
177
|
+
// and allows only the top and floating view (its child views) to take up the touches
|
|
178
|
+
,
|
|
179
|
+
pointerEvents: "box-none",
|
|
180
|
+
children: showFloatingView && FloatingParticipantView && /*#__PURE__*/(0, _jsxRuntime.jsx)(FloatingParticipantView, {
|
|
181
|
+
participant: isRemoteParticipantInFloatingView ? firstRemoteParticipant : localParticipant,
|
|
182
|
+
onPressHandler: handleFloatingViewParticipantSwitch,
|
|
183
|
+
supportedReactions: supportedReactions,
|
|
184
|
+
objectFit: "cover",
|
|
185
|
+
mirror: mirror,
|
|
186
|
+
...participantViewProps
|
|
187
|
+
})
|
|
188
|
+
}), showSpotlightLayout ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CallLayout.CallParticipantsSpotlight, {
|
|
189
|
+
...callParticipantsSpotlightProps
|
|
190
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_CallLayout.CallParticipantsGrid, {
|
|
191
|
+
...callParticipantsGridProps
|
|
192
|
+
})]
|
|
193
|
+
}), !isInPiPMode && CallControls && /*#__PURE__*/(0, _jsxRuntime.jsx)(CallControls, {
|
|
194
|
+
onHangupCallHandler: onHangupCallHandler,
|
|
195
|
+
landscape: landscape
|
|
196
|
+
})]
|
|
197
|
+
})]
|
|
198
|
+
});
|
|
162
199
|
};
|
|
163
200
|
exports.CallContent = CallContent;
|
|
201
|
+
const landscapeStyles = _reactNative.StyleSheet.create({
|
|
202
|
+
row: {
|
|
203
|
+
flexDirection: 'row'
|
|
204
|
+
},
|
|
205
|
+
column: {
|
|
206
|
+
flexDirection: 'column'
|
|
207
|
+
}
|
|
208
|
+
});
|
|
164
209
|
const useStyles = () => {
|
|
165
210
|
const {
|
|
166
211
|
theme
|