Listening to Webplayer Events
The Webplayer will emit events when certain things occur, such as on successful startup or error. You can use the .on()
method to register event listeners (one listener callback per event type). For example:
webplayer.on('success', (data) => {
console.log('Webplayer Success Event', data);
});
webplayer.on('error', (data) => {
console.error('Webplayer Error Event', data);
});