Home > Net >  How to implement Picture in Picture Webview on IOS Swift?
How to implement Picture in Picture Webview on IOS Swift?

Time:10-14

I new swift , i want to implement feature picture in picture (PiP) in webview for android , ios . I've found all the posts here and implement some code :

for android (enter image description here

CodePudding user response:

You can get or set allowsPictureInPictureMediaPlayback for your wkwebviewconfiguration

WKWebViewConfiguration().allowsPictureInPictureMediaPlayback = true

A user can disable Picture in Picture’s automatic invocation in Settings > General > Picture in Picture > Start Pip Automatically. If you think you’ve set up everything correctly and find that your video does not enter PiP when you press the Home button, check this settings.

  • Related