-Fix restart button not working

This commit is contained in:
John Zhen M 2017-09-08 07:52:38 -07:00 committed by John Zhen Mo
parent 64997dbdbe
commit dcccda72ff
2 changed files with 2 additions and 1 deletions

View file

@ -695,6 +695,7 @@ public abstract class BasePlayer implements Player.EventListener,
if (!isPlaying()) audioManager.requestAudioFocus(this, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);
else audioManager.abandonAudioFocus(this);
if (getCurrentState() == STATE_COMPLETED) playQueue.setIndex(0);
simpleExoPlayer.setPlayWhenReady(!isPlaying());
}