Skip to content

Commit

Permalink
Merge pull request #64 from vigneshvg/master
Browse files Browse the repository at this point in the history
mpd parser: Handle minimumUpdatePeriod being set to 0.
  • Loading branch information
joeyparrish committed Apr 22, 2015
2 parents 1899151 + 72fe1b2 commit deddd52
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ Oskar Arvidsson <[email protected]>
Sanborn Hilland <[email protected]>
Timothy Drews <[email protected]>
Vasanth Polipelli <[email protected]>
Vignesh Venkatasubramanian <[email protected]>
13 changes: 11 additions & 2 deletions lib/dash/mpd_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -830,12 +830,21 @@ shaka.dash.mpd.Mpd.prototype.parse = function(parent, elem) {
mpd.parseDuration_,
this.minBufferTime);

// Disallow zero.
this.minUpdatePeriod =
mpd.parseAttr_(elem,
'minimumUpdatePeriod',
mpd.parseDuration_,
this.minUpdatePeriod) || null;
this.minUpdatePeriod);

// If minimumUpdatePeriod is set to 0, then we shouldn't refresh the manifest
// unless there is explicit signalling in the stream, according to:
// http://azure.microsoft.com/blog/2014/09/13/dash-live-streaming-with-azure-media-service/
// There is no way to get the signal from within the stream in MSE as of now.
// So, if we see a minimumUpdatePeriod of zero, we merely set it to 10
// seconds.
if (this.minUpdatePeriod == 0) {
this.minUpdatePeriod = 10;
}

this.availabilityStartTime =
mpd.parseAttr_(elem,
Expand Down

0 comments on commit deddd52

Please sign in to comment.