sbIPlaylistClickEvent.idl

Summary
A PlaylistClickEvent is passed to any event handlers listening for the PlaylistCellClick event fired on the document object.
The name of the property (column) that was clicked on e.g., “http://songbirdnest.com/data/1.0#trackName".
The MediaItem that corresponds to the row clicked on.

Events

PlaylistClickEvent

A PlaylistClickEvent is passed to any event handlers listening for the PlaylistCellClick event fired on the document object.  This event object also has some of the properties of MouseEvent.

Note that the Songbird object must be accessed before any events will be raised.  This will likely change in the future.

Fired on

document

Properties inherited from MouseEvent

ctrlKeytrue if the control key is down when the click occurred
altKeytrue if the alt key is down
shiftKeytrue if the shift key is down
metaKeytrue if the meta key is down
buttonwhich mouse button was pressed; 0 for primary, 1 for middle, and 2 for secondary.
typeconstant string, “PlaylistCellClick”
targetthe document object of the content page which displayed the playlist
bubblescontant true
cancelableconstant true
timeStampthe time at which the click occurred, as milliseconds from epoch

Properties inherited from MouseEvent, but not used

screenX screenY clientX clientY relatedTarget view detail

Example

function onPlaylistCellClick( aEvent ) {
// we can get the property that was clicked on...
alert(aEvent.property);

// or the <MediaItem>
alert(aEvent.item.guid);

// as well as key states from MouseEvent
alert(aEvent.ctrlKey);
}

// initialize the event system
songbird;

// attach the event handler
document.addEventListener("PlaylistCellClick", onPlaylistCellClick, false);

See Also

MediaItem http://developer.mozilla.org/en/docs/DOM:event http://developer.mozilla.org- /en- /docs- /DOM:element.addEventListener

Properties

property

The name of the property (column) that was clicked on e.g., “http://songbirdnest.com/data/1.0#trackName".  See MediaItem::getProperty() for standard properties.

Types

Properties

item

The MediaItem that corresponds to the row clicked on.

Types

<MediaItem>

A PlaylistClickEvent is passed to any event handlers listening for the PlaylistCellClick event fired on the document object.
Get the value of a property for this library object.
A MediaItem represents a partial or whole piece of media.
The Songbird object provides several pieces of functionality to your web page: playback, download, listener adding and removing and library creation and retrieval.