2
votes

I have UIWebviews that contains different styled texts, images, youtube videos etc. If UIWebview has Youtube video, it has Picture-In-Picture button as default (I have PiP feature in app for my video gallery with AVPictureInPictureController, means PiP enabled in app).
1) How can I opt-out for PiP for those embedded youtube videos

Another case is my UIWebviews are in UICollectionViewCells, that is in horizontal mode, 1 cell per page, paging enabled, I can't pause the youtube video when change page to another, because I have no variable or something that assigned to that player to control player. This case arises in iPad, because in iPhone when you try to play embedded youtube video it goes for full screen, to change another cell you have to press Done(that pauses video) so video handles itself to stop, but in iPad it plays in UIWebview autmatically, doesn't goes for fullscreen
2) How can I get controll on embedded youtube video in my UIWebview

1

1 Answers

1
votes

Found solution for #1:

myWebiew.allowsPictureInPictureMediaPlayback = false