From 1ffd97ccbfc9f77ed97e0ee22b20a9e0a526a922 Mon Sep 17 00:00:00 2001 From: YangJH Date: Mon, 20 Nov 2023 00:33:15 +0900 Subject: [PATCH] fix(ios): fix pip(when player doesn't fill screen) --- ios/Video/Features/RCTPictureInPicture.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ios/Video/Features/RCTPictureInPicture.swift b/ios/Video/Features/RCTPictureInPicture.swift index da6a9d8c71..62bdb8136b 100644 --- a/ios/Video/Features/RCTPictureInPicture.swift +++ b/ios/Video/Features/RCTPictureInPicture.swift @@ -47,6 +47,9 @@ class RCTPictureInPicture: NSObject, AVPictureInPictureControllerDelegate { func setupPipController(_ playerLayer: AVPlayerLayer?) { // Create new controller passing reference to the AVPlayerLayer _pipController = AVPictureInPictureController(playerLayer:playerLayer!) + if #available(iOS 14.2, *) { + _pipController?.canStartPictureInPictureAutomaticallyFromInline = true + } _pipController?.delegate = self }