ios - Get Video url embedded in web page using WKWebView -
i used uiwebview
video url embedded in web page using avplayeritembecamecurrentnotification
. due memory pressure issue used wkwebview
instead of uiwebview
, far better memory efficient uiwebview
. did not way fetch url of embedded video. still searching on issue , found similar questions in stack overflow, questions unanswered.
please suggest method embedded video url in web page using wkwebview
atlast found solution video embedded in web page using wkwebview. can add javascript code url. video url available after loading selected video.
[wkwebview evaluatejavascript:@"document.queryselector('video').currentsrc;" completionhandler:^(id result, nserror *error) { // result contain video url }];
Comments
Post a Comment