From edf89c48f82da699ae9562b18ad80f210d7b78df Mon Sep 17 00:00:00 2001 From: Daniel Silhavy Date: Mon, 9 Oct 2023 20:02:41 +0200 Subject: [PATCH] Fix/scheduling (#4296) * Fix bug in the request logic in case fastswitch is enabled. If there is no request that corresponds to a segment in the buffer to be replaced then perform a default quality switch. * Do not check for a new quality in case we are already performing a default quality switch --- package.json | 2 +- src/streaming/StreamProcessor.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 21ed8a3199..5a6fd9c8f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dashjs", - "version": "4.7.2", + "version": "4.7.3", "description": "A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.", "author": "Dash Industry Forum", "license": "BSD-3-Clause", diff --git a/src/streaming/StreamProcessor.js b/src/streaming/StreamProcessor.js index 56bfa81f66..e86cc88592 100644 --- a/src/streaming/StreamProcessor.js +++ b/src/streaming/StreamProcessor.js @@ -686,6 +686,7 @@ function StreamProcessor(config) { }, { mediaType: type, streamId: streamInfo.id }); // Abort appending segments to the buffer. Also adjust the appendWindow as we might have been in the progress of prebuffering stuff. + scheduleController.setCheckPlaybackQuality(false); bufferController.prepareForForceReplacementQualitySwitch(representationInfo) .then(() => { _bufferClearedForReplacement(); @@ -735,8 +736,7 @@ function StreamProcessor(config) { _prepareForDefaultQualitySwitch(representationInfo); } } else { - scheduleController.startScheduleTimer(); - qualityChangeInProgress = false; + _prepareForDefaultQualitySwitch(representationInfo); } } @@ -752,6 +752,7 @@ function StreamProcessor(config) { bufferController.updateBufferTimestampOffset(representationInfo) .then(() => { + scheduleController.setCheckPlaybackQuality(false); if (mediaInfo.segmentAlignment || mediaInfo.subSegmentAlignment) { scheduleController.startScheduleTimer(); } else {