Skip to content

Commit

Permalink
Put the rewind/fastforward fallbacks back for bluetooth buttons and such
Browse files Browse the repository at this point in the history
  • Loading branch information
daneren2005 committed Jun 15, 2017
1 parent 807af83 commit a1f8a4e
Showing 1 changed file with 13 additions and 1 deletion.
Expand Up @@ -1209,6 +1209,14 @@ public synchronized void previous() {
return;
}

// If only one song, just skip within song
if(shouldFastForward()) {
rewind();
return;
} else if(playerState == PREPARING || playerState == PREPARED) {
return;
}

// Restart song if played more than five seconds.
if (getPlayerPosition() > 5000 || (index == 0 && getRepeatMode() != RepeatMode.ALL)) {
seekTo(0);
Expand All @@ -1228,7 +1236,11 @@ public synchronized void next(boolean forceCutoff) {
next(forceCutoff, false);
}
public synchronized void next(boolean forceCutoff, boolean forceStart) {
if(playerState == PREPARING || playerState == PREPARED) {
// If only one song, just skip within song
if(shouldFastForward()) {
fastForward();
return;
} else if(playerState == PREPARING || playerState == PREPARED) {
return;
}

Expand Down

0 comments on commit a1f8a4e

Please sign in to comment.