0

As in image, I have blog that contain video and what I want is when ever user tapped on it I need total video information like duration, title, etc.Please check attached image which is WKWebView Image

1 Answers1

0

Because the interaction you are trying to observe is occurring in the context of the web browser and not the context of UIKit, your best bet is to inject JavaScript into the page to interact with DOM content. (I am not qualified to tell you how the JavaScript might work).

To get results back, WKWebView has:

func evaluateJavaScript(_, in:, in:, completionHandler:)

and

func callAsyncJavaScript(_, arguments:, in:, in:, completionHandler:)
Scott Thompson
  • 22,629
  • 4
  • 32
  • 34