Pagina 1 di 1

[html] autoplay video su browser mobile

Inviato: martedì 9 giugno 2015, 10:11
da thaiboxer89
salve a tutti ho provato a fare degli autoplay nel codice html

Codice: Seleziona tutto

<iframe width="100%" height="349" src="http://www.youtube.com/embed/neiOa38DuqI?autoplay=1" frameborder="0" allowfullscreen></iframe>
sia prendendo il video da youtube che sul server del mio sito

Codice: Seleziona tutto

 <video width="100%" height="240" controls autoplay>
  <source src="Spot_Conad_2014.mp4" type="video/mp4">
  
  Your browser does not support the video tag.
</video> 
ho provato entrambi,ed entrambi dal pc mi aprono il video in automatico, ma da mobile no...c'è un modo per aprirlo in automatico? magari anche sfruttando qualche funzione in js? un grazie in anticipo :ciao:

Re: [html] autoplay video su browser mobile

Inviato: martedì 9 giugno 2015, 10:56
da SuperStep
devi usare il metodo play dell'oggetto video.

http://www.w3schools.com/tags/av_met_play.asp