From 6c3af99979c847887796baefd421cb5a50ed32ba Mon Sep 17 00:00:00 2001 From: YangJH Date: Sat, 18 Jan 2025 19:49:12 +0900 Subject: [PATCH] fix(tvOS): fix tvos compile error (#4369) * fix(tvOS): fix tvos compile error --- ios/Video/Features/RCTPictureInPicture.swift | 10 ++++++++++ ios/Video/RCTVideo.swift | 4 +--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ios/Video/Features/RCTPictureInPicture.swift b/ios/Video/Features/RCTPictureInPicture.swift index 67a7446f..21d321a2 100644 --- a/ios/Video/Features/RCTPictureInPicture.swift +++ b/ios/Video/Features/RCTPictureInPicture.swift @@ -90,4 +90,14 @@ import React } } } +#else + class RCTPictureInPicture: NSObject { + public let _pipController: NSObject? = nil + + func setRestoreUserInterfaceForPIPStopCompletionHandler(_: Bool) {} + func setupPipController(_: AVPlayerLayer?) {} + func deinitPipController() {} + func enterPictureInPicture() {} + func exitPictureInPicture() {} + } #endif diff --git a/ios/Video/RCTVideo.swift b/ios/Video/RCTVideo.swift index 7915e82d..a624cc27 100644 --- a/ios/Video/RCTVideo.swift +++ b/ios/Video/RCTVideo.swift @@ -102,9 +102,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH private let _videoCache: RCTVideoCachingHandler = .init() #endif - #if os(iOS) - private var _pip: RCTPictureInPicture? - #endif + private var _pip: RCTPictureInPicture? // Events @objc var onVideoLoadStart: RCTDirectEventBlock?