Detect embeded object in webview
I was just wondering if using the private API it is possible to detect embed开发者_运维问答ed videos and also get their src URL?
This would be a huge help thank u so much.
You could use the public API if you're wiling to write a little bit of Javascript and have it run in the context of the page, returning you whatever you want.
For example:
NSString * js = @"var myLink=document.getElementById('well-known-id'); myLink.href;";
NSString * url = [webView stringByEvaluatingJavaScriptFromString:js];
精彩评论