From 83df4bc197cb2383cbf0ae3656f026fbad14d8a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Muller?= Date: Mon, 30 Sep 2024 08:35:03 +0200 Subject: [PATCH] Remove red background --- .../demo/ui/showcases/layouts/OptimizedStory.kt | 13 +++++++------ .../demo/ui/showcases/layouts/StoryViewModel.kt | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) 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 0aaf08e7e..da3df44ed 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 @@ -80,19 +80,20 @@ fun OptimizedStory(storyViewModel: StoryViewModel = viewModel()) { }.collectAsState(false) Box( - Modifier - .fillMaxSize() - .background(color = Color.Red) + modifier = Modifier.fillMaxSize(), ) { PlayerSurface( modifier = Modifier.fillMaxHeight(), scaleMode = ScaleMode.Crop, player = player, - defaultAspectRatio = 9 / 16f + defaultAspectRatio = 9 / 16f, ) if (isBuffering) { - CircularProgressIndicator(color = Color.White, modifier = Modifier.align(Alignment.Center)) + CircularProgressIndicator( + color = Color.White, + modifier = Modifier.align(Alignment.Center), + ) } LinearProgressIndicator( @@ -135,7 +136,7 @@ private fun PagerIndicator( repeat(pageCount) { index -> val dotColor by animateColorAsState( targetValue = if (currentPage == index) PrimaryComponentColor else SecondaryComponentColor, - label = "indicator-animation" + label = "indicator-animation", ) Box( diff --git a/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/showcases/layouts/StoryViewModel.kt b/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/showcases/layouts/StoryViewModel.kt index 3405774ab..ffb595edf 100644 --- a/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/showcases/layouts/StoryViewModel.kt +++ b/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/showcases/layouts/StoryViewModel.kt @@ -34,9 +34,9 @@ class StoryViewModel(application: Application) : AndroidViewModel(application) { bufferDurations = PillarboxLoadControl.BufferDurations( minBufferDuration = 5.seconds, maxBufferDuration = 20.seconds, - bufferForPlayback = 500.milliseconds + bufferForPlayback = 500.milliseconds, ), - allocator = DefaultAllocator(false, C.DEFAULT_BUFFER_SEGMENT_SIZE) + allocator = DefaultAllocator(false, C.DEFAULT_BUFFER_SEGMENT_SIZE), ) private val preloadManager = PillarboxPreloadManager( context = application,