Skip to content

Commit

Permalink
Fix wrong reference to streamInfo once buffering is completed. Due to…
Browse files Browse the repository at this point in the history
… this, signalEndOfStream was not called for multiperiod VoD streams and playback stalled some frames before the end.
  • Loading branch information
dsilhavy committed Jun 8, 2021
1 parent 01ec0d3 commit a1297a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/streaming/controllers/StreamController.js
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ function StreamController() {
*/
function _onStreamBufferingCompleted(e) {
logger.debug(`Stream with id ${e.streamInfo.id} finished buffering`);
const isLast = getActiveStreamInfo().isLast;
const isLast = e.streamInfo.isLast;
if (mediaSource && isLast) {
logger.info('[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController.');
mediaSourceController.signalEndOfStream(mediaSource);
Expand Down

0 comments on commit a1297a2

Please sign in to comment.