YouTube Embedded Player: List of Parameters

by Prashant Kumar Sharma

This document describes all the parameters that are available in the YouTube embedded player and can be used as a guide or a tutorial for help. Appending these parameters to the SWF URL allow you to customize, 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.

  1. rel
    Values: 0 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.
  2. autoplay
    Values: 0 or 1. Default is 0. Sets whether or not the initial video will autoplay when the player loads.
  3. loop
    Values: 0 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.
  4. enablejsapi
    Values: 0 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.
  5. playerapiid
    Value can be any alphanumeric string. This setting is used in conjunction with the JavaScript API. See the JavaScript API documentation for details.
  6. disablekb
    Values: 0 or 1. Default is 0. Setting to 1 will disable the player keyboard controls. Keyboard controls are as follows:
    Spacebar: Play / Pause
    Arrow Left: Jump back 10% in the current video
    Arrow Right: Jump ahead 10% in the current video
    Arrow Up: Volume up
    Arrow Down: Volume Down
  7. egm
    Values: 0 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.
  8. border
    Values: 0 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.
  9. color1, color2
    Values: Any RGB value in hexadecimal format. color1 is the primary border color, and color2 is the video control bar background color and secondary border color.
  10. start
    Values: A positive integer. This parameter causes the player to begin playing the video at the given number of seconds from the start of the video. Note that similar to the seekTo 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.
  11. fs
    Values: 0 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:


    example- youtube embed

  12. hd
    Values: 0 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.
  13. showsearch
    Values: 0 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.
  14. showinfo
    Values: 0 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.
  15. iv_load_policy
    Values: 1 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.
  16. cc_load_policy
    Values: 1. 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.
Advertisements

One Trackback to “YouTube Embedded Player: List of Parameters”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: