Thursday, January 26, 2006

Embedding Google Video in your own Flash Player

After messing with Google's new video upload service for a few hours, I noticed the "Put on Site" link which gives you some embed code that you can put on your web site to include a particular video on your web site. I wondered if I might be able to grab the video file URL from that code and load it into my own customized player instead of using Google's standard player. If you URLdecode the path to the file in the embed code Google gives you, you can decipher the secure URL and use it as the source for your own NetStream video object in Flash. This mean you could essentially use Google as your streaming media host and your users would never be the wiser. Obviously hosting your video files directly with Google is going to give you better bandwidth performance than just about any other streaming server in the world, so I thought it was a great idea. Just one minor problem. It appears that Google is somehow stripping out the bytesTotal property from the metadata so that you can't build a progress bar that works with the videos hosted at Google. The bytesLoaded property works just fine, but bytesTotal always seems to return -1. If anyone out there has a clue about how to get the bytesTotal from a Google hosted video, please let me in on your secret!

0 Comments:

Post a Comment

<< Home