Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
bindEvents() {
this.listenTo(this.container, Events.CONTAINER_BITRATE, this.onBitrate)
this.listenTo(this.container, Events.CONTAINER_STOP, this.stopReporting)
this.listenTo(this.container, Events.CONTAINER_ENDED, this.stopReporting)
this.listenToOnce(this.container.playback, Events.PLAYBACK_PLAY_INTENT, this.startTimers)
this.listenToOnce(this.container, Events.CONTAINER_PLAY, this.onFirstPlaying)
this.listenTo(this.container, Events.CONTAINER_PLAY, this.onPlay)
this.listenTo(this.container, Events.CONTAINER_PAUSE, this.onPause)
this.listenToOnce(this.container, Events.CONTAINER_STATE_BUFFERING, this.onBuffering)
this.listenTo(this.container, Events.CONTAINER_SEEK, this.onSeek)
this.listenTo(this.container, Events.CONTAINER_ERROR, () => this._inc('error'))
this.listenTo(this.container, Events.CONTAINER_FULLSCREEN, () => this._inc('fullscreen'))
this.listenTo(this.container, Events.CONTAINER_PLAYBACKDVRSTATECHANGED, (dvrInUse) => {dvrInUse && this._inc('dvrUsage')})
this.listenTo(this.container.playback, Events.PLAYBACK_PROGRESS, this.onProgress)
this.listenTo(this.container.playback, Events.PLAYBACK_TIMEUPDATE, this.onTimeUpdate)
}
bindEvents() {
this.listenTo(this.container, Events.CONTAINER_BITRATE, this.onBitrate)
this.listenTo(this.container, Events.CONTAINER_STOP, this.stopReporting)
this.listenTo(this.container, Events.CONTAINER_ENDED, this.stopReporting)
this.listenToOnce(this.container.playback, Events.PLAYBACK_PLAY_INTENT, this.startTimers)
this.listenToOnce(this.container, Events.CONTAINER_PLAY, this.onFirstPlaying)
this.listenTo(this.container, Events.CONTAINER_PLAY, this.onPlay)
this.listenTo(this.container, Events.CONTAINER_PAUSE, this.onPause)
this.listenToOnce(this.container, Events.CONTAINER_STATE_BUFFERING, this.onBuffering)
this.listenTo(this.container, Events.CONTAINER_SEEK, this.onSeek)
this.listenTo(this.container, Events.CONTAINER_ERROR, () => this._inc('error'))
this.listenTo(this.container, Events.CONTAINER_FULLSCREEN, () => this._inc('fullscreen'))
this.listenTo(this.container, Events.CONTAINER_PLAYBACKDVRSTATECHANGED, (dvrInUse) => {dvrInUse && this._inc('dvrUsage')})
this.listenTo(this.container.playback, Events.PLAYBACK_PROGRESS, this.onProgress)
this.listenTo(this.container.playback, Events.PLAYBACK_TIMEUPDATE, this.onTimeUpdate)
}