Skip to content

Commit

Permalink
add tvOS minimum version
Browse files Browse the repository at this point in the history
  • Loading branch information
inbalvasserman committed Oct 26, 2023
1 parent 21ec214 commit f14040c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ extension AVPlayerEngine {
playerItem.preferredForwardBufferDuration = newAsset.playerSettings.network.preferredForwardBufferDuration
}

if #available(iOS 11.0, *) {
if #available(iOS 11.0, tvOS 11.0, *) {
playerItem.preferredMaximumResolution = newAsset.playerSettings.network.preferredMaximumResolution
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/Player/PKPlayerSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ typealias SettingsChange = ((PlayerSettingsType) -> Void)
/// Set preferredMaximumResolution to non-zero to indicates a preferred maximum video resolution. This property only applies to HTTP Live Streaming assets.
/// zero is the default value and it indicates there is no limit on the video resolution
///
/// @available(iOS 11.0, *) via AVPlayerItem
/// @available(iOS 11.0, tvOS 11.0, *) via AVPlayerItem
@objc public var preferredMaximumResolution: CGSize = CGSize(width: 0, height: 0){
didSet {
self.onChange?(.preferredMaximumResolution(preferredMaximumResolution))
Expand Down
2 changes: 1 addition & 1 deletion Classes/Player/PlayerWrapper/AVPlayerWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ open class AVPlayerWrapper: NSObject, PlayerEngine {
case .preferredPeakBitRate(let preferredPeakBitRate):
self.currentPlayer.currentItem?.preferredPeakBitRate = preferredPeakBitRate
case .preferredMaximumResolution(let preferredMaximumResolution):
if #available(iOS 11.0, *) {
if #available(iOS 11.0, tvOS 11.0, *) {
self.currentPlayer.currentItem?.preferredMaximumResolution = preferredMaximumResolution
}
case .preferredForwardBufferDuration(let preferredForwardBufferDuration):
Expand Down

0 comments on commit f14040c

Please sign in to comment.