Skip to content

Commit

Permalink
Remove red background
Browse files Browse the repository at this point in the history
  • Loading branch information
MGaetan89 committed Sep 30, 2024
1 parent 3b30c1c commit 83df4bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 83df4bc

Please sign in to comment.