August 28, 2008, Thursday, 240

Firefox Operator Extensions

From DBWiki

Jump to: navigation, search

Contents

Introduction

The Firefox web browser is capable of discovering structured data such as people, places, events and music that are embedded in web pages. The Operator Firefox extension is the main tool that people can use to view this structured data in web pages.

Digital Bazaar has modified the basic Operator extension to provide the capability to detect music metadata in a web page, display it to the person browsing, and execute actions to be taken on the data. Actions can be a variety of things: "search for album on Google", or "listen to a song sample on Bitmunk", "purchase song from Amazon", or a variety of other things one might want to do with the music metadata.

Downloading and Installing Operator

You can get the modified Digital Bazaar Operator extension from the following URL:

http://wiki.digitalbazaar.com/download/operator-0.8.1/operator-digitalbazaar-0.8.xpi

Once you click on the link above, Firefox will prompt you to install the plug-in. Install the plug-in and re-start Firefox.

You will also need to download the following file to a temporary directory:

http://wiki.digitalbazaar.com/download/operator-0.8.1/hAudio.js

Adding hAudio to Operator

  1. Click on the Operator "Options" button to modify the options.
  2. Make sure "Display Format" for operator is set to "Data formats" and "Use descriptive names" is checked. Make sure you are running in "Debug mode".
  3. Install the hAudio.js file by selecting the "User Scripts" tab and clicking on the "New" button.
  4. Click on the "Ok" button at the bottom of the options screen. Click on the "Options" button to modify the options on the main Firefox UI once again. This is a work-around for a current Operator bug that forces Operator to re-load the available data formats.
  5. Enable the hAudio Microformat by selecting the "Data Formats" tab, clicking on the "New" button and select "hAudio".
  6. Enable the hAudio RDFa Album format by selecting the "Data Formats" tab, clicking on the "New" button and selecting "Albums".
  7. Enable the hAudio RDFa Song format by selecting the "Data Formats" tab, clicking on the "New" button and selecting "Songs".
  8. You may have to rename the "RDFa" data format to "RDF" in the Data Formats tab. There was a bug when upgrading from Operator 0.7 that causes this bug to not allow RDFa to be detected on a web page using Operator 0.8 or greater.
  9. Restart Firefox.

Discovering Music Metadata

Digital Bazaar's legal P2P music network, Bitmunk, currently has over 1 million pieces of information marked up using both Microformats and RDFa. To see the Firefox Operator extension for music in action, you can visit any one of the album pages on Bitmunk.

For a demonstration of how this works for online storefronts, check out the latest Celldweller CD on Bitmunk.

For a demonstration of how this works for bloggers, check out the Scissorkick demo.

Known Bugs

Opaque properties

Operator will need to have support for opaque properties in order to fully support hAudio. We need opaque properties for the ITEM property.

Implicit typing for properties

Operator currently does not have a way of stating that an ITEM is of type HAUDIO without specifying both ITEM and HAUDIO together. In other words, Operator will not find the two songs listed below if the data is marked up like so:

<div class="haudio">
   <span class="fn album">Album Name</span>
   <div class="item">
      <span class="fn">Song Name 1</span>
      <span class="category">live</span>
   </div>
   <div class="item">
      <span class="fn">Song Name 2</span>
      <span class="category">studio</span>
   </div>
</div>

Instead, you have to mark the above up like this:

<div class="haudio">
   <span class="fn album">Album Name</span>
   <div class="item haudio">
      <span class="fn">Song Name 1</span>
      <span class="category">live</span>
   </div>
   <div class="item haudio">
      <span class="fn">Song Name 2</span>
      <span class="category">studio</span>
   </div>
</div>

The only change is from "item" to "item haudio" for the song. This "bug" will eventually get fixed once we chat a bit with Mike Kaply.

Optimizations

No optimizations have been implemented yet.