Thursday, September 25, 2008

Holy Moving Pictures, Batman! - SendMeRSS

In case you missed the news over at the Google Code Blog, you can now upload videos to Picasa Web Albums using its Data API. It's as easy as uploading a photo -- a POST to the album URL with a video format (video/quicktime, for example) specified as the Content-Type. You can also choose a custom thumbnail for the video. The Java client library is currently the only library with support, but the snippet to upload a video and set the thumbnail looks like this:

MediaFileSource myMedia = new MediaFileSource(
new File("/home/liz/"), "video/quicktime");
PhotoEntry returnedVideo = myService.insert(feedUrl, PhotoEntry.class, myMedia);

MediaFileSource myThumb = new MediaFileSource(
new File("/home/liz/birthday_title.jpg"), "image/jpeg");
PhotoEntry updatedEntry = returnedVideo.updateMedia(false);
Read up more in the docs.

Link - from Google Data APIs Blog

Related: Top Myths about Google Website Optimizer

No comments: