How to autoplay videos that are not from YouTube?

0

I have a question, you can put autoplay to videos that are not from youtube ?, as for example to other links or videos inserted in third-party websites.

I've seen that on YouTube you put ?autoplay=1 at the end of the link and it works but it does not work on this link.

 <iframe width="100%" height="100%" src="https://drive.google.com/file/d/1pdvh_mEnkXPKA3jivYIpYKTaoukxH5p3Yg/preview"></iframe>
    
asked by kyle 21.06.2017 в 21:21
source

3 answers

0

For your specific case, I had to see the HTML of that video. There I found the URL you can use to watch the video:

This is the URL :

And this is the result:

<video width="320" height="240" controls autoplay src="https://r6---sn-cvb7ln7l.c.drive.google.com/videoplayback?id=f4ad6234cb575705&itag=18&source=picasa&requiressl=yes&ttl=transient&mm=30&mn=sn-cvb7ln7l&ms=nxu&mv=u&pl=23&ei=oO9KWZf6DsvYqQW53oP4Cw&driveid=1pdvh_mEnkXPKA3jivYIpYKTaoukxH5p3Yg&mime=video/mp4&lmt=1449416645575513&mt=1498082978&ip=181.59.58.201&ipbits=0&expire=1498097632&cp=QVJOWkFfVlZRQ1hNOlFsSUdaRFdwSURN&sparams=ip,ipbits,expire,id,itag,source,requiressl,ttl,mm,mn,ms,mv,pl,ei,driveid,mime,lmt,cp&signature=22BE366BA5501E7E24ABEB13C56D1E8B95DD5D54.97B82E8E1241C0031A02F0D92F5EA5E66AB502E2&key=ck2&app=explorer&cpn=giKSs-BY1XsfKv9z&c=WEB&cver=1.20170620">
Su navegador no soporta la etiqueta VIDEO.
 </video>

If for some reason you can not get this URL, I'm afraid you should investigate more how you can get the URL of a video in Google Drive.

    
answered by 22.06.2017 в 00:17
0

Some devices like apple blocks the autoplay option so do it via javascript:

<body onload='playfunc()'>

// el id es importante para reproducirlo al cargar la pagina

<video id='video' width="320" height="240" controls autoplay>
   <source src="movie.mp4" type="video/mp4">
   <source src="movie.ogg" type="video/ogg">
      Your browser does not support the video tag.
 </video> 

</body>

<script>

// con esta funcion reproduciras el video al cargar la pagina en dispositivos que no soporten autoplay

function playfunc(){
document.getElementById('video').play();

}

</script>
    
answered by 23.06.2017 в 21:37
0

You can try the <video> tag of html5 which has an attribute for automatic playback:

<video width="320" height="240" controls autoplay>
       <source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
       <source src="https://www.w3schools.com/html/mov_bbb.ogg" type="video/ogg">
          Your browser does not support the video tag.
     </video>
    
answered by 21.06.2017 в 21:34