MediaRSS Feeds
Media RSS is an open standard for syndicating multimedia content. It extends RSS 2.0 to provide additional information, such as richer thumbnail and image metadata. Media RSS allows Cooliris to understand the location of the media files that are displayed in the wall, as well as which thumbnails link to which high-resolution images. Click here for a complete description of Media RSS.
MediaRSS Setup
You can create a media RSS feed using PicLens Publisher if you have images on your local drive you would like to upload to a website. PicLens Publisher takes a series of images and outputs a photos.rss Media RSS feed in addition to the image thumbnails, enabling usage of both the embeddable wall and the Cooliris client on your website.
In the Media RSS feed, include an <item> tag for each photo/video that you want to appear in your slideshow, with the <media:thumbnail> and <media:content> tags specifying the locations of the thumbnail and full-size image content, respectively. For videos, ensure that the <media:content> tag has type="video/x-flv" (Item B in the code example below).
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"
xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<item>
<title>Picture A</title>
<media:description> This one's my favorite.</media:description>
<link>pl_images/A.jpg</link>
<media:thumbnail url="http://example.com/pl_thumbs/A.jpg"/>
<media:content url="http://example.com/pl_images/A.jpg"/>
</item>
<item>
<title>Video B</title>
<link>http://example.com/pl_images/B.jpg</link>
<media:thumbnail url="http://example.com/pl_thumbs/B.jpg"/>
<media:content type="video/x-flv"
url="http://example.com/pl_images/B.flv"/>
</item>
</channel>
</rss>
If you are an advanced user, you can use scripting to dynamically generate Media RSS feeds from a database of images.
Once your MediaRSS feed is created, set the value of the feed FlashVar to its URL. Note that as before, URLs with & characters need to be encoded. MediaRSS feeds can also be displayed in the full-screen Cooliris client. For more information, go here.
Enabling Cross-domain Flash
There is one extra step involved in displaying MediaRSS inside the embeddable wall. Normally, Adobe Flash will prevent the wall from loading the RSS feed from your website. To allow the app to load your feed, you will need to place a crossdomain.xml file at the root of your website (e.g., http://mysite.com/crossdomain.xml). The crossdomain.xml file should look like this:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM
"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*.cooliris.com" secure="false" />
</cross-domain-policy>
At this point, you should have an embedded 3D wall on your site that loads your photos. Congratulations!
Advanced Features
These features require editing or dynamically generating a MediaRSS feed. Some also require the atom namespace in your RSS. To do so, add the highlighted text to your opening <rss> tag:
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"
xmlns:atom="http://www.w3.org/2005/Atom">
- Multipage Galleries
-
Instead of having one huge RSS feed of content, you can page it into as many individual feeds as you'd like. It's quite simple to do.
In your Media RSS feed, just link each feed with <atom:link rel="previous"/"next".../> tags inside the <channel> element:
<channel> ... <atom:link rel="previous" href="http://mysite.com/feed1.rss" /> <atom:link rel="next" href="http://mysite.com/feed2.rss" /> ... </channel>You can even link feeds from different domain names, if you'd like:
<channel> ... <atom:link rel="previous" href="http://mysite.com/photos.rss" /> <atom:link rel="next" href="http://myothersite.com/photos.rss" /> ... </channel>Note that for these feeds to work properly in the embeddable wall, all the domain names must have a crossdomain xml file set up, as described above.
- Dynamic Feeds
- In order to add a dynamic feed, you should have a database that contains
pictures and/or videos. Next, write a script that builds a Media RSS feed from
a given set of parameters, including the obligatory
<title>,<media:thumbnail>, and<media:content>. Concatenate the feed after a given number of elements (generally by page), and generate an RSS autodiscovery tag in the head of your page. We've included sample scripts for implementations using mySQL and Ruby on Rails.