mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-11-15 14:24:59 +00:00
Merge pull request #7381 from litetex/prevent-automatic-replay-after-returning-from-background
Prevent automatic replay after returning from background
This commit is contained in:
commit
bd9dcfb28a
@ -857,10 +857,10 @@ public final class Player implements
|
||||
|
||||
final int queuePos = playQueue.getIndex();
|
||||
final long windowPos = simpleExoPlayer.getCurrentPosition();
|
||||
final long duration = simpleExoPlayer.getDuration();
|
||||
|
||||
if (windowPos > 0 && windowPos <= simpleExoPlayer.getDuration()) {
|
||||
setRecovery(queuePos, windowPos);
|
||||
}
|
||||
// No checks due to https://github.com/TeamNewPipe/NewPipe/pull/7195#issuecomment-962624380
|
||||
setRecovery(queuePos, Math.max(0, Math.min(windowPos, duration)));
|
||||
}
|
||||
|
||||
private void setRecovery(final int queuePos, final long windowPos) {
|
||||
|
Loading…
Reference in New Issue
Block a user