sbICoreWrapper Interface Reference

A wrapper for various media cores Defines the inteface for objects that will provide playback functionality. More...

import "sbICoreWrapper.idl";

List of all members.

Public Member Functions

boolean getPaused ()
 Get the pause state Return the pause state of the playback core.
boolean getPlaying ()
 Get the playing state Return the play state of the playback core. If the core is stopped, this will return FALSE, but if paused it will still return TRUE.
boolean getMute ()
 Get the mute state.
void setMute (in boolean aMute)
 Set the mute state.
unsigned long getVolume ()
 Get the volume.
void setVolume (in unsigned long aVolume)
 Set the volume.
unsigned long long getLength ()
 Get the length of the current media.
unsigned long long getPosition ()
 Get the position within the current media.
void setPosition (in unsigned long long aPosition)
 Set the position of playback.
void goFullscreen ()
 Maximize the plugin window to be fullscreen. Have the plugin render to the full size of the screen.
AString getId ()
 Generic id string.
void setId (in AString aId)
 Set the string identifier.
nsIDOMHTMLElement getObject ()
 Retrieve the HTML element that implements playback functionality This gets the object that actually implements the playback functionality. For some cores this will be an nsIHTMLDOMObjectElement and some it will be an nsIHTMLDOMEmbedElement. Either way, it is the additional javascript API that exists on the object that will be utilized in most cases.
void setObject (in nsIDOMHTMLElement aObject)
 Set the HTML element that implements playback functionality This sets the object that actually implements the playback functionality. For some cores this will be an nsIHTMLDOMObjectElement and some it will be an nsIHTMLDOMEmbedElement. Either way, it is the additional javascript API that exists on the object that will be utilized in most cases.
boolean playURL (in AString aURL)
 Specify the url to play and start playback.
boolean play ()
 Resume paused playback. Multiple calls do nothing.
boolean stop ()
 Stop playback.
boolean pause ()
 Pause playing playback. Multiple calls do nothing.
AString getMetadata (in AString aKey)
 Get the requested metadata.
void onSwapCore ()
 Called when the core is swapping. Allows the core to do any cleaning up it needs to. Also stops the playback of any media.
boolean isMediaURL (in AString aURL)
 Check to see if an url points to media content This checks for a number of known file extensions and prefixes to see if the URL contains them and is therefore media.
boolean isVideoURL (in AString aURL)
 Check to see if an url points to video content This checks for a number of known file extensions to see if the URL contains them and is therefore video.


Detailed Description

A wrapper for various media cores Defines the inteface for objects that will provide playback functionality.

See also:
baseCore coreFlash

Definition at line 44 of file sbICoreWrapper.idl.


Member Function Documentation

AString sbICoreWrapper::getId (  ) 

Generic id string.

Returns:
String identifier

unsigned long long sbICoreWrapper::getLength (  ) 

Get the length of the current media.

Returns:
The length, in milliseconds, of the current media.

AString sbICoreWrapper::getMetadata ( in AString  aKey  ) 

Get the requested metadata.

Parameters:
aKey - The category of metadata to retrieve (name, artist, etc...)
Returns:
The value of the metadata, the empty string if it is not set or doesn't exist.

boolean sbICoreWrapper::getMute (  ) 

Get the mute state.

Returns:
TRUE if muted

FALSE if not muted

nsIDOMHTMLElement sbICoreWrapper::getObject (  ) 

Retrieve the HTML element that implements playback functionality This gets the object that actually implements the playback functionality. For some cores this will be an nsIHTMLDOMObjectElement and some it will be an nsIHTMLDOMEmbedElement. Either way, it is the additional javascript API that exists on the object that will be utilized in most cases.

Returns:
The HTML element.

boolean sbICoreWrapper::getPaused (  ) 

Get the pause state Return the pause state of the playback core.

Returns:
TRUE if paused

FALSE if not paused

boolean sbICoreWrapper::getPlaying (  ) 

Get the playing state Return the play state of the playback core. If the core is stopped, this will return FALSE, but if paused it will still return TRUE.

Returns:
TRUE if playing (paused or not)

FALSE if not playing

unsigned long long sbICoreWrapper::getPosition (  ) 

Get the position within the current media.

Returns:
Position of playback in the current media, in milliseconds

unsigned long sbICoreWrapper::getVolume (  ) 

Get the volume.

Returns:
An integer between 0 and 255 inclusive

void sbICoreWrapper::goFullscreen (  ) 

Maximize the plugin window to be fullscreen. Have the plugin render to the full size of the screen.

Returns:
void

boolean sbICoreWrapper::isMediaURL ( in AString  aURL  ) 

Check to see if an url points to media content This checks for a number of known file extensions and prefixes to see if the URL contains them and is therefore media.

Parameters:
aURL - the URL to check
Returns:
true if the URL points to media content

false if the URL does not point to media content

boolean sbICoreWrapper::isVideoURL ( in AString  aURL  ) 

Check to see if an url points to video content This checks for a number of known file extensions to see if the URL contains them and is therefore video.

Parameters:
aURL - the URL to check
Returns:
true if the URL points to video content

false if the URL does not point to video content

void sbICoreWrapper::onSwapCore (  ) 

Called when the core is swapping. Allows the core to do any cleaning up it needs to. Also stops the playback of any media.

Returns:
void

boolean sbICoreWrapper::pause (  ) 

Pause playing playback. Multiple calls do nothing.

Returns:

boolean sbICoreWrapper::play (  ) 

Resume paused playback. Multiple calls do nothing.

Returns:

boolean sbICoreWrapper::playURL ( in AString  aURL  ) 

Specify the url to play and start playback.

Parameters:
\return true If playback was successful.
Returns:
false If there was an error with playback
Exceptions:
NS_ERROR_INVALID_ARG If the URL passed in is null/undefined.
NS_ERROR_NOT_INITIALIZED If no object has been set.

void sbICoreWrapper::setId ( in AString  aId  ) 

Set the string identifier.

Parameters:
aId - the string identifier

void sbICoreWrapper::setMute ( in boolean  aMute  ) 

Set the mute state.

Parameters:
aMute - A boolean indicating the desired mute state

void sbICoreWrapper::setObject ( in nsIDOMHTMLElement  aObject  ) 

Set the HTML element that implements playback functionality This sets the object that actually implements the playback functionality. For some cores this will be an nsIHTMLDOMObjectElement and some it will be an nsIHTMLDOMEmbedElement. Either way, it is the additional javascript API that exists on the object that will be utilized in most cases.

Parameters:
aObject The HTML element
Returns:
void

void sbICoreWrapper::setPosition ( in unsigned long long  aPosition  ) 

Set the position of playback.

Parameters:
aPosition - The position, in milliseconds, of where to move the playback to.

void sbICoreWrapper::setVolume ( in unsigned long  aVolume  ) 

Set the volume.

Parameters:
aVolume - an integer between 0 and 255 inclusive

boolean sbICoreWrapper::stop (  ) 

Stop playback.

Returns:


The documentation for this interface was generated from the following file:
Generated on Mon Aug 21 21:01:55 2006 for Songbird by  doxygen 1.4.7