fix: hide local video PiP when camera is disabled

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
This commit is contained in:
Claude
2026-04-02 14:55:36 +00:00
parent 31a3c06544
commit a1b2c785aa
@@ -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