diff --git a/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackPage.kt b/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackPage.kt index be9511c4..e1c810cd 100644 --- a/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackPage.kt +++ b/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackPage.kt @@ -260,6 +260,30 @@ fun PlaybackPage( } } + // Subtitles + if (skipIndicatorDuration == 0L && currentItemPlayback.subtitleIndexEnabled) { + val maxSize by animateFloatAsState(if (controllerViewState.controlsVisible) .7f else 1f) + AndroidView( + factory = { context -> + SubtitleView(context).apply { + setUserDefaultStyle() + setUserDefaultTextSize() + } + }, + update = { + it.setCues(cues) + }, + onReset = { + it.setCues(null) + }, + modifier = + Modifier + .fillMaxSize(maxSize) + .align(Alignment.TopCenter) + .background(Color.Transparent), + ) + } + // The playback controls AnimatedVisibility( controllerViewState.controlsVisible, @@ -343,28 +367,6 @@ fun PlaybackPage( ) } - // Subtitles - if (!controllerViewState.controlsVisible && skipIndicatorDuration == 0L && currentItemPlayback.subtitleIndexEnabled) { - AndroidView( - factory = { context -> - SubtitleView(context).apply { - setUserDefaultStyle() - setUserDefaultTextSize() - } - }, - update = { - it.setCues(cues) - }, - onReset = { - it.setCues(null) - }, - modifier = - Modifier - .fillMaxSize() - .background(Color.Transparent), - ) - } - // Ask to skip intros, etc button AnimatedVisibility( showSegment,