This is a continuation from last week’s tutorialย 5 URL Parameters to Improve Your YouTube Embedding โ Part 1. Remember that 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). And that to add these URL parameters, you just take the video URL and add ?param=value for the first and ¶m=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. fs
Can be set to 0 or 1. Default is 0. Setting it to 1 enables the user to play the video in fullscreen mode. Depending on how you’re embedding the video, you may need to set the allowfullscreen parameter on the player as well.
2. hd
Can be set to 0 or 1. Defaults to 0. Setting it to 1 causes the HD version of the video to play by default, assuming one exists. This only effects the HTML5 player, however, since the AS3 player will automatically determine the correct video size to play by the player dimensions, regardless of the hd attribute.
3. controls
Can be set to 0 or 1. Defaults to 1. Setting it to 0 removes the player controls, causing the player to look like the chromeless player. If, for some reason, you want a video to loop endlessly with no way for the user to stop it, use this in conjunction with loop=1 and disablekb=1.
4. showinfo
Can be set to 0 or 1. Default is 1. Setting it to 0 hides the video information that displays at the top of the video, like the video name and uploader. Particularly useful if your video window is very small, as the info can take up a fair amount of video space.
5. showsearch
Can be set to 0 or 1. Default is 1. Setting it to 0 disables the search box when the video is minimized. If rel is set to 0, then the search box will be disabled regardless of the showsearch parameter.