YouTube video bar – Pimped

Based on the Google AJAX Search API (beta) the Google Video Bar lets you put YouTube Videos on Your Web Page. The script wizard page is here.

What i wanted to do was to “hand pick” a few unrelated youtube videos and add them to my video bar (instead of a “random” google list). The obvious solution was to create my youtube chanel with the videos in question. Creating a chanel meant i had to upload the videos.
Not easy since i did not have them and a waste because the videos are already online.
So i tried to see if i can tweak the “Search Expressions:”. The API said basicaly that:
A. you can search a single expresion (and with enough terms, google will return that one video)
B. you can use comma separated expresionsto get succesive series (with auto refresh) each series coresponding to one expression.
For example a list of expressions like: japan, france, romania will return 3 succesive video series (the code alows you to set the refresh time) one after the other. That was not what i wanted.
To hand pick the videos I had to find first the unique code for each of them. On youtube when you watch a video the address bar link looks like this:
http://www.youtube.com/watch?v=3MH64NzbtRY.
If from that adress you copy just the code in red: 3MH64NzbtRY you have the unique expresion you needed to add that video to the video bar(case A).
Folowing case B, a list of coma separated expressions like this 3MH64NzbtRY, code 2 , code 3
will also return a video “bar” with only one video. The video will change at each refresh according to your list.
However, if you use OR instead of coma to separate the terms in the previous expresion:
3MH64NzbtRY OR code 2 OR code 3
you get the desired effect: a video bar with 3 hand picked videos for your page.
My solution in short is:
2. paste in the search expression field the list of codes for your favourite youtube videos separated by OR.
3. push the Show Code button and …
4. copy the html code to you page.

About Dr.A

Scientist, tech enthusiast, husband and father. Romanian expat. Dupa 3 ani in Japonia, o noua pagina se deschide la Paris.
This entry was posted in tehnologie and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *