DOWNLOADS EXAMPLES SKINS DOCS SUPPORT
 
 

Event Handlers

Event Handlers enable the player to "ping back" to Javascript when certain events within the player occur. These features allow for more robust interaction with the player to minimize the necessity to "poll" the player continuously in order to obtain certain kinds of feedback as to what users are doing with the player. In addition, you can "wire" certain user clicks to interact with Javascript in order to perform a variety of tasks.

The Event Handler feature is intended for advanced webmasters who are comfortable with AJAX.

IMPORTANT NOTE: In order to use this option, the variable named "enableWimpyEvents" within the wasp.js file must be set to TRUE. You must edit this variable manually.

var enableWaspEvents = true;

With the exception of "handleWmpyInit", all of the Event Handlers return a Javascript Object that contains all of the player's settings, including:

- All of the configuration settings
- Load state (if available) -- see wasp_getLoadState in the Function Reference section
- Player state (if available) -- see wasp_getPlayerState in the Function Reference section
- Tool bar height
- Viewport width and height (sourceWidth and sourceHeight)

handleWaspInit()

Pinged when Wasp initializes and is ready to accept requests.

Returns: Boolean: TRUE

 

handleTrackLaunched()

Pinged when a file has started to play. Wasp will return an object containing all of the settings for the current track.

Returns: Player configuration as an object.

 

handleTrackStarted()

Pinged when a the track starts to play. Returns the player object.

Returns: Player configuration as an object.

 

handleTrackDone()

Pinged when a file has finished playing. Wasp will return an object containing all of the settings for the current track.

Returns: Player configuration as an object.

 

handleTrackWindowClick()

Pinged when the view port window is clicked.

This feature requires the player to be configured so that "Click Video Window is set to "script" (e.g. wa=5 or <wa>5</wa>).

Returns: Player configuration as an object.

 

handleTrackLinkClick()

Pinged when the "link" button is clicked.

This feature requires the player to be configured so that "Link Button is set to "script" (e.g. la=3 or <la>3</la>).

Returns: Player configuration as an object.

 

 

 

 

 

 

  ©Copyright Plaino LLC. All rights reserved.