Skip to content

Commit

Permalink
Merge pull request #2985 from Orange-OpenSource/preloadRegressionFix
Browse files Browse the repository at this point in the history
Preload regression fix
  • Loading branch information
epiclabsDASH committed May 6, 2019
2 parents f292782 + afc03ae commit f790bb9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/streaming/PreBufferSink.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ function PreBufferSink(onAppendedCallback) {
// Nothing to do
}

function getBuffer() {
return this;
}

/**
* Return the all chunks in the buffer the lie between times start and end.
* Because a chunk cannot be split, this returns the full chunk if any part of its time lies in the requested range.
Expand Down Expand Up @@ -159,7 +163,8 @@ function PreBufferSink(onAppendedCallback) {
reset: reset,
updateTimestampOffset: updateTimestampOffset,
hasDiscontinuitiesAfter: hasDiscontinuitiesAfter,
waitForUpdateEnd: waitForUpdateEnd
waitForUpdateEnd: waitForUpdateEnd,
getBuffer: getBuffer
};

setup();
Expand Down
2 changes: 1 addition & 1 deletion src/streaming/Stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ function Stream(config) {
filterCodecs(Constants.VIDEO);
filterCodecs(Constants.AUDIO);

if (element === null || (element && (/^VIDEO$/i).test(element.nodeName))) {
if (!element || (element && (/^VIDEO$/i).test(element.nodeName))) {
initializeMediaForType(Constants.VIDEO, mediaSource);
}
initializeMediaForType(Constants.AUDIO, mediaSource);
Expand Down

0 comments on commit f790bb9

Please sign in to comment.