mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 16:33:27 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user