Using the Firefox Browser to Select and Play Internet Radio and other Content

When exploring content available on the Web using a browser, it is sometimes desirable to select and begin playback of content on a UPnP MediaRenderer device directly from the Web browser. This is similar to the iTunes model, where clicking on a link brings up iTunes and begins playback of the selected resource (most commonly an Internet radio station), but the playback is not constrained to the PC the browser is running on. In addition to Internet radio, this model can also be used to browse and play back more 'static' content, such as that available at www.archive.org (lots of live Grateful Dead concerts from over the years!).

The Cidero UPnP controller provides a means for URL links to be passed directly to it, bypassing the need for a UPnP server for the above type of usage scenario. A simple 'remoteURL' command passed to the controller via HTTP is used to specify the URL and begin playback on an active UPnP media renderer. A small Java application, 'RemoteURLRequestor' handles the details of this transaction, and is provided as a simple 'gateway' between a Web browser and the controller. The Mozilla Firefox browser, when configured with the 'Launchy' extension, can be set up to invoke the 'RemoteURLRequestor' without too much effort. Other browsers may certainly be able to use this model as well.

The basic setup is shown in the figure below. When the user clicks on the 'Launchy' menu item, the browser invokes the RemoteURLRequestor application, passing the URL to it on the command line. The RemoteURLRequestor then passes the information to the controller via an HTTP request. The controller looks at the type of the selected content, and if it is a recognized playlist format, downloads the playlist, converts it to the UPnP playlist format, and adds the playlist items to the play queue of all active renderers (echoing the behavior of the selection of content using a UPnP media server). If a media renderer associated with a play queue is not running, playback is started from the first track in the play queue.



Sync Setup


Installing & Configuring the Firefox 'Launchy' Extension

Installation and configuration of the Launchy extension is pretty straighforward, and should only take a few minutes. The only slightly painful part is having to make a couple of small hand-edits to an XML configuration file. This situation should be addressed in a later release of the Cidero software.
  1. The launchy extension currently has difficulty with spaces in application filenames. Before proceeding, please make sure the folder containing the Cidero software does not have any spaces in its full pathname (sorry 'bout that!). Note that the folder can simply be renamed if needed, no reinstall is necessary.
  2. If you don't already have it, install or upgrade to the latest version of Firefox (1.0.4) on your system. The Launchy extension will most likely work fine with earlier releases as well, but I have only verified it with 1.0.4.
  3. Click on Tools-Extensions to bring up the extensions window, then click 'Get More Extensions'. Search for 'Launchy' on the Mozilla update web site, and download the latest version on the resulting web page (3.9.0). Verify successful installation by quitting Firefox and restarting it. After restart, bring up the Extensions window - you should see a window similar to the following
  4. Select the Launchy extension in the window, right-click 'Options', and select the 'launchy.xml' tab. Make a note of the path to the Firefox 'chrome' directory. Under Windows, copy the file from the Cidero './properties/launchy.xml' file to the chrome directory. Under Linux or MacOSX, copy the file './properties/launchyUnix.xml' or ./properties/launchyOSX.xml' to the chrome directory, taking care to rename it to simply 'launchy.xml' in the destination directory. Note that if the full path is not visible in the extensions options window (and the window doesn't resize), the typical path on a Windows system is something like 'C:\Documents and Settings\\Application Data\Mozilla\Firefox\Profiles\bmpa4eka.default\chrome', where the 'bmpa4eka.default' will likely be something else on your system.
  5. Edit the launchy.xml file in the chrome directory to reflect the pathname of your Cidero software installation. Take care to apply the necessary edit to all 4places (two lines, twice per line) the pathname appears. Make sure that the path to the Java executable is correct for your system as well (tends to be standardized pretty well across most Windows and MacOSX systems, but may vary quite a bit on Linux systems)
  6. Stop and restart Firefox. Click on Tools-Launchy-Options, and verify that there are two entries for a 'UPnP Media Player', one for a stream and one for a Tracklist. There should be a check in the 'Enabled' column next to them, as shown in the figure below.

  7. Sync Setup

  8. If everything looks good, bring up the Cidero controller on the same PC as Firefox. Activate one of your MediaRenderer devices by clicking on it (For the Roku Soundbridge, make sure a media library has been selected for the device using the Roku remote, otherwise playback commands will result in an error). Go to www.shoutcast.com, right click on one of the station buttons, and select 'Launchy-Open Link in UPnP Media Player (Stream)'. Moments after doing this, the selected playlist should show up in the MediaRenderer's play queue, and music should begin to play.

    As a test of Web-based file playback, go to www.archive.org, and select 'Live Music Archive'. From there, browse for bands with availabe MP3 files. Pick one of the MP3 files, or M3U playlists, and right-click 'Launchy-Open Link in UPnP Media Player (Tracklist)'. The single track or playlist should appear in the MediaRenderer control window and begin playing, assuming the renderer was in the stopped state (otherwise it just continues playing whatever it was playing.

    The general rule of thumb for chosing the 'Stream' option over the 'TrackList' is whether or not the playlist resource is a radio station, or whether it is simply a list of files that can be retrieved one at a time (such as those at www.archive.org). If in doubt, select 'TrackList' - the only downside is that some renderers may not request and receive shoutcast metadata if the stream supports it.If you select the 'Stream' option for a list of files, some renderers may simply play one song repeatedly over and over again, since they try to reconnect to the same stream whenever the connection is broken.


Hopefully this all worked without a hitch!

Suggestions and feedback on this functionality and/or setup procedure are always welcome.