mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-02-02 03:36:48 +01:00
Merged #226 into develop
This commit is contained in:
commit
4e6276c9c4
@ -432,6 +432,28 @@ public class PlaybackService extends Service {
|
|||||||
pause(true, true);
|
pause(true, true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD: {
|
||||||
|
int currentPos = getCurrentPositionSafe();
|
||||||
|
int duration = getDurationSafe();
|
||||||
|
|
||||||
|
if (currentPos != INVALID_TIME && duration != INVALID_TIME) {
|
||||||
|
if (currentPos < duration) {
|
||||||
|
seek(currentPos + 10000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case KeyEvent.KEYCODE_MEDIA_REWIND: {
|
||||||
|
int currentPos = getCurrentPositionSafe();
|
||||||
|
int duration = getDurationSafe();
|
||||||
|
|
||||||
|
if (currentPos != INVALID_TIME && duration != INVALID_TIME) {
|
||||||
|
if (currentPos > 10000) {
|
||||||
|
seek(currentPos - 10000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user