How to Make Youtube Embed code video auto Start?


It's easy to embed with youtube.com , just use next code:

<iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/zGPuazETKkI?autoplay=1" frameborder="0" allowfullscreen></iframe>

This is a sample embed code from youtube. I want to make this video play automatically using javascript.

So basically you can do it by adding after the video link this code: "?autoplay=1"

Also if you want to embed a youtube linkd and to start if from a particular moment/second just add after your link next code: "?t=1m08s" if you want the video to start at minute 1 second 8, or for example if you want it to start at minute 3 second 45 add next code: "?t=3m45s" and so on, I think you got the idea :)















No comments:

Post a Comment