Fix:Android bluetooth controls for fast forward/rewind

This commit is contained in:
advplyr 2023-02-26 15:56:39 -06:00
parent 4fb9201823
commit 3ad1042b13

View file

@ -192,13 +192,11 @@ class MediaSessionCallback(var playerNotificationService:PlayerNotificationServi
} }
KeyEvent.KEYCODE_MEDIA_FAST_FORWARD -> { KeyEvent.KEYCODE_MEDIA_FAST_FORWARD -> {
Log.d(tag, "handleCallMediaButton: Media Fast Forward") Log.d(tag, "handleCallMediaButton: Media Fast Forward")
if (0 == mediaButtonClickCount) playerNotificationService.jumpForward() playerNotificationService.jumpForward()
handleMediaButtonClickCount()
} }
KeyEvent.KEYCODE_MEDIA_REWIND -> { KeyEvent.KEYCODE_MEDIA_REWIND -> {
Log.d(tag, "handleCallMediaButton: Media Rewind") Log.d(tag, "handleCallMediaButton: Media Rewind")
if (0 == mediaButtonClickCount) playerNotificationService.jumpBackward() playerNotificationService.jumpBackward()
handleMediaButtonClickCount()
} }
} }
} }
@ -234,12 +232,6 @@ class MediaSessionCallback(var playerNotificationService:PlayerNotificationServi
KeyEvent.KEYCODE_MEDIA_PREVIOUS -> { KeyEvent.KEYCODE_MEDIA_PREVIOUS -> {
playerNotificationService.jumpBackward() playerNotificationService.jumpBackward()
} }
KeyEvent.KEYCODE_MEDIA_FAST_FORWARD -> {
playerNotificationService.jumpForward()
}
KeyEvent.KEYCODE_MEDIA_REWIND -> {
playerNotificationService.jumpBackward()
}
KeyEvent.KEYCODE_MEDIA_STOP -> { KeyEvent.KEYCODE_MEDIA_STOP -> {
playerNotificationService.closePlayback() playerNotificationService.closePlayback()
} }