Thursday, December 08, 2005

Videos on your website!

Ok, here is the rundown of how I got Google Videos to play on my website.

First, you need to upload the “googleplayer.swf” to your own website. This flash file can be found at the following link:
http://video.google.com/googleplayer.swf

Second, find the Google Video you want to be posted on your website. I am going to use the following video as an example: http://video.google.com/videoplay?docid=-4942162778167603560

Third, you need to view the source of the page your video is on. In firefox, you can right click the page and select ‘view page source’, or you can go to the ‘View’ dropdown and click ‘page source’. Located in the very long line of code towards the bottom, you will find a string of characters starting with “object data="/googleplayer.swf?videoUrl=http%3A%2...” this is the important code. You want to copy everything after the .swf until the closing quotes.

Forth, inside you website, add the “googleplayer.swf” to your webstite. Many programs like Macromedia’s Dreamweaver can do this with a simple drag and drop. Two spots in code of your webpage there will be a “/googleplyer.swf” (there could be a longer directory of where the file is located, depends on your website. Add the copied data after the .swf just like it was on the Google Video page. And bam! You are done!

Rapup,
1) Upload “googleplayer.swf”
2) Get the string of characters starting with the ? mark
3) Put the flash file on your website
4) Add the string of character you copied.

Here is a working example of the code you would add to your website to get the video to play of your website. This will work if you uploaded the “googleplayer.swf” already and is in the same folder as the webpage you are working on.

3 Comments:

Do Kien Cuong said...

I can't get the player.

12/23/2005 8:42 PM  
Viper_Viper said...

Fixing at this moment! Just some bad HTML code!

12/24/2005 5:05 PM  
Unknown said...

Hi I've folled all the steps you have on here but I'm having problems with the semi-vagueness of this part of the instruction

object data="/googleplayer.swf?videoUrl=
http%3A%2...

What exactly does the end of the necessary string look like?

I've tried several different selections, but the player ends up being a tiny box in the corner of the screen and while it works locally for viewing the film, as soon as I publish it I end up having problems, where nothing shows up

Any help would be greatly appreciated, you can either leave a comment here, or email me at turtle.blu@gmail.com

1/08/2006 8:48 PM  

Post a Comment

Links to this post:

Create a Link

<< Home