5 URL Parameters to Improve Your YouTube Embedding – Part 1

Tuesday, February 8th, 2011

5 URL Parameters to Improve Your YouTube Embedding – Part 1

There are many benefits to using YouTube to embed videos. It speeds up user access to the video while reducing bandwidth consumption on your own hosting, and it’s a widely familiar interface with many features built in. There are several ways to customize the behavior of the YouTube video player as well.

For the purposes of this tutorial, I’m going to assume that you’re using the embed URL format (http://www.youtube.com/v/Sla2VebjkQk), rather than the link format (http://www.youtube.com/watch?v=Sla2VebjkQk). To add these URL parameters, take the video URL and add ?param=value for the first and &param=value for subsequent parameters. So for example, to set autoplay on and allow fullscreen mode, use http://www.youtube.com/v/Sla2VebjkQk?autoplay=1&fs=1 remember that if you’re embedding the URL in a link, iframe, or anywhere on a webpage, escape the ampersands by changing them from “&” to “&”.

1. autoplay

Can be set to 0 or 1. Default is 0. Setting it to 1 causes the video to play automatically when it’s displayed, rather than waiting for the user to press play. This is useful if it’s embedded in a light box and not loaded until the light box is displayed.

2. rel

Can be set to 0 or 1. Defaults to 1. Setting it to 0 disables the “related videos” feature from appearing at the end. This is useful because it keeps people focused on your site, rather than using it to browse YouTube.

3. playlist

This parameter can be set to a comma-separated list of videos to play after the originally linked one. If you have a long video cut into smaller parts, you can use this to play them all together.

4. loop

Can be set to 0 or 1. Default is 0. Setting it to 1 causes the video (or playlist) to be repeated indefinitely.

5. start

Set to a positive number. Playback will begin the specified number of seconds into the video, in other words, it will skip the first X seconds, where X is the value of the start parameter. Note that the seeking is approximate and may be off by up to two seconds.

About Matcha Design

Matcha Design is a full-service creative B2B agency with decades of experience executing its client’s visions. The award-winning company specializes in web design, logo design, branding, marketing campaign, print, UX/UI, video production, commercial photography, advertising, and more. Matcha Design upholds the highest personal standards for excellence and can see things from a unique perspective due to its multicultural background.  The company consistently delivers custom, high-quality, innovative solutions to its clients using technical savvy and endless creativity. For more information, visit MatchaDesign.com.

Related Tags

You Might Also Like