Support next/previous media keys
The "seek" buttons in my car send "next" and "previous" media key codes, rather than "fast forward" and "rewind", so update the playback service to recognize them. fixes #386 fixes #432
This commit is contained in:
parent
817769672a
commit
12660478a8
|
@ -310,9 +310,11 @@ public class PlaybackService extends Service {
|
|||
mediaPlayer.pause(true, true);
|
||||
}
|
||||
break;
|
||||
case KeyEvent.KEYCODE_MEDIA_NEXT:
|
||||
case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD:
|
||||
mediaPlayer.seekDelta(PlaybackController.DEFAULT_SEEK_DELTA);
|
||||
break;
|
||||
case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
|
||||
case KeyEvent.KEYCODE_MEDIA_REWIND:
|
||||
mediaPlayer.seekDelta(-PlaybackController.DEFAULT_SEEK_DELTA);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue