Autoplay on youtube videos isn’t hard. Its one siple line of code in the right place. I’m not going to do it on this page… or else we’ld have some video playing automatically and annoying the daylights out of all of us. But here’s HOW you autoplay youtube videos
Here’s the code you will need:
&autoplay=1
First you need to copy the embed code from a youtube video. I have pasted the embed code of a video below for example:
New Embed Code
<iframe width=”560″ height=”315″ src=”http://www.youtube.com/embed/Iwk_QdZzvpE?rel=0″ frameborder=”0″ allowfullscreen></iframe>
Old Embed Code
<object width=”560″ height=”315″><param name=”movie” value=”http://www.youtube.com/v/Iwk_QdZzvpE?version=3&hl=en_US&rel=0″></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/Iwk_QdZzvpE?version=3&hl=en_US&rel=0″ type=”application/x-shockwave-flash” width=”560″ height=”315″ allowscriptaccess=”always” allowfullscreen=”true”></embed></object>
Now all you have to do is add the autoplay code as follows:
New Embed Code
<iframe width=”560″ height=”315″ src=”http://www.youtube.com/embed/Iwk_QdZzvpE?rel=0&autoplay=1” frameborder=”0″ allowfullscreen></iframe>
Old Embed Code
<object width=”560″ height=”315″><param name=”movie” value=”http://www.youtube.com/v/Iwk_QdZzvpE?version=3&hl=en_US&rel=0″></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/Iwk_QdZzvpE?version=3&autoplay=1&hl=en_US&rel=0″ type=”application/x-shockwave-flash” width=”560″ height=”315″ allowscriptaccess=”always” allowfullscreen=”true”></embed></object>