From 781e8484acae5119fc3e55a67c0c52fd1a1d5911 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 13 May 2026 11:30:59 -0400 Subject: [PATCH] force video box to be there when the video is still building --- .../amethyst/service/playback/composable/VideoView.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/playback/composable/VideoView.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/playback/composable/VideoView.kt index 97d3a2133..5df1c1324 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/playback/composable/VideoView.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/playback/composable/VideoView.kt @@ -22,7 +22,9 @@ package com.vitorpamplona.amethyst.service.playback.composable import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.aspectRatio +import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.size import androidx.compose.material3.IconButton @@ -146,6 +148,13 @@ fun VideoView( ImageUrlWithDownloadButton(url = videoUri, showImage = automaticallyStartPlayback) } } else { + // Sized backdrop while the MediaController IPC is in flight and ContentFrame + // hasn't mounted yet. Only emitted when the Box already has an aspectRatio + // modifier — fillMaxSize requires bounded constraints, which the ratio + // provides. Mirrors the DisplayBlurHash backdrop in the blurhash branch. + if (ratio != null) { + Spacer(Modifier.fillMaxSize()) + } VideoViewInner( videoUri = videoUri, mimeType = mimeType,