Skip to content

Commit

Permalink
fix(HLS): Fix avoid prefetch missing segments (shaka-project#5372)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad committed Jun 29, 2023
1 parent c25b26a commit 7f8e051
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/media/segment_prefetch.js
Expand Up @@ -73,6 +73,10 @@ shaka.media.SegmentPrefetch = class {
if (reference.isPreload() && reference.endByte != null) {
prefetchAllowed = false;
}
if (reference.getStatus() ==
shaka.media.SegmentReference.Status.MISSING) {
prefetchAllowed = false;
}
if (prefetchAllowed && !this.segmentPrefetchMap_.has(reference)) {
const segmentPrefetchOperation =
new shaka.media.SegmentPrefetchOperation(this.fetchDispatcher_);
Expand Down

0 comments on commit 7f8e051

Please sign in to comment.