diff --git a/ios/Video/Features/RCTPictureInPicture.swift b/ios/Video/Features/RCTPictureInPicture.swift index 21d321a2..dfc3cf06 100644 --- a/ios/Video/Features/RCTPictureInPicture.swift +++ b/ios/Video/Features/RCTPictureInPicture.swift @@ -6,7 +6,7 @@ import React #if os(iOS) class RCTPictureInPicture: NSObject, AVPictureInPictureControllerDelegate { - public private(set) var _pipController: AVPictureInPictureController? + private(set) var _pipController: AVPictureInPictureController? private var _onPictureInPictureEnter: (() -> Void)? private var _onPictureInPictureExit: (() -> Void)? private var _onRestoreUserInterfaceForPictureInPictureStop: (() -> Void)? @@ -92,7 +92,7 @@ import React } #else class RCTPictureInPicture: NSObject { - public let _pipController: NSObject? = nil + let _pipController: NSObject? = nil func setRestoreUserInterfaceForPIPStopCompletionHandler(_: Bool) {} func setupPipController(_: AVPlayerLayer?) {} diff --git a/ios/Video/NowPlayingInfoCenterManager.swift b/ios/Video/NowPlayingInfoCenterManager.swift index 7c542122..a52e930e 100644 --- a/ios/Video/NowPlayingInfoCenterManager.swift +++ b/ios/Video/NowPlayingInfoCenterManager.swift @@ -81,7 +81,7 @@ class NowPlayingInfoCenterManager { } } - public func cleanup() { + func cleanup() { observers.removeAll() players.removeAllObjects() @@ -199,7 +199,7 @@ class NowPlayingInfoCenterManager { remoteCommandCenter.togglePlayPauseCommand.removeTarget(togglePlayPauseTarget) } - public func updateNowPlayingInfo() { + func updateNowPlayingInfo() { guard let player = currentPlayer, let currentItem = player.currentItem else { invalidateCommandTargets() MPNowPlayingInfoCenter.default().nowPlayingInfo = [:] diff --git a/ios/Video/RCTVideo.swift b/ios/Video/RCTVideo.swift index 9e6ddf30..a3f897ac 100644 --- a/ios/Video/RCTVideo.swift +++ b/ios/Video/RCTVideo.swift @@ -1092,7 +1092,9 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH // Find the nearest view controller var viewController: UIViewController! = RCTPresentedViewController() ?? RCTKeyWindow()?.rootViewController guard viewController != nil else { return } - while let presented = viewController.presentedViewController { viewController = presented } + while let presented = viewController.presentedViewController { + viewController = presented + } if viewController != nil { _presentingViewController = viewController