Thursday, June 28, 2012

Make Youtube Videos Autoplay on your website.

Youtube videos used to have a option to set autoplay on them but was removed not long after the Rick Roll videos started going around. Rather that was the reason or not I do not know but their is a way to make the video autoplay on your own.
Here is a example of what a youtube embedded video might look like.
 <iframe width="560" height="349" src="VIDEO SOURCE URL" frameborder="0" allowfullscreen></iframe>

To make the video autoplay you just need to add ?autoplay=1 after the VIDEO SOURCE URL.
Example:  <iframe width="560" height="349" src="http://www.youtube.com/embed/4P0Rbe1ASuQ?autoplay=1" frameborder="0" allowfullscreen></iframe>

That's all.

No comments:

Post a Comment