Save playback state even if stream is finished and add isFinished()
This commit is contained in:
parent
e846f69e38
commit
360f5ac6f7
4 changed files with 38 additions and 13 deletions
|
|
@ -671,7 +671,11 @@ public final class Player implements
|
|||
//.doFinally()
|
||||
.subscribe(
|
||||
state -> {
|
||||
newQueue.setRecovery(newQueue.getIndex(), state.getProgressTime());
|
||||
if (!state.isFinished(newQueue.getItem().getDuration())) {
|
||||
// resume playback only if the stream was not played to the end
|
||||
newQueue.setRecovery(newQueue.getIndex(),
|
||||
state.getProgressTime());
|
||||
}
|
||||
initPlayback(newQueue, repeatMode, playbackSpeed, playbackPitch,
|
||||
playbackSkipSilence, playWhenReady, isMuted);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue