-
Notifications
You must be signed in to change notification settings - Fork 167
Open
Description
Hi Kyant — sorry for another question (slightly off topic).
Can LiquidGlass work reliably over video on Android?
At first, it seemed limited to TextureView-backed content (e.g., images).
When I tried applying the backdrop over a video view, I was getting heavy flickering and instability.
Update
I managed to make it stable over video 🎉
What worked for me was:
- Put the video inside a container that captures the backdrop using
layerBackdrop(sceneBackdrop) - Force a stable render path with
graphicsLayer { alpha = 0.999f }on theAndroidView - Add a touch-shield layer above the video (below menu/controls) so the video view doesn’t steal gestures(optional)
The key was forcing TextureView on PlayerView and properly exporting the backdrop layer so the glass samples from a stable surface.
Screen_Recording_2026021.mp4
Minimal sketch (real structure):
val sceneBackdrop: LayerBackdrop = rememberLayerBackdrop()
Box(Modifier.fillMaxSize()) {
// --- video layer ---
Box(
Modifier
.fillMaxSize()
.background(base)
.layerBackdrop(sceneBackdrop)
) {
AndroidView(
modifier = Modifier
.fillMaxSize()
.graphicsLayer { alpha = 0.999f },
factory = { youTubeView }
)
}
// --- touch shield ABOVE video, BELOW controls/menu ---
Box(
Modifier
.fillMaxSize()
.consumeAllTouches()
)
// ... controls/menu that use drawBackdrop(backdrop = sceneBackdrop) ...
}This removed the flickering and made the LiquidGlass sampling stable during playback.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels