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 ?

enter image description here

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

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -