feat: do not show controls when using gesture for seeking.

This commit is contained in:
2026-02-16 19:28:25 +01:00
parent 98042b97ed
commit ebf70343ed
2 changed files with 3 additions and 9 deletions

View File

@@ -170,7 +170,7 @@ fun PlayerScreen(
}
AnimatedVisibility(
visible = controlsVisible || uiState.isBuffering || uiState.isEnded || uiState.error != null,
visible = controlsVisible || uiState.isEnded || uiState.error != null,
enter = fadeIn(),
exit = fadeOut()
) {

View File

@@ -65,12 +65,7 @@ class PlayerViewModel @Inject constructor(
error = state.error ?: dataErrorMessage
)
}
if (state.isPlaying) {
scheduleAutoHide()
} else {
showControls()
}
if (state.isEnded || state.isBuffering) {
if (state.isEnded) {
showControls()
}
}
@@ -174,16 +169,15 @@ class PlayerViewModel @Inject constructor(
fun togglePlayPause() {
playerManager.togglePlayPause()
showControls()
}
fun seekTo(positionMs: Long) {
playerManager.seekTo(positionMs)
scheduleAutoHide()
}
fun seekBy(deltaMs: Long) {
playerManager.seekBy(deltaMs)
scheduleAutoHide()
}
fun seekToLiveEdge() {