How to disable autoplay for YouTube video in WKWebView?

Viewed 4415

I have simple ViewController with WKWebView configured as follows:

webView.configuration.allowsInlineMediaPlayback = true
webView.configuration.mediaTypesRequiringUserActionForPlayback = .video

But right after loading a web page with YouTube video it starts to play automatically (and switching to full screen at the same time) without any user interaction which is required. How to disable autoplay?

1 Answers
Related