From 14913e1378825c2d3e726550c36b9c3688e00ac3 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Mon, 29 Aug 2016 15:40:18 -0700 Subject: [PATCH] Always use seek range to set seek bar size This reverts a small part of 3cad924c. Closes #477 Change-Id: Ie5df1e7ebda1e4ae38a1b3f805dc9b40b5672126 --- demo/controls.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/demo/controls.js b/demo/controls.js index 075b8a227b..32c8c0a851 100644 --- a/demo/controls.js +++ b/demo/controls.js @@ -547,11 +547,10 @@ ShakaControls.prototype.updateTimeAndSeekRange_ = function() { var bufferedEnd = bufferedLength ? this.video_.buffered.end(0) : 0; var seekRange = this.player_.seekRange(); - if (this.player_.isLive()) { - // For live, the seek bar size is the seek range. - this.seekBar_.min = seekRange.start; - this.seekBar_.max = seekRange.end; + this.seekBar_.min = seekRange.start; + this.seekBar_.max = seekRange.end; + if (this.player_.isLive()) { // The amount of time we are behind the live edge. var behindLive = Math.floor(seekRange.end - displayTime); displayTime = Math.max(0, behindLive); @@ -573,10 +572,6 @@ ShakaControls.prototype.updateTimeAndSeekRange_ = function() { this.seekBar_.value = seekRange.end - displayTime; } } else { - // For VOD and IPR, the seek bar size is from 0 to duration. - this.seekBar_.min = 0; - this.seekBar_.max = duration; - var showHour = duration >= 3600; this.currentTime_.textContent = this.buildTimeString_(displayTime, showHour);