User Tools

Site Tools


developer_center:recipe_book:extensions_and_core:properties

Properties

Libraries, lists, and media items all have properties accessible via the .getProperty() API. .getProperty takes a property name and will contain metadata such as track name, artist name, duration, whether a playlist is editable or hidden, etc.

Nightingale itself ships with a set of default properties. Developers (using either the extension API, or Webpage API) can define new third-party properties. Properties are defined using namespaces, with all the default Nightingale ones namespaced at 'http://songbirdnest.com/data/1.0'. The canonical list of Nightingale stock properties is always available in sbStandardProperties.h

For extensions, an easy way to access the properties is to import sbProperties.jsm and use the SBProperties object:

Components.utils.import("resource://app/jsmodules/sbProperties.jsm");

alert(someItem.getProperty(SBProperties.trackName));
developer_center/recipe_book/extensions_and_core/properties.txt · Last modified: 2013/12/28 10:04 by geekshadow