Starting as a pure remote control library now the WebPlayer JavaScript API enables the user to dynamically create WebPlayer instances and control them. Soon it will be possible to get notified about events happening inside the WebPlayer (e.g. player proceeded to next entry, etc.).
The remote chapter gives a short tutorial how you can remote control the WebPlayer. Our download section describes how the get the library. The following pages describe in detail all features of our WebPlayer JavaScript API. Please note that the Vanadium class is located inside the org.webminster object (package). To shorten the following description those package name has been left out.
Vanadium()
Constructor. Creates a javascript instance of the WebPlayer. To insert the instance as a flash movie into your webpage use write(string sParentId). To change the default properties use the following constructor.
Vanadium(
Constructor. Creates a javascript instance of the WebPlayer using the given properties instead of the default values.
sBinarySrc:
sSrc:
iWidth:
iHeight:
sAutoStart:
sLoop:
sRandom:
sPreviewPath:
sRemoteCtrl:
sDebug:
sId:
void Vanadium.write(string sParentId)
Creates a HTML tag to embed the WebPlayer flash movie within your web page. The WebPlayer is embedded as a child of the HTML tag which has the id sParentId. The created HTML tag is automatically chosen correctly depending on the users browser type (we use SWFObject for this).
void Vanadium.setId(string sId)
Allow to set the id of the player, which has to be controlled.
void Vanadium.play()
Starts playing current playlist entry.
void Vanadium.pause()
Pauses playing current playlist entry.
void Vanadium.stop()
Stops playing current playlist entry.
void Vanadium.setPosition(int iPos)
Sets Position of current played entry to iPos (in ms).
void Vanadium.setVolume(int iVol)
Sets volume of current played entry to iVol (in %).
void Vanadium.incVolume(int iVol)
Increases volume of current played entry by iVol (in %).
void Vanadium.decVolume(int iVol)
Decreases volume of current played entry by iVol (in %).
void Vanadium.next()
Continues with the next song in playlist.
void Vanadium.prev()
Returns to the previous song in playlist or restarts current song if position of song is less than 4s.
void Vanadium.gotoEntry(int iEntryPos)
Proceeds to the iEntryPos-th playlist-entry.
void Vanadium.openInfoWindow()
Opens an info window displaying information about the WebPlayer.
void Vanadium.registerEventHandler(fEventHandler)
Registers the function fEventHandler (call event handler). The event handler is called every time an event occures within the WebPlayer. The event handler function must have on numeric parameter which contains the event type identifier. All event type identifiers are listed here.
void Vanadium.deregisterEventHandler()
Deregisters the currently registered event handler.