Youtube Videos that Start When the Page Loads

2009 June 30
by Jackie and Andrea
Image representing YouTube as depicted in Crun...
Image via CrunchBase

The other day I was putting together a new sales page and I included a Youtube video as part of it. Only problem? The default for embedded Youtube videos requires the visitor to click play in order to get the video going.

Sometimes that’s a very good thing - I mean just imagine a page with several videos on it and they all are set to “on” when the page loads - that wouldn’t work at all - lol.

But in this case, it’s just one video and it’s part of the “intro” to the page - it’s appropriate that it begin when the person arrives.

So I went in search of a solution … and I found it.

The first thing you need to do is grab the embed code for the video that you’re going to use.

You find this by going to the page of the video on Youtube. There are two code choices there - the url and the embed code. It’s the embed code that allows you to post the actual video on other sites while remaining ‘physically’ stored on the Youtube servers.

Now what we’re going to do is add a little snippet to the code.

Here’s the actual text that will cause your Youtube video to begin automatically upon the page loading:

&autoplay=1

And where we’re going to put it is directly after the part of the code that calls the embed source (don’t worry if this doesn’t make any sense, I’ve created a video to show you exactly how to do it)

Here’s the sample embed code from the video below (you’ll see the code snippet is in bolded red):

<object width=”580″ height=”360″><param name=”movie” value=”http://www.youtube.com/v/dtvAZjIrKgE&hl=en&fs=1&rel=0&border=1″></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/dtvAZjIrKgE&hl=en&fs=1&rel=0&border=1&autoplay=1” type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”580″ height=”360″></embed></object>

I decided not to autoplay the video on here, but if you’d like to test it on your own page to see how it works, just grab that code and pop it into the html/source tab of your blog or page.

Here’s the video of me modifying the above embed code so it’ll autoplay:

Happy autoplaying!

Andrea & Jackie

Reblog this post [with Zemanta]
Share and Enjoy:
  • Digg
  • TwitThis
  • Sphinn
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Google Bookmarks

Post to Twitter Tweet This Post

PS. Thanks for coming back! We love return visitors. Remember if there's an Internet marketing obstacle you need to overcome we can probably help - just ask! Subscribe to our RSS feed or Follow us on Twitter :)
No comments yet

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS

Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.