feat(player): add controls visibility handling to PlayerGesturesLayer

This commit is contained in:
2026-06-19 15:02:10 +02:00
parent f6c465656e
commit 34340c2bd4
2 changed files with 3 additions and 0 deletions

View File

@@ -154,6 +154,7 @@ fun PlayerScreen(
PlayerGesturesLayer(
modifier = Modifier.align(Alignment.BottomCenter),
controlsVisible = controlsVisible,
onTap = ::onScreenTap,
onDoubleTapRight = { viewModel.seekBy(30_000) },
onDoubleTapLeft = { viewModel.seekBy(-10_000) },

View File

@@ -22,6 +22,7 @@ import kotlin.math.abs
@Composable
fun PlayerGesturesLayer(
modifier: Modifier = Modifier,
controlsVisible: Boolean,
onTap: () -> Unit,
onDoubleTapCenter: () -> Unit,
onDoubleTapRight: () -> Unit,
@@ -104,6 +105,7 @@ fun PlayerGesturesLayer(
}
DragDirection.VERTICAL -> {
change.consume()
if (controlsVisible) return@drag
val isLeftSide = startX < size.width / 2
if (isLeftSide) {
onVerticalDragLeft(delta.y)