Wimpy Player Event Listener Reference


The following events can be "listened" to using the "addListener" method.

Listener Name Pinged Returns
launch When a track is requested to load and play. Track Dataset 1
loadStart WWhen the track is "engaged" and begins loading, just prior to playing. (Since v7.4.36) Track Dataset 1
play When track starts to play. Track Dataset 1
pause When track is paused Track Dataset 1
done When track has finnished playing Track Dataset 1
skinReady When the skin is fully loaded and can be interacted with. none
enabled When player becomes the "live" player on the page. If there are multiple players on a single page, some of the players are disabled, and only one player can be enabeled and "live" at a time. none
disabled When player becomes disabled. none
playlistReady When a playlist is available (loaded and rendered) The playlist as a Javascript Array of Track Datasets 1

Pinged after the last item in a playlist is finished playing. If playlist looping is enabled (and the auto advance option is enabled), the playlist will still wrap around and start playing the first item.

This option is useful for larger music collections where loading a masssive playlist is impractical. Leveraging this option will allow you to load smaller portions only as needed. Use the setPlaylist or appendPlaylist API method to load more tracks or replace the playlist.

link Pinged whenever a link icon in the playlist is clicked. This event is fired with or without an active linkHandler. (A linkHandler will block the default functionality.) Track Dataset. 1
download Pinged whenever a download icon in the playlist is clicked. This event is fired with or without an active downloadHandler. (A downloadHandler will block default functionality.) Track Dataset 1
resize Pinged whenever the player is resized. A player can be set up to automatically resize itself, so this listener allows you to be notified when the player's size changes without manually changing the size. Note that even when manually resizing this notification will still be sent. none

There are 3 kinds of activity this listener returns:

-1 = no activity, nothing playing
0 = Loading initiated, but hasn't started playing yet (thinking)
1 = Player is playing.


Continuously monitor the player recieving:

- player - (WimpyPlayer) The player that is dispatching the event.
- activity - (integer) If the player is actively playing anything (same as what the "activity" listener returns.
- playerState - (object) General inofrmation about the play time. Same data is returned as from getStatus()
- amScrubbing - (boolean) Inidcates that the user is actively moving the timeline (scrubber) control, which causes the playerState to show different readings, but no activity because the player gets paused during this operation.

Example usage:

myPlayer.addEventListener("runtime", monitor, this);
function monitor(player, activity, playerState, amScrubbing){
  // do your thing here.

(player, activity, playerState, amScrubbing)

1. A Track Dataset ia and object containing current track info. The info is identical to the object returned by the getTrackDataset method.