This document describes all the parameters that are available in the YouTube embedded player. Appending these parameters to the SWF URL allow you to set things like color and borders, as well as whether to enable the JavaScript API for the player.
All of the following parameters are optional. They are officially supported only by the embedded player, but a subset of them may work with other players such as the playlist player or the custom player.
rel0 or 1. Default is 1. Sets whether the player should load related videos once playback of the initial video starts. Related videos are displayed in the "genie menu" when the menu button is pressed. The player search functionality will be disabled if rel is set to 0.autoplay0 or 1. Default is 0. Sets whether or not the initial video will autoplay when the player loads.loop0 or 1. Default is 0. In the case of a single video player, a setting of 1 will cause the player to play the initial video again and again. In the case of a playlist player (or custom player), the player will play the entire playlist and then start again at the first video.enablejsapi0 or 1. Default is 0. Setting this to 1 will enable the Javascript API. For more information on the Javascript API and how to use it, see the JavaScript API documentation.playerapiiddisablekb0 or 1. Default is 0. Setting to 1 will disable the player keyboard controls. Keyboard controls are as follows:
egm0 or 1. Default is 0. Setting to 1 enables the "Enhanced Genie Menu". This behavior causes the genie menu (if present) to appear when the user's mouse enters the video display area, as opposed to only appearing when the menu button is pressed.border0 or 1. Default is 0. Setting to 1 enables a border around the entire video player. The border's primary color can be set via the color1 parameter, and a secondary color can be set by the color2 parameter.color1, color2color1 is the primary border color, and color2 is the video control bar background color and secondary border color.startseekTo function, the player will look for the closest keyframe to the time you specify. This means sometimes the play head may seek to just before the requested time, usually no more than ~2 seconds.fs0 or 1. Default is 0. Setting to 1 enables the fullscreen button. This has no effect on the Chromeless Player. Note that you must include some extra arguments to your embed code for this to work. The bolded parts of the below example enable fullscreen functionality:
<object width="425" height="344"> <param name="movie" value="http://www.youtube.com/v/u1zgFlCw8Aw?fs=1"</param> <param name="allowFullScreen" value="true"></param> <embed src="http://www.youtube.com/v/u1zgFlCw8Aw?fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"> </embed> </object>
hd0 or 1. Default is 0. Setting to 1 enables HD playback by default. This has no effect on the Chromeless Player. This also has no effect if an HD version of the video is not available. If you enable this option, keep in mind that users with a slower connection may have an sub-optimal experience unless they turn off HD. You should ensure your player is large enough to display the video in its native resolution.showsearch0 or 1. Default is 1. Setting to 0 disables the search box from displaying when the video is minimized. Note that if the rel parameter is set to 0 then the search box will also be disabled, regardless of the value of showsearch.showinfo0 or 1. Default is 1. Setting to 0 causes the player to not display information like the video title and rating before the video starts playing.iv_load_policy1 or 3. Default is 1. Setting to 1 will cause video annotations to be shown by default, whereas setting to 3 will cause video annotation to not be shown by default.cc_load_policy1. Default is based on user preference. Setting to 1 will cause closed captions to be shown by default, even if the user has turned captions off.To use any of the parameters above, append them to the end of the YouTube video SWF URL.
The SWF URL usually looks like this:
http://www.youtube.com/v/VIDEO_ID
It can be programmatically accessed through the YouTube Data API by looking for the yt:format=5 <media:content> URL. This format will not be available if embedding has been disabled by the uploader.
<media:content url="http://www.youtube.com/v/VIDEO_ID" type="application/x-shockwave-flash" medium="video"
isDefault="true" expression="full" duration="100" yt:format="5"/>
To change the color scheme to a nice blue theme, modify the two color parameters.
http://www.youtube.com/v/VIDEO_ID?color1=0x2b405b&color2=0x6b8ab6&fs=1
Now, place the modified URL into your embed code:
<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/u1zgFlCw8Aw?rel=1&color1=0x2b405b&
color2=0x6b8ab6&border=1&fs=1"></param>
<param name="allowFullScreen" value="true"></param>
<embed src="http://www.youtube.com/v/u1zgFlCw8Aw?rel=1&color1=0x2b405b&color2=0x6b8ab6&border=1&fs=1"
type="application/x-shockwave-flash"
width="425" height="355"
allowfullscreen="true"></embed>
</object>
The rel, color1, color2, and border parameters have been modified to produce the blue, bordered player below. Pressing the "menu" button will also load related videos because the rel parameter is set to 1.