- Forums
- Tutorial And Guides
- Youtube Embed Settings- How To Play Video Automatically
use this code to make a youtube videos automatically autoplay when you embed a youtube video [1568], Last Updated: Sat May 18, 2024
mel
Fri Jun 17, 2011
0 Comments
883 Visits
if you want to set a youtube video to start playing automatically when to page loads, all you have to do is put
?autoplay=1 at the end of the url
for example, lets say when you get the embed code it looks like this:
<iframe width="425" height="349" src="http://www.youtube.com/embed/yH2yfwwxgpk" frameborder="0" allowfullscreen></iframe>so all you have to do is make it look like this:
<iframe width="425" height="349" src="http://www.youtube.com/embed/yH2yfwwxgpk?autoplay=1" frameborder="0" allowfullscreen></iframe>
the old code you have to put a
&autoplay=1 at the end of the url, like this:
<object width="425" height="349"><param name="movie" value="http://www.youtube.com/v/yH2yfwwxgpk?version=3&hl=en_US&autoplay=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/yH2yfwwxgpk?version=3&hl=en_US&autoplay=1" type="application/x-shockwave-flash" width="425" height="349" allowscriptaccess="always" allowfullscreen="true"></embed></object>