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
.