Songbird Protocol Handler

Table of contents
  1. 1. Introduction
  2. 2. Commands
    1. 2.1. open
      1. 2.1.1. Summary
      2. 2.1.2. Parameters
      3. 2.1.3. Example
  3. 3. Web Launch Redirector
  4. 4.  

Introduction

Web developers often have visitors viewing their site in their default web browser (Firefox, Safari, etc.) but may wish to redirect a link to open inside Songbird.  For instance, music blogs or stores may wish to have users view their site within Songbird to utilise Webpage API features, or Songbird's media-scraping features.  In order to support this,  Songbird 1.1 and higher will register a songbird:// protocol handler with the operating system to enable webpages to redirect links to open within Songbird.  The exact format looks like:

songbird:<command>?value=pair&value=pair

Of course, if the user doesn't have Songbird installed, then no protocol handler will have been registered.  To remedy this, the Songbird website will have a Web Launch Redirection service to facilitate Songbird detection.  The Web Redirector will attempt to detect whether the user has Songbird installed (by use of a cookie installed from the Songbird download page, or by sniffing the user-agent to see if the user is already within Songbird), and forward the user through (depending on the command), or will prompt the user to download and install Songbird.

Any web developer can utilise this service freely

Commands

While the list of commands is expected to grow in the future, as of this article's writing (1.1 release-time), the only command implemented so far is open.

open

Summary
Launch Songbird and open a tab with the url contained in the url query string parameter. The new tab should have the focus.
Parameters
  • url
    • The URL to open in Songbird; MUST BE URL-ENCODED (see example)
Example
The following example would cause a new tab to open in Songbird, loading http://last.fm
songbird:open?url=http%3A%2F%2Flast.fm 

Web Launch Redirector

Of course, the songbird:// protocol handler is only effective if Songbird is installed.  To facilitate this, Songbird's website provides a Web Launch Redirector at http://launch.songbirdnest.com free for any web developer to use.  You can construct a link to look like:

http://launch.songbirdnest.com/<songbird PATH_INFO>

The URL to redirect to should be a songbird:// URL in the form of one of the above valid commands.  For instance, to provide a link to the Web Redirector to launch a new tab open to http://last.fm, the link should look like:

http://launch.songbirdnest.com/open?url=http://last.fm/
songbird:open?url=http://last.fm/

If the user doesn't have Songbird installed, then they will be prompted to download and install Songbird by the launch.songbirdnest.com site.

 

 

Tag page
You must login to post a comment.