A mapping of PlayerEvent values to event handler callback functions.
Events can also be dynamically added and removed through on and off.
Example:
events : { [PlayerEvent.SourceLoaded]: (data) => { console.log('version: ' + this.getVersion() + ', onReady Event data: ', data); }, [PlayerEvent.Play]: (data) => { // do awesome stuff }, [PlayerEvent.Error]: (data) => { console.error('An error occurred:', data); }} Copy
events : { [PlayerEvent.SourceLoaded]: (data) => { console.log('version: ' + this.getVersion() + ', onReady Event data: ', data); }, [PlayerEvent.Play]: (data) => { // do awesome stuff }, [PlayerEvent.Error]: (data) => { console.error('An error occurred:', data); }}
A mapping of PlayerEvent values to event handler callback functions.
Events can also be dynamically added and removed through on and off.
Example: