How To Autoplay Youtube Videos
Posted 04-07-2011 at 10:15 PM by johnlagoudakis
Sometimes you’ll want to autoplay Youtube videos, for example, if you have a video squeeze page (see mine here).
By default, Youtube videos do not autoplay. But the good news is that autoplaying Youtube videos is very easy. All you need to do is add one line of code:
autoplay=1
The hardest part is knowing how and where to add it, and that’s not hard!
New Youtube Embed Code (default)
To get the Youtube embed code, you simply go to the video you want to embed on your website and click on the ‘Embed’ button (located below the video). You’ll be shown some code that looks like this:
<iframe title=”YouTube video player” width=”640″ height=”390″ src=”YouTube - Broadcast Yourself frameborder=”0″ allowfullscreen></iframe>
Here’s where you can add the autoplay code:
<iframe title=”YouTube video player” width=”640″ height=”390″ src=”YouTube - Broadcast Yourself&autoplay=1” frameborder=”0″ allowfullscreen></iframe>
Old Youtube Embed Code
If you’re using the old Youtube embed code, the original code will look like this:
<object width=”640″ height=”390″><param name=”movie” value=”http://www.youtube.com/v/s3DcPo3e5H0?fs=1&hl=en_GB&rel=0″></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/s3DcPo3e5H0?fs=1&hl=en_GB&rel=0″ type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”640″ height=”390″></embed></object>
Here’s where you’ll need to add the Youtube autoplay code (2 places):
<object width=”640″ height=”390″><param name=”movie” value=”http://www.youtube.com/v/s3DcPo3e5H0...n_GB&rel=0&autoplay=1“></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/s3DcPo3e5H0...n_GB&rel=0&autoplay=1” type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”640″ height=”390″></embed></object>
If you’ve found this article helpful, please leave a comment below. Thanks!
By default, Youtube videos do not autoplay. But the good news is that autoplaying Youtube videos is very easy. All you need to do is add one line of code:
autoplay=1
The hardest part is knowing how and where to add it, and that’s not hard!
New Youtube Embed Code (default)
To get the Youtube embed code, you simply go to the video you want to embed on your website and click on the ‘Embed’ button (located below the video). You’ll be shown some code that looks like this:
<iframe title=”YouTube video player” width=”640″ height=”390″ src=”YouTube - Broadcast Yourself frameborder=”0″ allowfullscreen></iframe>
Here’s where you can add the autoplay code:
<iframe title=”YouTube video player” width=”640″ height=”390″ src=”YouTube - Broadcast Yourself&autoplay=1” frameborder=”0″ allowfullscreen></iframe>
Old Youtube Embed Code
If you’re using the old Youtube embed code, the original code will look like this:
<object width=”640″ height=”390″><param name=”movie” value=”http://www.youtube.com/v/s3DcPo3e5H0?fs=1&hl=en_GB&rel=0″></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/s3DcPo3e5H0?fs=1&hl=en_GB&rel=0″ type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”640″ height=”390″></embed></object>
Here’s where you’ll need to add the Youtube autoplay code (2 places):
<object width=”640″ height=”390″><param name=”movie” value=”http://www.youtube.com/v/s3DcPo3e5H0...n_GB&rel=0&autoplay=1“></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/s3DcPo3e5H0...n_GB&rel=0&autoplay=1” type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”640″ height=”390″></embed></object>
If you’ve found this article helpful, please leave a comment below. Thanks!
Total Comments 0




