YouTube API Overview 217
Each Video Search Control search box is preconfigured with a set of HTML
tags that define and display thumbnails for the video results obtained from
the search. Clicking on a thumbnail of video search results will play it with-
out leaving the page. Like the Video Bar, you can use a wizard to get started;
read the Programming Guide
5
for how to customize the player or search
automatically based on site links. The Video Search Control is highly cus-
tomizable, allowing you to configure the initial set of video search terms, the
size and location of the player, the number of results, color schemes, etc.
Your web page can manipulate the control through the supplied search form
or through preselected search terms. You can also save user searches for
future use.
8.3.2 YouTube Player APIs
The Player APIs let you control the YouTube player using JavaScript or
ActionScript.
6
There is a basic embedded player (which is most often used),
and there is also a “chromeless”
7
player that lets you create your own player
controls. The Player APIs allow you to establish how users can control You-
Tube video playback on your web site. By simply configuring some basic
settings for the player interface, you can build a highly customized player
control. The player APIs provide mechanisms that enable you to control
how YouTube videos will look on your site.
It is important to distinguish between the two types of players, the nor-
mal “embedded” player you most likely have already seen on the Internet,
and a second, chromeless player, which is just a video box without controls.
The chromeless player is intended to be implemented by experienced web
programmers who want to design a customized video player for their users.
Both players have the same API, which is exposed via JavaScript and/or
ActionScript. The following sections discuss each option in further detail.
Embedded Player
The embedded player is the simplest way to place YouTube videos on a web
page. To customize the behavior and color of the player, developers can use
well-documented embedded player parameters. The code needed to display
5. http://www.google.com/uds/solutions/videosearch/reference.html.
6. ActionScript is a scripting language based on ECMAScript. It is used primarily for develop-
ment of web sites and software using Adobe Flash Player (in the form of embedded SWF
[Shockwave Flash] files).
7.
Chromeless
is a term used by developers to refer to a basic player without buttons, gadgets,
or menu controls—essentially, the stuff usually found in the silver (or chrome) part of a dia-
log or window. When those are not present, the control is said to be chromeless
.
Chap8.fm Page 217 Friday, May 22, 2009 11:28 AM