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.
Asked
Active
Viewed 89 times
0

Jaydip Gadhiya
- 29
- 4
1 Answers
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
-
Can you share javascript code which need to be inject while loading web view? – Jaydip Gadhiya Nov 01 '21 at 04:44
-
I don't know enough about JavaScript and the DOM to be able to help. – Scott Thompson Nov 01 '21 at 12:13
-
Okay no problem. let me know if you get anything – Jaydip Gadhiya Nov 10 '21 at 11:05