From 04eec42f1e0f8b8f25dc1c50e1e57e62ca8c3356 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sun, 16 Feb 2025 11:55:46 +0100 Subject: [PATCH] fix(tvOS): fix tvos compile error for rotation handler (#4417) --- ios/Video/RCTVideo.swift | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ios/Video/RCTVideo.swift b/ios/Video/RCTVideo.swift index 4f130cf7..87eca9f2 100644 --- a/ios/Video/RCTVideo.swift +++ b/ios/Video/RCTVideo.swift @@ -257,12 +257,14 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH object: nil ) - NotificationCenter.default.addObserver( - self, - selector: #selector(handleRotation), - name: UIDevice.orientationDidChangeNotification, - object: nil - ) + #if os(iOS) + NotificationCenter.default.addObserver( + self, + selector: #selector(handleRotation), + name: UIDevice.orientationDidChangeNotification, + object: nil + ) + #endif _playerObserver._handlers = self #if USE_VIDEO_CACHING