Skip to content

Commit

Permalink
Only set a target update time for live manifests.
Browse files Browse the repository at this point in the history
Issue #21

Change-Id: I7bb43972b08f1121268ae5590bd5f456f97659ab
  • Loading branch information
Timothy Drews authored and Gerrit Code Review committed Apr 8, 2015
1 parent a19ec93 commit 176aac3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/player/dash_video_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,11 @@ shaka.player.DashVideoSource.prototype.onStartStreams = function(
'Initial seek range:',
[this.seekStartTime_, this.seekEndTime_]);

// Set a target update time so we update the manifest before any Streams
// exhaust their SegmentIndexes.
this.setTargetUpdateTime_();

this.fireSeekRangeChangedEvent_();
if (this.manifestInfo.live) {
// Set a target update time so we update the manifest before any Streams
// exhaust their SegmentIndexes.
this.setTargetUpdateTime_();
this.setSeekRangeUpdateTimer_();
}
};
Expand Down Expand Up @@ -372,6 +371,8 @@ shaka.player.DashVideoSource.prototype.setUpdateTimer_ = function(
* @private
*/
shaka.player.DashVideoSource.prototype.setTargetUpdateTime_ = function() {
shaka.asserts.assert(this.manifestInfo && this.manifestInfo.live);

// Keep track of the the largest start time of the second last segment. We
// want to update the manifest before the video's current time reaches the
// last segment.
Expand Down

0 comments on commit 176aac3

Please sign in to comment.