An interface to control a media library from remote web pages. More...
import"sbIRemoteLibrary.idl";
Public Member Functions | |
sbIMediaItem | createMediaItem (in AString aURL) |
Create a media item from a URL. More... | |
sbIRemoteMediaList | createSimpleMediaList (in AString aName, [optional] in AString aSiteID) |
Create a simple media list. More... | |
void | createMediaListFromURL (in AString aName, in AString aURL, [optional] in sbICreateMediaListCallback aCallback, [optional] in AString aSiteID) |
Create a media list from an exising playlist file. More... | |
void | connectToDefaultLibrary (in AString aLibName) |
Connect the remote library to the main or web library. More... | |
sbIRemoteMediaList | getMediaListBySiteID (in AString aSiteID) |
Get the media list with the given siteID. More... | |
Public Attributes | |
attribute boolean | scanMediaOnCreation |
Control whether or not media is scanned when created. More... | |
readonly attribute nsISimpleEnumerator | playlists |
readonly attribute nsIVariant | mostPlayedArtists |
An interface to control a media library from remote web pages.
The remote library interface allows websites to create media items in a manner more web-like than the internal sbILibrary interface. Access to the main or web libraries is controlled through permissions set by the user. Some or all calls made to objects that implement this interface may fail based on the permissions set by the user.
Definition at line 111 of file sbIRemoteLibrary.idl.
void sbIRemoteLibrary::connectToDefaultLibrary | ( | in AString | aLibName | ) |
Connect the remote library to the main or web library.
This method retrieves the internal data model's library for use by the webpage.
aLibName | - Only accepted values are 'main' or 'web' |
sbIMediaItem sbIRemoteLibrary::createMediaItem | ( | in AString | aURL | ) |
Create a media item from a URL.
Create and insert a media item into the library
An | http or https URL that points to a valid media file |
void sbIRemoteLibrary::createMediaListFromURL | ( | in AString | aName, |
in AString | aURL, | ||
[optional] in sbICreateMediaListCallback | aCallback, | ||
[optional] in AString | aSiteID | ||
) |
Create a media list from an exising playlist file.
Create and insert a media list into the library. The URL passed in must be an http or https url that points to a type of playlist file supported by Songbird. That is currently: .pls, .m3u, .html, and rss type feeds.
aURL | A string that points to a type of playlist file that is supported by Songbird. It must be either http: or https: and one of the following playlist types: .pls, .m3u, .html and rss type feeds. |
aCallback | Optional callback object that gets called when the media list load is complete. |
sbIRemoteMediaList sbIRemoteLibrary::createSimpleMediaList | ( | in AString | aName, |
[optional] in AString | aSiteID | ||
) |
Create a simple media list.
Create and insert a media list into the library with the name passed in.
aName | A string to be used as an identifier on the media list. |
aSiteID | An optional string to be used as an identifier on the media list. If unspecified the siteID will be set to the value of aName. |
sbIRemoteMediaList sbIRemoteLibrary::getMediaListBySiteID | ( | in AString | aSiteID | ) |
Get the media list with the given siteID.
aSiteID | - The siteID of the media list to fetch |
readonly attribute nsIVariant sbIRemoteLibrary::mostPlayedArtists |
Definition at line 424 of file sbIRemoteLibrary.idl.
readonly attribute nsISimpleEnumerator sbIRemoteLibrary::playlists |
Definition at line 396 of file sbIRemoteLibrary.idl.
attribute boolean sbIRemoteLibrary::scanMediaOnCreation |
Control whether or not media is scanned when created.
This attribute controlls whether or not the library will cause the metadata to be scanned for any tracks created. If a website wants to hand-set its metadata then it should set this to false. By default this is true. If metadat for a particular track has already been scanned, that metadata will show up automatically ( for instance for 2 items created from the same URL ).
Definition at line 147 of file sbIRemoteLibrary.idl.