Skip to content

Commit

Permalink
Merge pull request #2108 from CaliAlec/development
Browse files Browse the repository at this point in the history
Fix undefined fragData when using parsed manifest object
  • Loading branch information
Dan Sparacio committed Aug 18, 2017
2 parents c01f1b1 + 8867c80 commit 66d6492
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/streaming/controllers/PlaybackController.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,17 @@ function PlaybackController() {
function getStreamStartTime(ignoreStartOffset) {
let presentationStartTime;
let fragData = URIQueryAndFragmentModel(context).getInstance().getURIFragmentData();
let fragS = parseInt(fragData.s, 10);
let fragT = parseInt(fragData.t, 10);
let startTimeOffset = NaN;

if (!ignoreStartOffset) {
startTimeOffset = !isNaN(fragS) ? fragS : fragT;
if (fragData) {
let fragS = parseInt(fragData.s, 10);
let fragT = parseInt(fragData.t, 10);
if (!ignoreStartOffset) {
startTimeOffset = !isNaN(fragS) ? fragS : fragT;
}
} else {
// handle case where no media fragments are parsed from the manifest URL
startTimeOffset = 0;
}

if (isDynamic) {
Expand Down

0 comments on commit 66d6492

Please sign in to comment.