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() { ...@@ -291,7 +291,7 @@ videojs.Hls.prototype.play = function() {
291 this.mediaIndex = 0; 291 this.mediaIndex = 0;
292 } 292 }
293 293
294 if (this.playlists.media() && !this.player().hasClass('vjs-has-started')) { 294 if (this.duration() === Infinity && this.playlists.media() && !this.player().hasClass('vjs-has-started')) {
295 this.mediaIndex = videojs.Hls.getMediaIndexForLive(this.playlists.media()); 295 this.mediaIndex = videojs.Hls.getMediaIndexForLive(this.playlists.media());
296 this.setCurrentTime(this.getCurrentTimeByMediaIndex(this.playlists.media(), this.mediaIndex)); 296 this.setCurrentTime(this.getCurrentTimeByMediaIndex(this.playlists.media(), this.mediaIndex));
297 } 297 }
......