1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-14 06:10:32 +05:30

Don't switch to MPV after closing PiP

This commit is contained in:
Arkadiusz Fal 2022-08-19 00:38:09 +02:00
parent a7607693f8
commit 46b1ef9530
4 changed files with 0 additions and 17 deletions

View File

@ -56,7 +56,6 @@ final class AVPlayerBackend: PlayerBackend {
private(set) var avPlayer = AVPlayer()
var controller: AppleAVPlayerViewController?
var startPictureInPictureOnPlay = false
var switchToMPVOnPipClose = false
private var asset: AVURLAsset?
private var composition = AVMutableComposition()

View File

@ -24,17 +24,6 @@ final class PiPDelegate: NSObject, AVPictureInPictureControllerDelegate {
return
}
if player.avPlayerBackend.switchToMPVOnPipClose,
!player.currentItem.isNil
{
DispatchQueue.main.async {
player.avPlayerBackend.switchToMPVOnPipClose = false
player.saveTime {
player.changeActiveBackend(from: .appleAVPlayer, to: .mpv)
}
}
}
player.playingInPictureInPicture = false
}

View File

@ -132,10 +132,6 @@ final class PlayerControlsModel: ObservableObject {
}
func startPiP(startImmediately: Bool = true) {
if player.activeBackend == .mpv {
player.avPlayerBackend.switchToMPVOnPipClose = true
}
#if !os(macOS)
player.exitFullScreen()
#endif

View File

@ -868,7 +868,6 @@ final class PlayerModel: ObservableObject {
if musicMode {
if playingInPictureInPicture {
avPlayerBackend.pause()
avPlayerBackend.switchToMPVOnPipClose = false
closePiP()
}
changeActiveBackend(from: .appleAVPlayer, to: .mpv)