feat: tvos support

This commit is contained in:
edde746
2026-04-24 14:11:24 +02:00
parent 77401bef32
commit 2479e1faaa
98 changed files with 4464 additions and 56 deletions
@@ -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 {