Skip to content

Commit

Permalink
Abort requests when deactivating a stream
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy committed May 27, 2021
1 parent a74357b commit e18e0a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/streaming/Stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ function Stream(config) {
const errored = false;
for (let i = 0; i < ln; i++) {
let fragmentModel = streamProcessors[i].getFragmentModel();
fragmentModel.abortRequests();
fragmentModel.resetInitialSettings();
streamProcessors[i].reset(errored, keepBuffers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/streaming/controllers/AbrController.js
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ function AbrController() {
if (type && streamProcessorDict[streamId] && streamProcessorDict[streamId][type]) {
const streamInfo = streamProcessorDict[streamId][type].getStreamInfo();
const bufferLevel = dashMetrics.getCurrentBufferLevel(type);
logger.info('[' + type + '] switch from ' + oldQuality + ' to ' + newQuality + '/' + maxIdx + ' (buffer: ' + bufferLevel + ') ' + (reason ? JSON.stringify(reason) : '.'));
logger.info('Stream ID: ' + streamId + ' [' + type + '] switch from ' + oldQuality + ' to ' + newQuality + '/' + maxIdx + ' (buffer: ' + bufferLevel + ') ' + (reason ? JSON.stringify(reason) : '.'));

qualityDict[streamId] = qualityDict[streamId] || {};
qualityDict[streamId][type] = newQuality;
Expand Down

0 comments on commit e18e0a4

Please sign in to comment.