Skip to content

Commit

Permalink
Fix/scheduling (#4296)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
dsilhavy authored Oct 9, 2023
1 parent 798b07b commit edf89c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
5 changes: 3 additions & 2 deletions src/streaming/StreamProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -735,8 +736,7 @@ function StreamProcessor(config) {
_prepareForDefaultQualitySwitch(representationInfo);
}
} else {
scheduleController.startScheduleTimer();
qualityChangeInProgress = false;
_prepareForDefaultQualitySwitch(representationInfo);
}
}

Expand All @@ -752,6 +752,7 @@ function StreamProcessor(config) {

bufferController.updateBufferTimestampOffset(representationInfo)
.then(() => {
scheduleController.setCheckPlaybackQuality(false);
if (mediaInfo.segmentAlignment || mediaInfo.subSegmentAlignment) {
scheduleController.startScheduleTimer();
} else {
Expand Down

0 comments on commit edf89c4

Please sign in to comment.