Player events
Here is a list of player events that you can define actions for. These are specified in the configuration root. For example:
flowplayer("player", "flowplayer-3.2.16.swf", {
// player events are defined directly to "root" (not inside a clip)
onLoad: function() {
alert("player loaded");
}
});
Each Player fires events that can inform you of changes in the Player
and of actions the Player intends to take or has just taken. The event
listener receives as its this variable a reference to the current
Player instance.
Before events are marked in italics in the table below. Not all events
have a before event. The ‘Cancel action’ column says what will happen
when a before event listener returns false.
| Event | When does it fire? | Cancel action |
|---|---|---|
|
onBeforeClick |
This event fires: after Flowplayer has been installed on the container, and the container element is not empty (it contains html), and it is clicked. Flowplayer's Note: when a new Player is installed, Flowplayer
will |
Flowplayer will not be installed. |
|
|
The Before the The |
Player will not be loaded. |
|
|
Flowplayer's default After the Player has been unloaded from a container that
contains html, clicking the container will (again) fire
the These events will only fire when the container was not empty. |
Player is not unloaded. |
|
|
This fires when the mouse pointer moves into the player area. | |
|
|
This fires when the mouse pointer moves out of the player area. | |
|
|
This fires when a user presses a key on the keyboard while the Player has the focus. The code corresponding to the key which has been pressed is provided as the first argument to the event listener. A list of different key codes is given here. |
Default keyboard actions are ignored. (By default, the spacebar toggles between playing and paused states, and the arrow keys seek backward and forward.) |
|
|
This fires when the volume level is changed (via any of
the |
Volume level is not changed. |
|
|
This fires when the player is muted. |
Volume level is not changed. |
|
|
This fires when the player is unmuted. |
Player stays muted. |
|
|
This fires when full screen mode is entered. |
Full screen mode will not be entered. |
|
|
This fires when full screen mode is exited. (Unfortunately, there is currently no 'onBeforeFullscreenExit' event. This is because the current implementation of Flash does not permit this action to be cancelled.) | |
|
|
Since 3.1.1. This fires when a clip was added to the playlist
via the | |
|
|
This fires when the playlist is swapped out for another. This
typically happens when the | |
|
|
This fires when an error occurs inside the player. The event
listener receives two arguments: |
Error Codes
|
100 |
Plugin initialization failed |
|---|---|
|
200 |
Stream not found |
|
201 |
Unable to load stream or clip file |
|
202 |
Provider specified in clip is not loaded |
|
300 |
Player initialization failed |
|
301 |
Unable to load plugin |
|
302 |
Error when invoking plugin external method |
|
303 |
Failed to load resource such as stylesheet or background image |