mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Fix switching to AVPlayer in fullscreen
This commit is contained in:
@@ -353,9 +353,11 @@ final class AVPlayerBackend: PlayerBackend {
|
||||
}
|
||||
|
||||
self.model.lastSkipped = segment
|
||||
self.model.handleOnPlayStream(stream)
|
||||
self.model.play()
|
||||
}
|
||||
} else {
|
||||
self.model.handleOnPlayStream(stream)
|
||||
self.model.play()
|
||||
}
|
||||
}
|
||||
@@ -486,7 +488,9 @@ final class AVPlayerBackend: PlayerBackend {
|
||||
if self.model.activeBackend == .appleAVPlayer,
|
||||
self.isAutoplaying(playerItem)
|
||||
{
|
||||
self.model.updateAspectRatio()
|
||||
if model.aspectRatio != aspectRatio {
|
||||
self.model.updateAspectRatio()
|
||||
}
|
||||
|
||||
if self.startPictureInPictureOnPlay,
|
||||
let controller = self.model.pipController,
|
||||
@@ -708,6 +712,17 @@ final class AVPlayerBackend: PlayerBackend {
|
||||
} else {
|
||||
stopMusicMode()
|
||||
}
|
||||
|
||||
#if os(iOS)
|
||||
ControlOverlaysModel.shared.hide()
|
||||
model.navigation.presentingPlaybackSettings = false
|
||||
|
||||
if model.playingFullScreen {
|
||||
model.onPlayStream.append { _ in
|
||||
self.controller.enterFullScreen(animated: true)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
var isStartingPiP: Bool {
|
||||
|
@@ -267,9 +267,11 @@ final class MPVBackend: PlayerBackend {
|
||||
|
||||
self.model.lastSkipped = segment
|
||||
self.play()
|
||||
self.model.handleOnPlayStream(stream)
|
||||
}
|
||||
} else {
|
||||
self.play()
|
||||
self.model.handleOnPlayStream(stream)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user