IFrame Embed Code

Content You can choose to load or cue content in the player. If you select an option to load content and then update the player, the player will play the specified content instead of whichever video, if any, is already playing.

If you select an option to cue content and the update the player, the player loads the video but does not play it. To play the video, you need to click the Play link in the player controls section or on the video player itself.

Depending on your selection, this page calls one of the following API functions:
  • loadVideoById
  • loadVideoByUrl
  • loadPlaylist
  • cueVideoById
  • cueVideoByUrl
  • cuePlaylist
 
 
Controls The controls in this section let you play, pause or stop a video.

To seek to a specific point in the video, enter a number in the Seek to field, which specifies the time offset, in seconds, from the beginning of the video when playback should begin.
   
Volume The mute and unmute controls turn volume off or on. The Volume on/off field in the Statistics section indicates whether the player is muted.

You can adjust the volume of the player by entering a number between 0 and 100 in the Set volume field. Tab or click out of the input box to update the volume.
Mute|Unmute|Set:  (0-100) [current level: --]
Rate The playback rate identifies the speed at which the video is playing. The getAvailablePlaybackRates() function returns the set of playback rates in which the current video is available. In this demo, the available playback rates are shown in the Statistics section.

A value of 1 indicates that the video is playing at normal speed.
   
Size This section lets you modify the size of the player, using the setSize(width, height) function. Typically, this function would only be useful in an ActionScript application. In a JavaScript application, the resized player is still inserted in the object that contains the video player, even if that object is smaller or larger than the resized player.
 x 405   
History This page calls the getVideoUrl() and getEmbedCode() functions when the player is ready to play a video. These functions are called again if you load or cue a video.

If you call getVideoUrl() after a video has played for at least 10 seconds, the URL includes a parameter that specifies the time offset at which the player should begin playing the video.
(clear)
Errors
None yet.

Events and function calls
None yet.

Player parameters
  • checked box = parameter value of 1
  • unchecked box = parameter value of 0
  • Use the Iframe Embed Code to embed a player with the selected options.

Parameter Value
autoplay  1 – Automatically start playing video when the player loads.

0 (default) – Do not automatically play video when the player loads.
cc_load_policy  1 – Cause closed captions to be shown by default even if the user has turned captions off. The default behavior is based on the user's preference.
color This parameter specifies the color used in the player's video progress bar to show the amount of the video that the viewer has already seen. The default value is red.
controls  1 – (default) Display player controls in the video player.

0 – Do not display player controls in the video player.
disablekb  1 – Disable player keyboard controls.

0 (default) – Enable player keyboard controls. Keyboard controls are:
  • Spacebar: Play/Pause
  • Left arrow: Jump back a few seconds in current video.
  • Right arrow: Jump ahead a few seconds in current video.
  • Up arrow: Volume up
  • Down arrow: Volume down
enablejsapi  1 – Enable the player to be controlled using the IFrame Player API.

0 (default) – Do not enable the API.
end  The time offset at which the video should stop playing. The value is a positive integer that specifies the number of seconds into the video that the player stops playback.
fs  1 (default) – The player displays a button to view a fullscreen player.

0 – The player does not display the button.
hl  Sets the player's interface language. The parameter value is an ISO 639-1 two-letter language code or a fully specified locale, such as fr or fr-ca. Other language input codes, such as IETF language tags (BCP 47) might also be handled properly.

The interface language is used for tooltips in the player and also affects the default caption track.
iv_load_policy 1 (default) – Show video annotations. 3 – Do not show video annotations.
list  In conjunction with the list parameter, this parameter identifies the content that loads in the player.
  • playlist – The list parameter specifies a YouTube playlist ID. Make sure the parameter value begins with the letters PL.
  • search – The list parameter specifies the search query term used to select content to play.
  • user_uploads – The list parameter specifies the YouTube channel whose uploaded videos are loaded.
listType In conjunction with the list parameter, this parameter identifies the content that loads in the player.
  • search – The list parameter specifies the search query term used to select content to play.
  • user_uploads – The list parameter specifies the YouTube channel whose uploaded videos are loaded.
  • playlist – The list parameter specifies a YouTube playlist ID. Make sure the parameter value begins with the letters PL.
loop  1 – If the player is loading a single video, play the video again and again. If the player is loading a playlist, play the entire playlist and then start again at the first video.

0 (default) – Do not continuously play video or entire playlist.
modestbranding  1 – Prevent the YouTube logo from displaying in the control bar. A YouTube text label or watermark still displays when the user's mouse pointer hovers over the player.

0 – A YouTube logo displays in the player control bar.
playlist  A comma-separated list of video IDs that play in succession.
playsinline  1 – Cause inline playback for UIWebViews created with the allowsInlineMediaPlayback property set to TRUE.

0 (default) – Cause fullscreen playback. Note that the default value is subject to change.
start  The time offset at which the video should begin playing. The value is a positive integer that specifies the number of seconds into the video that the player should begin. The player looks for the closest keyframe at or before the time that you specify.
Statistics  The information in this section describes the status of the video player and the video being played (or the last video to play). The following list shows the API function associated with each field in this section:
  • Duration: getDuration()
  • Current time: getCurrentTime()
  • Player state: getPlayerState()
  • Percentage of video loaded: getVideoLoadedFraction()
  • Start bytes: getVideoStartBytes()
  • Volume (on/off): isMuted()
  • Number of videos in playlist: count(getPlaylist())
  • Position of current video: getPlaylistIndex()
  • Videos in playlist: getPlaylist()
  • Bytes loaded: getVideoBytesLoaded() (deprecated)
  • Total bytes: getVideoBytesTotal() (deprecated)

Duration: --:--
Current time: --:--
Player state: --
Start bytes: --
% of video loaded: --
Volume (on/off):
Playback rate: --
Available rates:
Deprecated
Bytes loaded: --
Total bytes: --