mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-01-08 16:30:34 +00:00
player: seek to new index when given a new playqueue with a different index
This happens in the MediaBrowserServiceCompat flow (playing a playlist).
This commit is contained in:
parent
4e64b875dc
commit
22f2351ea0
@ -415,6 +415,10 @@ public final class Player implements PlaybackListener, Listener {
|
|||||||
== com.google.android.exoplayer2.Player.STATE_IDLE) {
|
== com.google.android.exoplayer2.Player.STATE_IDLE) {
|
||||||
simpleExoPlayer.prepare();
|
simpleExoPlayer.prepare();
|
||||||
}
|
}
|
||||||
|
if (playQueue.getIndex() != newQueue.getIndex()) {
|
||||||
|
simpleExoPlayer.seekTo(newQueue.getIndex(),
|
||||||
|
newQueue.getItem().getRecoveryPosition());
|
||||||
|
}
|
||||||
simpleExoPlayer.setPlayWhenReady(playWhenReady);
|
simpleExoPlayer.setPlayWhenReady(playWhenReady);
|
||||||
|
|
||||||
} else if (intent.getBooleanExtra(RESUME_PLAYBACK, false)
|
} else if (intent.getBooleanExtra(RESUME_PLAYBACK, false)
|
||||||
|
Loading…
Reference in New Issue
Block a user