How to disable Picture in Picture mode for default

2019-07-13 14:14发布

问题:

How can I disable Picture in Picture button/mode using Swift in iOS9 on iPad when user tries to play a video in my app?

回答1:

Default AVPlayerLayers won't use PiP unless you use an AVPictureInPictureController.

AVPlayerViewController has a property allowsPictureInPicture which you can set to false.