Skip to content

Commit

Permalink
fix(FEC-8306): No 'Play request' events are sent in web (#10)
Browse files Browse the repository at this point in the history
remove ready and initial tracks on TRACKS_CHANGE event.
  • Loading branch information
Dan Ziv authored Jun 13, 2018
1 parent 3f38242 commit a78647f
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 deletions src/kava.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,34 +162,32 @@ export default class Kava extends BasePlugin {
this._onSourceSelected()
);
this.eventManager.listen(this.player, this.player.Event.ERROR, event => this._onError(event));
this.player.ready().then(() => {
this._setInitialTracks();
this.eventManager.listen(this.player, this.player.Event.PLAYING, () => this._onPlaying());
this.eventManager.listen(this.player, this.player.Event.FIRST_PLAY, () =>
this._onFirstPlay()
);
this.eventManager.listen(this.player, this.player.Event.SEEKING, () => this._onSeeking());
this.eventManager.listen(this.player, this.player.Event.PAUSE, () => this._onPause());
this.eventManager.listen(this.player, this.player.Event.ENDED, () => this._onEnded());
this.eventManager.listen(this.player, this.player.Event.TIME_UPDATE, () =>
this._onTimeUpdate()
);
this.eventManager.listen(this.player, this.player.Event.VIDEO_TRACK_CHANGED, event =>
this._onVideoTrackChanged(event)
);
this.eventManager.listen(this.player, this.player.Event.ABR_MODE_CHANGED, event =>
this._onAbrModeChanged(event)
);
this.eventManager.listen(this.player, this.player.Event.AUDIO_TRACK_CHANGED, event =>
this._onAudioTrackChanged(event)
);
this.eventManager.listen(this.player, this.player.Event.TEXT_TRACK_CHANGED, event =>
this._onTextTrackChanged(event)
);
this.eventManager.listen(this.player, this.player.Event.PLAYER_STATE_CHANGED, event =>
this._onPlayerStateChanged(event)
);
});
this.eventManager.listen(this.player, this.player.Event.FIRST_PLAY, () => this._onFirstPlay());
this.eventManager.listen(this.player, this.player.Event.TRACKS_CHANGED, event =>
this._setInitialTracks(event)
);
this.eventManager.listen(this.player, this.player.Event.PLAYING, () => this._onPlaying());
this.eventManager.listen(this.player, this.player.Event.SEEKING, () => this._onSeeking());
this.eventManager.listen(this.player, this.player.Event.PAUSE, () => this._onPause());
this.eventManager.listen(this.player, this.player.Event.ENDED, () => this._onEnded());
this.eventManager.listen(this.player, this.player.Event.TIME_UPDATE, () =>
this._onTimeUpdate()
);
this.eventManager.listen(this.player, this.player.Event.VIDEO_TRACK_CHANGED, event =>
this._onVideoTrackChanged(event)
);
this.eventManager.listen(this.player, this.player.Event.ABR_MODE_CHANGED, event =>
this._onAbrModeChanged(event)
);
this.eventManager.listen(this.player, this.player.Event.AUDIO_TRACK_CHANGED, event =>
this._onAudioTrackChanged(event)
);
this.eventManager.listen(this.player, this.player.Event.TEXT_TRACK_CHANGED, event =>
this._onTextTrackChanged(event)
);
this.eventManager.listen(this.player, this.player.Event.PLAYER_STATE_CHANGED, event =>
this._onPlayerStateChanged(event)
);
}

_getRates(): Array<number> {
Expand Down

0 comments on commit a78647f

Please sign in to comment.