Fixes for MPV in macOS

This commit is contained in:
Arkadiusz Fal
2022-02-27 21:31:17 +01:00
parent 12a7d8cfd6
commit 8e0a710a53
55 changed files with 691 additions and 245 deletions

View File

@@ -2,7 +2,9 @@ import AVFoundation
import Defaults
import Foundation
import MediaPlayer
import UIKit
#if !os(macOS)
import UIKit
#endif
final class AVPlayerBackend: PlayerBackend {
static let assetKeysToLoad = ["tracks", "playable", "duration"]
@@ -34,6 +36,7 @@ final class AVPlayerBackend: PlayerBackend {
}
private(set) var avPlayer = AVPlayer()
var controller: AppleAVPlayerViewController?
private var asset: AVURLAsset?