2232121b by bc-bbay Committed by Brandon Bay

Checking for live on play event adjustment

Change was affecting all HLS streams, not only live ones
1 parent a44ade4c
......@@ -291,7 +291,7 @@ videojs.Hls.prototype.play = function() {
this.mediaIndex = 0;
}
if (this.playlists.media() && !this.player().hasClass('vjs-has-started')) {
if (this.duration() === Infinity && this.playlists.media() && !this.player().hasClass('vjs-has-started')) {
this.mediaIndex = videojs.Hls.getMediaIndexForLive(this.playlists.media());
this.setCurrentTime(this.getCurrentTimeByMediaIndex(this.playlists.media(), this.mediaIndex));
}
......