A mapping of Event values to event handler callback functions.
Events can also be dynamically added and removed through PlayerAPI.on and PlayerAPI.off.
Example:
events : {
onReady: (data) => {
console.log('version: ' + this.getVersion() + ', onReady Event data: ', data);
},
onPlay: (data) => {
// do awesome stuff
},
onError: (data) => {
console.error('An error occurred:', data);
}
}
Generated using TypeDoc
A mapping of Event values to event handler callback functions.
Events can also be dynamically added and removed through PlayerAPI.on and PlayerAPI.off.
Example:
events : { onReady: (data) => { console.log('version: ' + this.getVersion() + ', onReady Event data: ', data); }, onPlay: (data) => { // do awesome stuff }, onError: (data) => { console.error('An error occurred:', data); } }