The following are a number of guides that can get you started working with Pando. From integrating Pando into your streaming video, to creating custom RSS feeds, to making better looking packages, this is where you’ll find easy to read guides with step-by-step instructions.
Integrating Pando into your content management workflow. You can use the Pando Command Line to automate Pando packaging of your content for delivery. PCL can also be used for automatically receiving content sent to you via Pando.
Integrating Pando into web pages , powering video streams and downloads. Pando's How to Pando-enable your Video illustrates how to use Pando to power video playback for Flash, WMV, QuickTime, DivX, Real, etc. We also have example code and demonstrations of video streaming, downloads and subscriptions. You can easily integrate Pando into web pages using some simple JavaScript tags.
You can integrate the Pando install into your installer. You can use the Pando Media Booster to use Pando to power your downloads, or you can use the Pando application to allow your users to send and receive large files.
You can use the Pando Protocol URL's and Pando REST API to integrate Pando's functionality into your applications.
Any Pando sender should read Publish Pretty Pando Packages, which shows you how to make your packages more likely to be downloaded, with better thumbnails and descriptions. Also, How to get a Pando Package URL tells you how to find the URL for your package and what the URL looks like.
Podcasters should read Easy Pando RSS Feeds, which shows you how to use any blogging service to serve a Pando RSS feed. If you coded your own RSS feed, Building a Custom Pando RSS Feed shows you how to support Pando subscribers.
Web developers can use Custom Package Previews with JavaScript or Custom Package Previews with PHP, which allow you to create your own package previews to better match the feel of your site.
If you would like to suggest a topic for a guide, or have done something amazing with Pando that you'd like to tell people about, please post a comment below or email laird@pando.com.
Every Pando Package has a unique URL that identifies the package. The Pando Package URL is output by the Pando Command Line when a package is published.
C:\pcl>PCL publish --username=jgcameron --password=titanic --pandofile=AuntDana.JPG.pando --sender="J.G.Cameron" aunt-dana.JPG
Might return a package URL such as:
A typical Pando Package URL looks like:
http://cache.pando.com/soapservices/Package/package.pando
?id=5A4A7B2AE83E0AA3DAF066C28703C6F3132B0633
&key=3557F2AAD6CEAEC0FB6B1F1E19C7531A116A1C2B209554FC9343F2A6ED9DAC94
This URL is then used throughput the Pando APIs to identify the package.
The first part of the URL identifies the service that is being used to deliver the content. This may be different for different types of content. The id is the unique identifier of the package in the Pando network. The key is the encryption key of the package. By giving a complete Package URL to a recipient, you are giving them the ability to download the package and access its contents.
Note there are some cases, such as when integrating Pando into an application, that you may wish to separate the package ID and key and communicate them separately. For example, you could distibute the package ID freely, such as on web pages, and communicate the key through a secure channel, combining the two to allow authorized recipients to download the content.
The Pando Package URL is available for consumer-generated packages by using Pando's "send to web" command, and copying the "Download Link".

Select the text in the "Download Link" field.
If you have already sent the package, you can get the Pando Package URL by viewing the package info by selecting the package and clicking the "info" button, which displays this dialogue:

Here's a simple shortcut to getting Pando Package URL's: select the package in your Sent list, and select Copy from the Edit menu (or hit control-C on Windows, or command-C on Mac).
To make Pando packages look nicer to your recipients, there are a few simple tricks.
We'll start with this rather plain looking package:

Package thumbnail images are quite visible throughout Pando, so it's important to make thumbnails look good.
Pando automatically generates the thumbnail for a package by using the first image or video file in the package. Pando does not generate thumbnails for other types of files, such audio files or written documents - we use the standard document icons for those files. The details of thumbnail generation are different on Windows and Mac OS X.
The thumbnails are 100x75 pixel resolution.
Pando on Windows uses the same Thumbnail as it used by Windows Explorer, so you can look there to see what the Thumbnail will be for each file. For still images in supported formats (JPEG, PNG, GIF) Windows uses the image. For video images (AVI, WMV) Windows uses the first frame of the video. For other types of files, such as PowerPoint presentations and QuickTime video, Windows displays the document icon for that application, and Pando does not encode an image thumbnail.
Pando on Mac OS X uses the same Thumbnail generated by QuickTime. For still images in recognized formats (JPEG, PNG, GIF, TIFF) Pando resizes the image to fit in a thumbnail. For Quicktime video (MOV) Pando uses the Poster Frame of the video. The Poster Frame is often the first frame, which tends to be black (because the Poster Frame is usually the first frame, and many video's start with black and fade in). To set a different frame of a QuickTime video to be the key frame, open the video in QuickTime Player, go to the desired frame in the video, pause the video, select "Set Poster Frame" from the View menu, then save the video file. When you send the video using Pando, it will use the new Poster Frame as the thumbnail.
The result of the above is that you will get different thumbnails sending the same file from either a Mac or a Windows PC. For example, Windows will generate a thumbnail of an AVI file and not a QuickTime file, while Mac OS X will generate a thumbnail of a QuickTime file, but not an AVI file.
There are situations where you may want to manually set the thumbnail of a Pando package. For example:
The trick is to make create (or select) an image file (such as a JPEG or PNG) and put it into the Pando Package first, so that it is used to generate the thumbnail. Pando thumbnails are displayed as 100 pixels wide by 75 pixels tall, so your image should be at least that large. If you use a larger image, the image will be scaled down to that size for display inside Pando. For best appearance, you may want to produce the image at exactly that size so that it is displayed exactly as you desire.
We recommend giving packages names that have 'friendly' names that are easy to read.
For example, "Walk the Line HD Quicktime" is more clear than "walk_the_line-believe_clip-720p.mov".
The "Full Name" that you entered when you first sent using Pando Preferences is displayed to recipients. For emails to friend, your name is appropriate. If you're posting Pando's to your web site, or sending files to customers, you may want to set your "Full Name" to your company name.
Your email address is sent in emails (as the reply-to address) when you use Pando to send emails. It is not displayed to people who download Pando packages from a web site.
To view or change your Full Name or email address, select Preferences from the Pando menu.
Pando Package descriptions aren't required, but if one is provided it is displayed when people view Package Info, and on web pages if you use Pando to "Publish to Web". This is a good place to explain in more detail what the package contains, and why the recipient may be interested in downloading it.
For example, the description "Gorgeous preview of the incredible surfing documentary - in HD! (wmv)" tells you what you're about to download, why you might want it, and even the file format so that you know whether you can use the file after you download it.
Here's the same package as I first showed you, but with a thumbnail, title, description, and so on.

What do you think? Have more tips to share? Join the discussion.
While the Pando "Send-to-Web" preview is quick and easy, it doesn't always fit exactly as desired into an existing site design. If you'd like to design your own package previews, one easy way to do this is using the Pando Javascript API. The API makes the package metadata available to Javascript, so you need not write any server-side code to generate custom package previews. In addition to the information in the "Send-to-Web" preview, the Package Info Web Service also gives you real-time reports of the number of downloads and the expiration date.
For comparison, here is how to do previews in PHP.
Let's say we want to be able to display a package preview containing the thumbnail, title, number of times downloaded and number of days to expiration (or days since expiration). We want the title and thumbnail to link to the package URL only if it is not expired. We want it to look something like:

Since we'll be writing Javascript to generate our HTML preview, it helps to have a good sense of what we expect that output to look like before we start.
<table class="pandopackage"><tr>
<td class="packagethumb" align="center" valign="center">
<a href="[Package URL]"><img src="[Thumbnail URL]" alt=""></a>
</td>
<td class="packagemeta" valign="center">
<span class="ptitle"><a href="[Package URL]">Title</a></span>
<p>
Downloaded <strong>N</strong> times<br>
<span style="color: green;">Expires in X days</span><br>
</p>
</td>
</tr></table>
Note: For this example we're using a table based layout primarily because the Pando thumbnail is a variable size (maximum size is 100 pixels x 75 pixels, but it can be smaller in any dimension). If we want to center the thumbnail image both vertically and horizontally in a way that works in most browsers, a table cell is the most reliable way.
Accompanied with the following css, we get a nicely formatted image preview:
table.pandopackage {
border: 1px solid green;
float: left;
margin-right: 10px;
}
.pandopackage td.packagethumb {
width: 100px;
height: 75px;
text-align: center;
}
.pandopackage .packagethumb img {
border: 0;
vertical-align:middle;
}
.pandopackage td.packagemeta {
margin: 0 0 0 10px;
padding: 0;
width: 150px;
font-family: Verdana, Arial, sans-serif;
font-size: 11px;
}
.pandopackage .packagemeta span.ptitle {
font-family: 'Lucida Grande', Arial, sans-serif;
font-size: 14px;
font-weight: bold;
margin: 0 1em 0 0;
}
In order to generate the HTML with the appropriate metadata for our preview, we'll need a callback function for PandoAPI.js to call that can accept the packageInfo array and construct the appropriate HTML. The following callback function will calculate the number of days till/since expiration, determine whether the package is expired, generate a title and thumbnail string (only wrapped in an anchor tag if the image is not expired), get the number of package downloads and construct an HTML string that looks like our target HTML. You can follow along in the comments:
function printPackageCallBack(packageInfo) {
//Get number of days till expiration (negative = expired)
var days = Math.round( (new Date(packageInfo['expirationDate']) - new Date()) / 86400000);
//store expiration status
var expired = (days >= 0) ? 0 : 1;
//use absolute values of days for a readable string
days = Math.abs(days);
//get title from package info
var title = packageInfo['title'];
if (title.length > 30) {
title = title.substring(0,28) + '...';
}
//generate img tag with thumbnail from package info
var thumb = "<img src='"+ packageInfo['thumbnailURL'] +"' alt='' />";
//generate anchor tag from package URL; assumes packageKey is set
var packageA = "<a href='" + PandoAPI.getPackageURL(packageId,packageKey) + "'>";
//get appropriately pluralized X day(s) string
var daystring = days +' day'+ ( (days > 1) ? ('s') : ('') );
//get # of downloads from package info
var dl = packageInfo['downloads'];
//if package is not expired, link the title and thumbnail to the package URL
// and set the expiration days string accordingly
if(!expired) {
title = packageA + title + '</a>';
thumb = packageA + thumb + '</a>';
daystring = '<span style="color: green;">Expires in '+ daystring +'</span><br />';
//otherwise, do not link the title/thumbnail, and set expiration string accordingly
} else if (!packageInfo['expirationDate']) {
daystring = '<span style="color: green;"><strong>Never expires</span></strong><br />'
title = packageA + title + '</a>';
thumb = packageA + thumb + '</a>';
} else {
daystring = '<span style="color: red;">Expired '+ daystring +' ago</span><br />';
}
//generate human-friendly Downloaded X times / Never Download string
if(dl > 0)
dlstring = 'Downloaded <strong>'+dl+'</strong> time'+( (dl > 1) ? ('s') : ('') );
else
dlstring = 'Never downloaded';
//write out the package preview
out = ("\r\n<table class='pandopackage'>\r\n<tr>\r\n\t<td valign='center' align='center'
class='packagethumb'>\r\n\t\t"+ thumb + '\r\n\t</td>\r\n\t<td valign="center"
class="packagemeta">\r\n\t\t<span class="ptitle">'+ title +'</span>\r\n\t\t<p>\r\n\t\t'
+ dlstring +'<br />\r\n\t\t'+ daystring +'\r\n\t\t</p>\r\n\t</td>\r\n</tr>\r\n</table>'
);
document.write(out);
}
Now, if we call PandoAPI.getPacakgeInfo with a package id, key and the above callback function, it will write directly into our page:
<script type="text/javascript">
PandoAPI.getPackageInfo('5AEDE982393976A10050F2EC7C20C3C5EFDE0BBB',
printPackageCallBack,
'C51E9F2767B6747A9C9841AF7EEB9CC0E967D5B37CEC05B8C9DF310A03958AD2');
</script>
That works fine, but document.writes are a little crude and the function call is a little tricky to construct correctly. Also, if the javascript fails to load (e.g., due to a temporary service outage), it could stop our entire page from loading from the point where we include the script. A common practice is to put remotely-dependent javascript code just above the </body> tag, so if it fails to load, it doesn't affect the rest of the page. However, if we do this, we could only write our package preview to the end of the page.
To make the function call to generate the preview a little simpler, we can write a wrapper function that accepts the package URL as an input (which is easy to acquire), parses out the package id and key and then invokes PandoAPI.getPackageInfo with the correct parameters. E.g.,
function parsePandoUrl(url) {
var parts = url.split('?',2);
var args = parts[1];
parts = args.split('&');
for(var i=0; i<parts.length; i++) {
if(parts[i].match(/^id=[A-Z0-9]*/))
packageId = parts[i].substring(3);
if(parts[i].match(/^key=[A-Z0-9]*/))
packageKey = parts[i].substring(4);
}
}
function showPackage(url) {
parsePandoUrl(url);
PandoAPI.getPackageInfo(packageId,printPackageCallBack,packageKey);
}
Now we can display a package preview for a particular package URL, like so:
<script type="text/javascript">
showPackage('http://cache.pando.com/soapservices/package.pando?
id=5AEDE982393976A10050F2EC7C20C3C5EFDE0BBB
&key=C51E9F2767B6747A9C9841AF7EEB9CC0E967D5B37CEC05B8C9DF310A03958AD2');
</script>
And finally, in order to be able to call this function just before the closing <body> tag, we can change our call to document.write in the callback function to instead modify the "innerHTML" contents of an existing element on the page. For this example, we'll assume there's an empty <div> tag with the id of "packagedetails" somewhere on the page. We can then swap out document.write with:
document.getElementById('packagedetails').innerHTML = out;
Here is a stand-alone HTML implementation. [final custom javascript] [final custom css]. Feel free to use these on your web site as is, or extend them any way you like!
If you have questions, or want to share what you've come up with, post a comment below!
In addition to using PandoAPI.js and Javascript to generate custom package previews, you can also use a server-side script to process XML or JSON encoded package info. This following example uses php5 (with the CURL and SimpleXML libraries) to take a package URL from the user and generate "cut and paste"-able HTML for use as a package preview. We'll use the CSS and target HTML from the PandoAPI.js example, with the goal to generate package previews that look like this:
| Spring Street Art
Downloaded 56 times |
In order to generate a preview, first we need a package ID (and, optionally, key) to generate the preview. The handiest source for these data are package URLs, so we'll ask the user for the Package URL in a simple HTML form, where ActionUrl is the URL to the code that will process the URL, generate and display the package preview:
<form action="ActionUrl" method="GET">
Pando package url: <input type="text" name="packageurl"><br />
<input type="submit" value="Get Package Preview">
</form>
In order to extract the package ID and key from the URL, we'll need to parse it. The following function takes an URL as an argument and extracts plausible id and key parameters, returning an array of those parameters if it found a plausible id, and returning FALSE otherwise.
<?php
function parse_pando_url($url) {
$parts = parse_url($url);
$args = split("&", $parts[query]);
$packagekey = ''; //key is optional; set to blank so it has some value
foreach($args as $arg) {
if(ereg('^id=[A-Z0-9]*$', $arg)) $packageid = substr($arg, 3);
if(ereg('^key=[A-Z0-9]*$', $arg)) $packagekey = substr($arg, 4);
}
if(!empty($packageid))
return array('id' => $packageid, 'key' => $packagekey);
else
return FALSE;
}
?>
Once we have a package ID, we can attempt to retrieve the package info encoded as XML using the package info web services call. PHP provides the handy CURL library to retrieve this content. The following function accepts a package ID and (optionally) package key and desired format as parameters. It returns XML (or JSON, if specified) package info or FALSE if CURL fails or returns a non-xml result.
<?php
function get_package_info($packageid, $packagekey = '', $format = 'xml') {
//only two allowed formats are json and xml, force xml if something other than json is specified
if($format != 'json') $format = xml;
//build request URL
$url = "http://cache.pando.com/soapservices/SendToWeb?action=info&format="
. $format ."&id=". $packageid ."&key=". $packagekey;
//fetch package info with CURL
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$xml = curl_exec($ch);
//make sure there were no errors and the server claims to have returned XML
if(ereg('^text/xml', curl_getinfo($ch, CURLINFO_CONTENT_TYPE)) && curl_error($ch) == '' ) {
return $xml;
}
else {
return FALSE;
}
}
?>
Now that we can retrieve the XML encoded package info, we can use the SimpleXML library available in php5 to generate the HTML.
<?php
function build_package_preview($packageid, $packagekey) {
//get XML formatted package info from Pando services
if($xml = get_package_info($packageid, $packagekey) ) {
//load up a new SimpleXML object from the retrieved XML
if($package = new SimpleXMLElement($xml)) {
//get number of days to/since expiration, set "expired" status
$days = round( ( strtotime($package->expirationDate) - time() ) / (60 * 60 * 24) );
($days < 0)? $expired = TRUE: $expired = FALSE;
$days = abs($days);
//Only wrap title/thumbnail as links if we have a key and package is not expired
if($expired || empty($packagekey) ) {
$title = $package->title;
$expirestr = "<span style='color: red;'>Expired $days days ago</span><br>";
}
else {
$title = "<a href='$package->packageURL'>$package->title</a>";
$thumb = "<a href='$package->packageURL'><img src='$package->thumbnailURL' alt=''></a>";
$expirestr = "<span style='color: green;'>Expires in $days days</span><br>";
}
//generate the entire HTML output
$html = <<<HTML
<table class="pandopackage"><tbody><tr>
<td class="packagethumb" align="center" valign="center">
<a href="$package->packageURL"><img src="$package->thumbnailURL" alt=""></a>
</td>
<td class="packagemeta" valign="center">
<span class="ptitle">$title</span>
<p>
Downloaded <strong>$package->downloads</strong> times<br>
$expirestr
</p>
</td>
</tr></tbody></table>
HTML;
return $html;
}
}
//something went wrong
return FALSE;
}
?>
Using the above functions (collected into pando_package_preview.php) we can generate our package preview HTML and both display it on the page and output it into a textarea block from where it can be cut-and-pasted as static HTML into other locations.
<?php
require_once('pando_package_preview.php');
//see if we have a package URL to parse
if(!empty($_GET['packageurl'])) {
if($package = parse_pando_url($_GET['packageurl'])) {
//get HTML package preview
if($html = build_package_preview($package['id'], $package['key'])) {
//show the package preview
print $html;
//show a textarea box with cut-and-paste-able HTML
print "<form style='clear: both;'><br /><textarea name='copythis' cols='50' rows='5'
onclick='javascript:this.form.copythis.select();'>". $html ."</textarea></form>";
}
else {
//problem w/ preview
print "<span style='color: red;'>Problem generating package preview. Please cut and paste a valid Pando
package URL</span><br />";
}
}
else {
//couldn't parse package URL
print "<span style='color: red;'>Bad package URL. Please cut and paste a valid Pando package URL</span><br />";
}
}
?>
Feel free to use these on your web site as is, or extend them any way you like!
If you have questions, or want to share what you've come up with, post a comment below!
Pando supports RSS, combining the convenience of Podcasting with the efficiency of Pando. This allows you to efficiently deliver extremely large files, such as high quality audio or video, to your subscribers, without any file hosting or delivery costs.
For subscribers, this is more convenient than email Pando deliveries, because the delivery can take place automatically in the middle of the night, so there's no waiting! This makes it painless to send big, beautiful video files to your subscribers.
To make this even easier, Pando provides a mechanism so that you can enable one-click subscription to a Pando RSS feed on your web site.
In order to use Pando RSS there are three steps:
A Pando RSS feed is a standard RSS 2.0 feed containing Pando files as enclosures.
The easiest way to run a Pando RSS feed is to use one one of the many existing RSS hosting services, such as Blogger, Yahoo 360 or LiveJournal.
Or, if you want to run your own site, there are numerous web site systems that produce RSS feeds, such as the one we use, Drupal.
If you are a programmer and wish to implement your own Pando RSS feed, or add Pando support to an existing RSS feed, you will want to read Building a Custom Pando RSS Feed.
The easiest way to set up a Pando RSS feed is to use Pando's "Send to Web" tool, and one of the many existing blogging services that support RSS 2.0. The "Send to Web" tool to generate HTML that you can copy and paste into your blog.
For example, the automatically generated HTML might look like:
<a href="http://cache.pando.com/soapservices/Package/
01_Big_Band_Serenade_70_Glenn_Miller_and_His_Orchestra_6_30_1939&7_14_39.mp3.pando?
id=E8F1ED96AC5A8F27EE9406E7B163FF80EC2AE706
&key=8913A9B268FB5A491711A8F191D30D669E04402355451D0A57453DD459553A0F"
title="01_Big_Band_Serenade_70_Glenn_Miller_and_His_Orchestra_6_30_1939&7_14_39.mp3.pando">
<img src="http://cache.pando.com/soapservices/SendToWeb/
E8F1ED96AC5A8F27EE9406E7B163FF80EC2AE706/Preview.png"
border="0" alt="Pando Package"/>
</a>
And if you post it into a blog posting the result looks like this:
If your blogging system supports enclosures (also referred to as "Podcasting"), we recommend putting the Pando file URL's into the enclosure fields. To do this, copy the "embed" link from the "Send to Web" tool.
http://cache.pando.com/soapservices/Package/
01_Big_Band_Serenade_70_Glenn_Miller_and_His_Orchestra_6_30_1939&7_14_39.mp3.pando?
id=E8F1ED96AC5A8F27EE9406E7B163FF80EC2AE706
&key=8913A9B268FB5A491711A8F191D30D669E04402355451D0A57453DD459553A0F
and paste it into the enclosure field. The details are different for each blogging platform.
Note that many blog hosting services require you to host linked files (images and enclosures) elsewhere. Pando hosts all of the Pando files, and takes care of the delivery of your audio or video files, so you can use any blogging platform that supports RSS 2.0 to publish Pando files and RSS feeds without having to arrange a separate file hosting service.
To make sure that your Pando RSS Feed works properly, you should subscribe to it using Pando.
First, you need to find your RSS feed URL. These are usually linked to on your blog with a label reading "RSS" or "Feed". This is often labeled with a button like this:
.
Once you have the URL, you should make sure that it works properly with Pando. To do this, run Pando on another computer from where you published the files, open Pando's Preferences (on Mac) or Options (on Windows), and click on "RSS". Then click on the "Add RSS feeds" button. This will show a dialog box allowing you to enter the URL of the feed, and test it.

Click 'test' and Pando will verify that the URL is correct and that it finds enclosed Pando files. Then click 'subscribe' to start getting updates from the RSS feed.
The reason that you should test the downloads on a different computer from the one you uploaded it from is that Pando won't download files that it knows that you already have.
One cool feature of Pando that you'll like is that we report actual download counts of every package that you send (displayed right in the Sent list), so you can see how many subscribers you have, and which packages are most popular.
Once you're happy with how everything looks, it's time to promote it.
To make it easy for your readers to subscribe to your Pando RSS feed, you can do a couple of things:
Suggestions? Questions? Post a comment below.
In addition to providing package info service, the PandoAPI.js javascript library also provides a Pando "install" check service. We (Pando) set a cookie named "installed" in the pando.com domain whenever we determine a user has Pando installed. Because it runs from a pando.com domain, PandoAPI can inspect this cookie. If a user has this cookie set, you can be reasonably sure they have Pando installed. If they do not, they still may have Pando installed but have removed the cookie.
To use this service on your own site, you pass callback function to the PandoAPI.hasPando() method. The callback function takes a single argument. This function is then called by the PandoAPI method, with the argument set to true or false depending on the status of the installed cookie. This allows you to modify the content of your pages with javascript depending on the cookie status. In this example we'll use this method to prepend pando:subscribe? to pando channel subscription links for users who have this cookie set, to provide a one-click subscription experience for Pando users.
First, we'll need to make sure we include the Pando javascript API in our <head> section:
<script type="text/javascript" src="http://cache.pando.com/soapservices/PandoAPI.js"></script>
Then, the below script does the following:
pando:subscribe? URLs if the Pando installed cookie is detectedYou can follow along with the comments:
<script type="text/javascript">
// Assume Pando is not installed
pandoInstalled = false;
// Pass a simple callback function that sets pandoInstalled to true if cookie is present
PandoAPI.hasPando(function(i){ if(i == true) pandoInstalled = true; });
// Define list of channel feeds and pages
var subscribeLinks = {
'pandomonium': {
'channelPage': 'http://channels.pando.com/channel/pandomonium',
'channelFeed': 'http://feedburner.pando.com/pando/pandomonium'
},
'projectpedal': {
'channelPage': 'http://channels.pando.com/channel/projectpedal',
'channelFeed': 'http://feedburner.pando.com/pando/projectpedal'
},
'rocketboomhd': {
'channelPage': 'http://channels.pando.com/channel/rocketboomhd',
'channelFeed': 'http://feedburner.pando.com/pando/rocketboomhd'
}
};
// Do not try to use pandoInstalled until the page is loaded;
// the callback function may not have run yet and we want to
// make sure our links are ready to modify
window.onload = function(){
// If Pando is installed, rewrite the links
if(pandoInstalled == true) {
// For each link
for(channelId in subscribeLinks) {
// Find the link to modify
link = document.getElementById(channelId);
// Change the href attribute to a pando:subscribe? link with the feed URL
link.href = 'pando:subscribe?' + subscribeLinks[channelId]['channelFeed'];
}
}
}
</script>
Then, in the body of your page, define your links with the appropriate id and with URLs that will work if javascript is not enabled:
<ul>
<li><a href="http://channels.pando.com/channel/pandomonium" id="pandomonium">Pandomonium</a></li>
<li><a href="http://channels.pando.com/channel/projectpedal" id="projectpedal">Project Pedal</a></li>
<li><a href="http://channels.pando.com/channel/rocketboomhd" id="rocketboomhd">Rocketboom</a></li>
</ul>
A version of this script lives on a stand-alone page here. Feel free to view the source and borrow what you need and ask any questions below. (This page also includes a server-side cookie inspection so you can tell when viewing the page whether you have the Pando "installed" cookie set, for testing purposes).
If you want to implement your own RSS feed, or wish to add Pando support to an existing RSS feed server, you'll need to know some technical details.
A Pando RSS feed is a standard RSS 2.0 feed containing Pando files as enclosures. Pando will download any enclosure with the MIME type "application/x-pando", or with the file extension ".pando".
Here is an example from our Pando RSS feed, containing two video files. The important lines are the two enclosure tags.
<rss version="2.0" xml:base="http://rss.pando.com">
<channel>
<title>pando-rss - </title>
<link>http://rss.pando.com</link>
<description/>
<language>en</language>
<item>
<title>Walk the Line HD Quicktime</title>
<link>http://rss.pando.com/node/68</link>
<description>
Johnny Cash. He was a voice of rebellion that changed the face of rock and roll.
</description>
<enclosure
url="http://rss.pando.com/sites/developers.pando.com/files/pando/
Walk_the_Line_HD_Quicktime2_0.pando"
length="30109" type="application/x-pando"/>
<pubDate>Mon, 25 Sep 2006 18:43:50 -0400</pubDate>
<dc:creator>rsspub</dc:creator>
<guid isPermaLink="false">68 at http://rss.pando.com</guid>
</item>
<item>
<title>Step Into Liquid HD WMV</title>
<link>http://rss.pando.com/node/72</link>
<description>
Gorgeous preview of the incredible surfing documentary - in HD! (wmv)
</description>
<enclosure
url="http://rss.pando.com/sites/developers.pando.com/files/pando/
Step_into_Liquid_HD_WMV2_0.pando"
length="20472" type="application/x-pando"/>
<pubDate>Mon, 25 Sep 2006 13:20:53 -0400</pubDate>
<dc:creator>rsspub</dc:creator>
<guid isPermaLink="false">72 at http://rss.pando.com</guid>
</item>
</channel>
</rss>
There is a live demo Pando RSS feed provided at http://rss.pando.com/rss.xml. You can also see the same files as a web site at http://rss.pando.com.
Suggestions? Questions? Join the discussion.