4

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 ?
Vishnu Kumar. S
  • 1,797
  • 1
  • 15
  • 35
  • I am doing same thing for UIWebView. If i will got solution for it then i will let you knew. hope for same :) –  Jul 17 '15 at 07:28
  • @Jenifer: I have implemented this in UIWebView. Due to memory pressure I just moved to WKWebView. If you have any issue with UIWebView feel free to ask me, sometimes I can help you. Anyway thanks for your comment. :) – Vishnu Kumar. S Jul 17 '15 at 09:18
  • @ Visnu, Hi, How can i get message from WebView for Done button is Hidden or shown in UIWebview Player? –  Jul 17 '15 at 09:37
  • @Jenifer : I didn't tried to detect the Done button action. I think there may be some notification for the Done button action also. Please check this link: https://developer.apple.com/library//ios/documentation/AVFoundation/Reference/AVPlayerItem_Class/index.html#//apple_ref/c/data/AVPlayerItemDidPlayToEndTimeNotification. You can check the available notifications. – Vishnu Kumar. S Jul 17 '15 at 09:49
  • I only wants OverLay view on UIWebView Player. –  Jul 17 '15 at 09:51
  • You mean to play the videos as inline? – Vishnu Kumar. S Jul 17 '15 at 10:04
  • please see this and help me https://stackoverflow.com/questions/55377677/how-to-detect-avplayer-and-get-url-of-current-video-from-wkwebview – Virani Vivek Apr 03 '19 at 05:49

0 Answers0