How can I autoplay a video using the new embed code style for Youtube?
My code followed these instructions and does not work. I also looked on the YouTube help and they say the same thing -- does not work for me.
<html><body>
<iframe width="640" height="385" src="//www.youtube.com/embed/0319ZgKMLzw?autoplay" frameborder="0" allowfullscreen></iframe></body>
</html>
See it not autoplaying here, the code is there in firebug.
AutoPlay may not work on YouTube due to corrupt cache/data of the browser or corrupt installation of the YouTube mobile application. Moreover, an outdated browser or misconfiguration of your browser like DRM settings, etc. may also cause the error under discussion.
To make an embedded video autoplay, add "&autoplay=1" to the video's embed code right after the video ID (the series of letters that follows "embed/").
You need to add &muted=1 to the iFrame src path and add attribute allow="autoplay" to the iFrame. Now the video starts automatically in Chrome.
Select content to play. You can configure your embedded player to load a video, a playlist, or a user's uploaded videos. For an IFrame embed, the YouTube video ID for the video that you want to load is specified in the IFrame's src URL.
Edit your embed code to "?autoplay=1" and add "http://". Here is the working code for you...
<iframe width="640" height="385" src="http://www.youtube.com/embed/0319ZgKMLzw?autoplay=1"> </iframe>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With