Monday, April 5, 2010

How to use Youtube API for showing customized video in your website ?

Just to pacify my son I had to find a way to place his favorite categories of videos in one webpage. So I was tempted to create first blog site for my son.

Well ! all my favorite names for the blog site were not available !

Then, I thought .. how'bout kid-school .. well I got it finally !

It was amazingly easy to use YouTube API to display favourite videos.

Visit http://www.google.com/uds/solutions/wizards/videosearch.html

Just specify the categories .. my son already specified the requirements "Colonnel Haathi HD" "Tom Jerry Lion HD" and "Tale Toons"

Next specify your webpage for which Google API key will be generated.

I linked to my son's blog-site http://kid-school.blogspot.com/p/baby-world.html (in the making..)

Next Google will automatically generate the required code.

Simply paste it into your webpage say baby-world.html.

Then I am good to demo it to my only customer .. Riju the Menace !!!

You can fine-tune the java-script in various ways !!

What I did was simply copy the code -


-- from http://www.google.com/uds/solutions/videobar/reference.html -- to increase the size of the videoControl.

We can further fine-tune video and image search example - http://code.google.com/apis/ajaxsearch/multimedia.html

References :

http://blogoscoped.com/youtube-api/
http://code.google.com/intl/ja/apis/youtube/js_example_1.html
http://www.webmonkey.com/2010/02/youtube_tutorial_lesson_2_the_data_api/
http://code.google.com/apis/youtube/getting_started.html#widgets

No comments: