Dynamic rich media component for ASP.Net Flash, Video, Audio, FlashVideo and ToolTip / Balloon Help controls for C# and VB.Net

ASPNetMediaGUI PlayList JavaScript API Reference

The ASPNetMediaGUI PlayList JavaScript API provides an interface to control any ASPNetGUI.PlayList and ASPNetGUI.ClientPlayList control at run-time using JavaScript client code.

Please note that order of JavaScript code within the web page is important.  ASP.Net includes all JavaScript libraries in the <body> after the main form tag.  We suggest that you add your JavaScript API code towards the bottom of your HTML code.  If you wish to place JavaScript API commands in the <head> tag - you must call them on or after the window.onload event.

The API can be accessed by using the accessor function below: 

Accessor function

ASPNetMedia.PlayList (ControlName)

Returns an object allowing you to use the JavaScript API methods to control a PlayList object.

e.g. MyPlayList = ASPNetMedia.PlayList (“PlayList1”)

 

JavaScript API

To use the API functions, you must call them using the object returned by the Accessor function.

e.g. ASPNetMedia.PlayList (“PlayList1”). NextTrack()

NextTrack ()

Jumps to the next track on the play-list.

PreviousTrack ()

Jumps to the previous track on the play-list.

PlayTrack (intNewTrackNumber)

Jumps to any track in the play-list.  The track is selected using the integer parameter intNewTrackNumber .

StopPlayList ()

Stops the play-list’s associated media player.

 

JavaScript Events

To use ASPNetAudio Events, assign them a callback function. 

e.g.  

ASPNetMedia.Audio(“Audio1”). OnPause = function(object, position){
            alert(‘paused’);
}

The parameter object send in the ASPNetAudio API object for convenience.
The parameter position
returns the sound play-head’s position in seconds.

 

OnTrackChange (object, tracknumber)

Event triggered when the PlayList changes track. Not fired when the PlayList's DisplayMode = InvisibleClientControl.

OnPlayListFinish (object)

Event triggered when the PlayList is finished.