Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable Picture in Picture mode for default video player

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?

like image 414
Daniil Harik Avatar asked Feb 09 '23 23:02

Daniil Harik


1 Answers

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

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

like image 156
jtbandes Avatar answered Feb 11 '23 12:02

jtbandes