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

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -