fix(ios): fix pip(when player doesn't fill screen) (#3363)
This commit is contained in:
		| @@ -47,6 +47,9 @@ class RCTPictureInPicture: NSObject, AVPictureInPictureControllerDelegate { | |||||||
|     func setupPipController(_ playerLayer: AVPlayerLayer?) { |     func setupPipController(_ playerLayer: AVPlayerLayer?) { | ||||||
|         // Create new controller passing reference to the AVPlayerLayer |         // Create new controller passing reference to the AVPlayerLayer | ||||||
|         _pipController = AVPictureInPictureController(playerLayer:playerLayer!) |         _pipController = AVPictureInPictureController(playerLayer:playerLayer!) | ||||||
|  |         if #available(iOS 14.2, *) { | ||||||
|  |             _pipController?.canStartPictureInPictureAutomaticallyFromInline = true | ||||||
|  |         } | ||||||
|         _pipController?.delegate = self |         _pipController?.delegate = self | ||||||
|     } |     } | ||||||
|      |      | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user