Add buttons to next video and restart video (fix #106)

Previous video requires rebuilding queue a little, maybe in the future
This commit is contained in:
Arkadiusz Fal
2022-05-29 17:50:54 +02:00
parent 8bab854986
commit 21b1f61da6
4 changed files with 38 additions and 10 deletions

View File

@@ -281,8 +281,12 @@ final class PlayerModel: ObservableObject {
}
func upgradeToStream(_ stream: Stream, force: Bool = false) {
guard let video = currentVideo else {
return
}
if !self.stream.isNil, force || self.stream != stream {
playStream(stream, of: currentVideo!, preservingTime: true, upgrading: true)
playStream(stream, of: video, preservingTime: true, upgrading: true)
}
}