feat: tvos support
This commit is contained in:
@@ -2,7 +2,7 @@ import Foundation
|
||||
import Libmpv
|
||||
import QuartzCore
|
||||
|
||||
#if os(iOS)
|
||||
#if os(iOS) || os(tvOS)
|
||||
import UIKit
|
||||
#elseif os(macOS)
|
||||
import Cocoa
|
||||
@@ -26,6 +26,8 @@ class MpvMetalLayer: CAMetalLayer {
|
||||
}
|
||||
|
||||
#if os(iOS)
|
||||
// wantsExtendedDynamicRangeContent is unavailable on tvOS as of SDK 26.4,
|
||||
// so this override only applies to iOS / macOS.
|
||||
@available(iOS 16.0, *)
|
||||
override var wantsExtendedDynamicRangeContent: Bool {
|
||||
get { super.wantsExtendedDynamicRangeContent }
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#if os(iOS)
|
||||
#if os(iOS) || os(tvOS)
|
||||
import Flutter
|
||||
#elseif os(macOS)
|
||||
import FlutterMacOS
|
||||
#endif
|
||||
|
||||
/// Protocol for shared MpvPlayerPlugin method handlers across iOS and macOS.
|
||||
/// Protocol for shared MpvPlayerPlugin method handlers across iOS, tvOS, and macOS.
|
||||
/// Platform-specific methods (PiP, initialization, window finding) remain
|
||||
/// in the per-platform MpvPlayerPlugin files.
|
||||
protocol MpvPluginShared: AnyObject, MpvPlayerDelegate {
|
||||
|
||||
Reference in New Issue
Block a user