]
monitoredEvents.forEach(e => {
- player.addEventListener(e as PlayerEventType, () => console.log(`PLAYER: event '${e}' received`))
+ player.addEventListener(e as PlayerEventType, (param) => console.log(`PLAYER: event '${e}' received`, param))
console.log(`PLAYER: now listening for event '${e}'`)
})
You can subscribe to events by using `addEventListener()`. See above for details.
-## Event `play`
-
-Fired when playback begins or is resumed after pausing.
-
-## Event `pause`
-
-Fired when playback is paused.
-
## Event `playbackStatusUpdate`
Fired every half second to provide the current status of playback. The parameter of the callback will resemble:
## Event `playbackStatusChange`
-Fired when playback transitions between states, such as `pausing` and `playing`. More states may be added later.
+Fired when playback transitions between states, such as `paused` and `playing`. More states may be added later.
## Event `resolutionUpdate`