How to set a YouTube Video to Autoplay

You do know how to embed a YouTube video onto your website right? If not, it’s really easy to do. Login to your YouTube account, below the video click on the Share button, then click Embed, then copy and paste the html code that YouTube gives you and paste it on your website.

If you want to set the YouTube video to autoplay? What I mean by that is have it to start playing as soon as someone goes to you website. By default you would need to click Play on the video to start it. It’s very easy to set the YouTube video to autoplay check out the demo.

Here is how to set a YouTube video to autoplay

With the html code you copied from your YouTube account, Add the autoplay code &autoplay=1  at the end of the two URLs.


In the demo above, this was the YouTube video html code: with out the autoplay code.

<object width=”640″ height=”360″><param name=”movie” value=”;hl=en_US&amp;rel=0″></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”;hl=en_US&amp;rel=0″ type=”application/x-shockwave-flash” width=”640″ height=”360″ allowscriptaccess=”always” allowfullscreen=”true”></embed></object>

After I added the &autoplay=1 code to the end of the URLs the embed html code looked like this:

<object width=”640″ height=”360″ classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″ codebase=”,0,40,0″><param name=”allowFullScreen” value=”true” /><param name=”allowscriptaccess” value=”always” /><param name=”src” value=”;hl=en_US&amp;rel=0&autoplay=1” /><param name=”allowfullscreen” value=”true” /><embed width=”640″ height=”360″ type=”application/x-shockwave-flash” src=”;hl=en_US&amp;rel=0&autoplay=1” allowFullScreen=”true” allowscriptaccess=”always” allowfullscreen=”true” /></object>

And now the YouTube video will now autoplay as soon as somebody goes to your wesite.


How to set a YouTube Video to Autoplay

How to set a YouTube Video to Autoplay

How to set a YouTube Video to Autoplay

You can put a YouTube video on a MegaSplashPage