standardize events
- fixes (partially) hd indicator not showing up #682
- standardize progress, timeupdate, loadedmetadada and playbackstate events
Changes to event API
- this.trigger(Events.PLAYBACK_PLAYBACKSTATE)
+ this.trigger(Events.PLAYBACK_PLAYBACKSTATE, {type: this.playbackType})
- this.trigger(Events.PLAYBACK_LOADEDMETADATA, duration, loadmetrics)
+ this.trigger(Events.PLAYBACK_LOADEDMETADATA, {duration: duration, data: loadmetrics})
- this.trigger(Events.PLAYBACK_TIMEUPDATE, position, duration, this.name)
+ this.trigger(Events.PLAYBACK_TIMEUPDATE, {current: position, total: duration}, this.name)
- this.trigger(Events.PLAYBACK_PROGRESS, 0, this.el.getBytesLoaded(), this.el.getBytesTotal(), this.name)
+ this.trigger(Events.PLAYBACK_PROGRESS,{
+ start: 0,
+ current: this.el.getBytesLoaded(),
+ total: this.el.getBytesTotal()
+ })