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 :
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.