Observing video playback inside a black-boxed WKWebView
is difficult as you don't have direct
access to the video player.
Another complicating matter is that depending on the video, the video might be played using a HTML5
video player, while others might launch the native AVPlayerViewController
for playback. While it might
be possible to detect HTML5
based playback by injecting custom JavaScript
using a WKUserContentController
, this is not the approach we will follow in the document as these depend on what HTML5
Video Player is involved and is, as such, not a generic solution.