Detect video start playing in WKWebView

2020-07-20 10:15发布

问题:

I'm using WKWebView for loading an youtube page. I need to detect the video starts playing in the webview in inline mode and in the full screen mode. I tried MPMoviePlayerController Notifiers but they are not calling. But the same is working in UIWebView. So my question is,

  1. Is there any difference in the video playing mechanism used in UIWebView and WKWebView ?
  2. Why MPMoviePlayerController Notifiers are not calling in WKWebView ?
  3. Is there any method to detect the video play in WKWebView ?
  4. Or is there any method to detect whether the user has tapped the video play button ?