fix(tvos): build (#4511)
This commit is contained in:
@@ -322,6 +322,7 @@ class RCTPlayerObserver: NSObject, AVPlayerItemMetadataOutputPushDelegate, AVPla
|
||||
_restoreUserInterfaceForPIPStopCompletionHandler = completionHandler
|
||||
}
|
||||
|
||||
#if !os(tvOS)
|
||||
func playerViewController(
|
||||
_: AVPlayerViewController,
|
||||
willEndFullScreenPresentationWithAnimationCoordinator coordinator: UIViewControllerTransitionCoordinator
|
||||
@@ -335,6 +336,7 @@ class RCTPlayerObserver: NSObject, AVPlayerItemMetadataOutputPushDelegate, AVPla
|
||||
self.player?.play()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
func setRestoreUserInterfaceForPIPStopCompletionHandler(_ restore: Bool) {
|
||||
guard let _restoreUserInterfaceForPIPStopCompletionHandler else { return }
|
||||
|
||||
@@ -1167,7 +1167,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
||||
viewController.player = player
|
||||
|
||||
// Set the initial playback speed in controls to match playback rate
|
||||
if #available(iOS 16.0, *) {
|
||||
if #available(iOS 16.0, tvOS 16.0, *) {
|
||||
if let initialSpeed = viewController.speeds.first(where: { $0.rate == _rate }) {
|
||||
viewController.selectSpeed(initialSpeed)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user