javascript - Autoplay video in the uiwebview -
i have uiwebview contain video in html ,i need detect first video in html , play it.
is there trick in javascript or objective c autoplay video when page finish loading ?
if embedded video not youtube, must set uiwebview allow media playback without user action.
this can done setting mediaplaybackrequiresuseraction property of uiwebview false.
example: self.webview.mediaplaybackrequiresuseraction = no;
if you've embedded youtube video, can append &autoplay=1 end of video url.
this cause video autoplay on page load.

Comments
Post a Comment