Skip to content

Commit

Permalink
Always use seek range to set seek bar size
Browse files Browse the repository at this point in the history
This reverts a small part of 3cad924.

Closes #477

Change-Id: Ie5df1e7ebda1e4ae38a1b3f805dc9b40b5672126
  • Loading branch information
joeyparrish committed Aug 29, 2016
1 parent b5a8fe2 commit 14913e1
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions demo/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 14913e1

Please sign in to comment.