From a1b2c785aa0240b36a20b36c4e33b1b700effe17 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 14:55:36 +0000 Subject: [PATCH] fix: hide local video PiP when camera is disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the user disables video, the SurfaceViewRenderer kept showing the last captured frame (frozen). Now the local video PiP is only rendered when isVideoEnabled is true — when camera is off, the PiP disappears entirely revealing the black background. https://claude.ai/code/session_017hZm7yu7CzmcQgZGSaqSXS --- .../amethyst/ui/call/CallScreen.kt | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/CallScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/CallScreen.kt index 1bead45444..1f47e69bcf 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/CallScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/CallScreen.kt @@ -374,18 +374,20 @@ private fun ConnectedCallUI( ) } - // Local video (small pip in corner) - localVideoTrack?.let { track -> - VideoRenderer( - videoTrack = track, - eglBase = callController?.getEglBase(), - modifier = - Modifier - .size(120.dp, 160.dp) - .align(Alignment.TopEnd) - .padding(16.dp), - mirror = true, - ) + // Local video (small pip in corner) — only when camera is active + if (isVideoEnabled) { + localVideoTrack?.let { track -> + VideoRenderer( + videoTrack = track, + eglBase = callController?.getEglBase(), + modifier = + Modifier + .size(120.dp, 160.dp) + .align(Alignment.TopEnd) + .padding(16.dp), + mirror = true, + ) + } } // If no video, show avatar