Skip to content

Commit

Permalink
add tvOs checks
Browse files Browse the repository at this point in the history
  • Loading branch information
LamineNdy committed Feb 12, 2019
1 parent 4661801 commit 83926f1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions PlayerDNAPlugin.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@
isa = XCBuildConfiguration;
buildSettings = {
BITCODE_GENERATION_MODE = bitcode;
CLANG_ENABLE_CODE_COVERAGE = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
Expand Down Expand Up @@ -585,6 +586,7 @@
isa = XCBuildConfiguration;
buildSettings = {
BITCODE_GENERATION_MODE = bitcode;
CLANG_ENABLE_CODE_COVERAGE = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
Expand Down Expand Up @@ -761,6 +763,7 @@
isa = XCBuildConfiguration;
buildSettings = {
BITCODE_GENERATION_MODE = marker;
CLANG_ENABLE_CODE_COVERAGE = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
Expand Down Expand Up @@ -794,6 +797,7 @@
isa = XCBuildConfiguration;
buildSettings = {
BITCODE_GENERATION_MODE = bitcode;
CLANG_ENABLE_CODE_COVERAGE = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
Expand Down Expand Up @@ -863,6 +867,7 @@
isa = XCBuildConfiguration;
buildSettings = {
BITCODE_GENERATION_MODE = marker;
CLANG_ENABLE_CODE_COVERAGE = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
Expand Down Expand Up @@ -895,6 +900,7 @@
isa = XCBuildConfiguration;
buildSettings = {
BITCODE_GENERATION_MODE = bitcode;
CLANG_ENABLE_CODE_COVERAGE = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
disableMainThreadChecker = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -74,7 +75,7 @@
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
buildConfiguration = "Debug"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
buildConfiguration = "Debug"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
Expand Down
5 changes: 3 additions & 2 deletions PlayerDNAPlugin/Classes/AVPlayerPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ extension AVPlayerDNAPlugin {
}
}

// MARK: - DNAClientDelegate
extension AVPlayerDNAPlugin: DNAClientDelegate {
public func playbackTime() -> Double {
if let player = self.player {
Expand Down Expand Up @@ -239,14 +240,14 @@ extension AVPlayerDNAPlugin: DNAClientDelegate {
}

public func bufferTarget() -> Double {
if #available(iOS 10.0, *) {
if #available(iOS 10.0, tvOS 10.0, *) {
return self.player?.currentItem?.preferredForwardBufferDuration ?? 0
}
return 0.0
}

public func setBufferTarget(_ target: Double) {
if #available(iOS 10.0, *) {
if #available(iOS 10.0, tvOS 10.0, *) {
self.player?.currentItem?.preferredForwardBufferDuration = target
}
}
Expand Down

0 comments on commit 83926f1

Please sign in to comment.