Improve PiP

Fix #186
Fix #196
This commit is contained in:
Arkadiusz Fal
2022-08-26 22:17:21 +02:00
parent 99881ccc23
commit 60f38a80aa
13 changed files with 173 additions and 104 deletions

View File

@@ -169,7 +169,7 @@ final class MPVBackend: PlayerBackend {
stream.resolution != .unknown && stream.format != .av1
}
func playStream(_ stream: Stream, of video: Video, preservingTime: Bool, upgrading _: Bool) {
func playStream(_ stream: Stream, of video: Video, preservingTime: Bool, upgrading: Bool) {
#if !os(macOS)
if model.presentingPlayer {
UIApplication.shared.isIdleTimerDisabled = true
@@ -204,6 +204,7 @@ final class MPVBackend: PlayerBackend {
self.startClientUpdates()
if !preservingTime,
!upgrading,
let segment = self.model.sponsorBlock.segments.first,
self.model.lastSkipped.isNil
{
@@ -325,6 +326,8 @@ final class MPVBackend: PlayerBackend {
func closeItem() {
client?.pause()
client?.stop()
self.video = nil
self.stream = nil
}
func closePiP() {}