YouTube Hack: Automatically Start and Loop Videos

Contributor Icon Contributed by MickeyMouse  
Tag Icon Tagged: Internet  

Building on the previous URL youtube hack presented here, I have figured out how to automatically start and loop youtube videos.


Davak recently posted on how to hack the URL of a youtube video to increase or decrease the size. This continues the practice of manipulating the URL to change the default embedded youtube player’s characteristics.

I’ll use the very cool Web 2.0 … The Machine is Us/ing Us clip as an example. Here is the default code.

To make the video play automatically (like it does on the youtube page) add &autoplay=1 to both of the youtube url codes above.

So you would change http://www.youtube.com/v/6gmP4nk0EOE to http://www.youtube.com/v/6gmP4nk0EOE&autoplay=1

This resulting code will therefore automatically play the youtube clip when the page is visited (unless youtube is choking for some reason today):

If you want the youtube clip to automatically restart and loop when done then add this additional modifier to the url: &loop=1

Therefore, you would change all the youtube urls to this:
http://www.youtube.com/v/6gmP4nk0EOE&autoplay=1&loop=1

The results code should autostart and autoloop…

 

15 Comments -


  1. Brian said on October 30, 2008

    Thank you for this page. It really helped me loop my videos so that people don’t end up looking at other peoples videos at the end..so they stay on my page.

  2. mo said on December 7, 2008

    don’t work on piczo

  3. ioftigr said on January 20, 2009

    Any way to make this validate? I am currently using swfobject to make it validate so it would be nice to continue to do so.

  4. Thiago said on January 28, 2009

    THANK YOU, GUY!!!!!!!!!!!!!!

  5. Su said on April 16, 2009

    Thanks A LOT :D

  6. Some guy said on May 8, 2009

    It doesn’t work

  7. jenn said on May 15, 2009

    It doesn’t work.. i’ve tried it a dozen times..
    And I’m getting sooo pissed off. srsly.

  8. Satisfied said on June 4, 2009

    its wor king this is what i make

  9. Cookie Monster said on January 19, 2010

    Thanks! This helps me out a lot.

  10. greysonfan said on September 30, 2010

    Had a video that I needed to have run automatically on my Greyson Chance fansite and I found your blog post! Thanks so much. It worked like a charm!

  11. Gas Snake said on November 25, 2010

    I think the trick is the URL format. The default url of a youtube video is http://www.youtube.com/watch?v=xxxxxxx. The loop=1 doesn’t work with this format. You have to change the url to http://www.youtube.com/v/xxxxxx and put &loop=1 in the end. Only in this way the trick will work.

  12. Maxwell said on December 12, 2010

    is it possible to loop an embedded video from a specific time?

  13. james said on March 16, 2011

    not sure what you mean by youtube.com/v/xxxxx ?

  14. Guest said on July 5, 2011

    Hallo how to put on auto suptitles? &cc_load_policy=1 is not working

  15. Jodemeil said on August 4, 2011

    How could I loop only a moment of a clip, for example 3:00 to 3:15? Possible?

 

RSS feed for comments on this post. TrackBack URL

Leave a comment -