Here we have a playlist consisting of four clips. Every time a clip starts we update this area with a data that is fetched from the server.
Click on the player to see it in action.
Here is a demonstration of the power of events. Every time a clip starts in the playlist we update the info area besides the video screen.
There are three types of events
player events, which occur in the player as a whole
clip events, which are specific to a particular clip
cuepoints, these events are defined by you. They allow you to execute code at predefined times during playback
Event actions are specified in the Flowplayer configuration just like
functions. In previous demo we used
onStart event as follows.
The internal properties and methods exposed by Flowplayer that you can access inside your event handlers are described below.
operating. In essence the context works through the variable
Flowplayer events you can use the variable
this to get hold of the
current Player instance. This is
extremely powerful. For example:
All clip event actions receive the clip's corresponding clip object through their first argument. This object provides a programmatic representation of the clip, and includes all of the clip's current properties, including custom properties.
Again the variable
this points to the
Multiple event listeners
You can add multiple event listeners of the same type by using the
onStart event listeners. Click on it to see them in action.
Note that we avoid to use
alert for information display, as a bug in the
handling of the Flash plugin by Firefox for Mac would freeze Firefox.