Customizing YouTube & Vimeo Video Embed Scripts
It is possible to do more to control the presentation of embedded YouTube and Vimeo videos. To edit the embed script, first copy the source script to an editor. Note that the embed script is an <object> tag, containing an <embed> tag.
You can customize the embed size by adjusting the width and height parameters in both the <object> tag (near the beginning) and the <embed> tag (near the end). Use a calculator to keep the image ratio constant... well, unless you WANT it to look funny.
In both the <object> and <embed> container tags you will also find a URL reference to the video itself, of the form "http://www.youtube.com/...." or "http://www.vimeo.com/...." At the end of each reference you will find a series of parameters, specifying certain features, separated and ended with "&" or more likely with the character sequence "&". One common one is "hl=en_US", specifying US English.
Of particular interest to us, I think, are the "autoplay" and "start" parameters. Adding "autoplay=1" to the list of parameters will cause the video to start as soon as the page is loaded. Adding "start=444" will cause the video to start at 444 seconds, instead of 0 seconds. Here is a link to the Google description of all the YouTube parameters available to you; I couldn't find one for Vimeo.
While editing, do be careful with the "&" references. If the script has "&" instead of just "&", USE "&" to separate the new parameters you add, OK? "&" is a way of specifically referencing the ampersand character without triggering any other possible use if certain other characters happen to follow it -- like "amp;"! Be a good ninja editor, and blend in with what you find.
- Printer-friendly version
- Login or register to post comments

