How can I autoplay a video using the new embed code style for Youtube?

I can't work out how to autoplay a video using the new embed code style for Youtube. I tried adding &autoplay=1 to the url, which worked with the old style, but it didn't work. For example, http://www.youtube.com/embed/JW5meKfy3fY is the embed link, but http://www.youtube.com/embed/JW5meKfy3fY&autoplay=1 doesn't work. Can anyone tell me how to do it? Thanks


Answers


I think if you use replace "&" with "?" in the url the video will autoload.
So your url would be:http://www.youtube.com/embed/QP2K8zCGFn4?autoplay=1

Seems like Google should have made this available, but I would say using a "?" makes more sense than using the "&".



Actually, you will have to use the "?" instead of "&" for your first parameter only. If you use more than one parameter, you will then have to add "&" to the chain.
For instance, if you want to add autoplay and closed captioning, you will have to add this portion to your embedded video URL: ?autoplay=1&cc_load_policy=1.
It would look like this:
<iframe width="560" height="315" src="//www.youtube.com/embed/QP2K8zCGFn4?autoplay=1" 
frameborder="0" allowfullscreen></iframe>

Comments