Page History
Events are registered with an event name, a callback function, and
an optional priority. The higher the priority, the earlier the callback will be called.
Note |
---|
Please note that the following functions can be performed only after you have successfully undertaken the first steps (see |
the "Getting started" chapter). |
After you have connected to the player, you can register or remove the callback using the following functions
:
Register Callback Event:
Code Block |
---|
| ||
Player.registerEventListener(eventName, |
Name of the event. Currently all known HTML5 media events are supported (for a list of all events, for example, see the following link: Media-Events)
Remove Callback Event
function(event) {...}, priority = 0); |
Remove Callback Event:
Code Block | ||
---|---|---|
|
Player.unregisterEventListener(eventName, |
functionName, priority = 0); |
Parameter | Description | ||
---|---|---|---|
eventName | Name of the event. Currently all known HTML5 media events are supported (for a list of all events, for example, see the following link: Media-Events). We also provide a couple of additional events (see the "Supported Events" chapter). | ||
callback | A function that should be called when the event is triggered. This can be either the name of the function or the function definition itself. Set up the callback function to receive an event object, this may provide useful data specific to the type of event used.
| ||
priority | An optional argument that sets the priority of the event (defaults to 0). The higher the value, the earlier the callback will be called. |