Google Blogoscoped

Friday, March 14, 2008

Customize YouTube Player via JavaScript API

Very cool: the recently released YouTube JavaScript Player API allows you to embed completely customized YouTube players, among other uses. I came up with this sample player that is supposed to be a sort of “hello world” of how you can implement the “chromeless player“; open the source code to the page to see how it’s done. While I created a more traditional time bar, there’s nothing that would stop you from indicating progress by having a monkey sprite climb a ladder, and what not.

Yvo Schaap, who alerts us to this and was an early tester for the program, came up with a much more extensive example in which you can drag & drop videos into the player. As you can see, you can write complete custom applications around the YouTube module now. (I suppose you can’t remove the YouTube logo from the chromeless player or avoid that it takes the user to when clicked, but that seems to make sense for Google for now. As far as ads go, I’m not sure if Google intends to integrate them in the module as well.)

A word of caution: the official API help by Google contains several errors, like non-working code samples or broken links... it’s probably a very early release. They say you need to register for a key. After registering you can add a “product” (not sure what that is) which will then contain your key, which you are supposed to append to a GData URL, but this too didn’t work here. (The sample code I’m using goes with the “” URL instead.)


Blog  |  Forum     more >> Archive | Feed | Google's blogs | About


This site unofficially covers Google™ and more with some rights reserved. Join our forum!