From b8df2e4c5c0b3f33fc30396a0890d32debde0fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaquim=20Sta=CC=88hli?= Date: Wed, 9 Oct 2024 15:31:38 +0200 Subject: [PATCH] Use texture instead of Surface --- .../pillarbox/demo/ui/showcases/layouts/OptimizedStory.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/showcases/layouts/OptimizedStory.kt b/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/showcases/layouts/OptimizedStory.kt index c9b9af454..c5d2e0b4a 100644 --- a/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/showcases/layouts/OptimizedStory.kt +++ b/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/showcases/layouts/OptimizedStory.kt @@ -43,6 +43,7 @@ import ch.srgssr.pillarbox.player.currentPositionAsFlow import ch.srgssr.pillarbox.player.playbackStateAsFlow import ch.srgssr.pillarbox.ui.ScaleMode import ch.srgssr.pillarbox.ui.widget.player.PlayerSurface +import ch.srgssr.pillarbox.ui.widget.player.SurfaceType import kotlinx.coroutines.delay import kotlinx.coroutines.flow.map import kotlin.time.Duration.Companion.milliseconds @@ -86,6 +87,7 @@ fun OptimizedStory(storyViewModel: StoryViewModel = viewModel()) { PlayerSurface( modifier = Modifier.fillMaxHeight(), scaleMode = ScaleMode.Crop, + surfaceType = SurfaceType.Texture, player = player, defaultAspectRatio = 9 / 16f, )