Skip to content

Commit

Permalink
fix(ios): fix pip(when player doesn't fill screen) (#3363)
Browse files Browse the repository at this point in the history
  • Loading branch information
YangJonghun authored Nov 20, 2023
1 parent 17dbf6e commit 11f6201
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ios/Video/Features/RCTPictureInPicture.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 11f6201

Please sign in to comment.