mirror of
https://gitlab.com/vyla-entertainment/TV.git
synced 2026-11-09 17:47:20 -05:00
fixed Ui controls on player
This commit is contained in:
@@ -408,7 +408,6 @@ fun PlayerScreen(
|
||||
if (event.type == KeyEventType.KeyDown) {
|
||||
val code = event.nativeKeyEvent.keyCode
|
||||
|
||||
// If controls are hidden, show them on any key press
|
||||
if (!areControlsVisible) {
|
||||
if (code == KeyEvent.KEYCODE_DPAD_CENTER) {
|
||||
if (exoPlayer.isPlaying) exoPlayer.pause() else exoPlayer.play()
|
||||
@@ -417,7 +416,6 @@ fun PlayerScreen(
|
||||
return@onKeyEvent true
|
||||
}
|
||||
|
||||
// Controls are visible - only handle media keys, let D-pad events pass through to buttons
|
||||
when (code) {
|
||||
KeyEvent.KEYCODE_MEDIA_PLAY -> {
|
||||
exoPlayer.play()
|
||||
@@ -451,11 +449,11 @@ fun PlayerScreen(
|
||||
}
|
||||
KeyEvent.KEYCODE_BACK -> {
|
||||
resetHideTimer()
|
||||
return@onKeyEvent false // Let BackHandler handle it
|
||||
return@onKeyEvent false
|
||||
}
|
||||
KeyEvent.KEYCODE_DPAD_CENTER -> {
|
||||
resetHideTimer()
|
||||
return@onKeyEvent false // Let the focused button handle it
|
||||
return@onKeyEvent false
|
||||
}
|
||||
}
|
||||
resetHideTimer()
|
||||
|
||||
Reference in New Issue
Block a user