We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e8c00d commit 9d3b586Copy full SHA for 9d3b586
lib/media/streaming_engine.js
@@ -1562,7 +1562,10 @@ shaka.media.StreamingEngine = class {
1562
1563
if (mediaState.segmentPrefetch && mediaState.segmentIterator &&
1564
!this.audioPrefetchMap_.has(mediaState.stream)) {
1565
- mediaState.segmentPrefetch.evict(reference.startTime);
+ // This will prevent duplicate segments from being downloaded when we
1566
+ // are close to the live edge.
1567
+ const fudgeTime = 0.001;
1568
+ mediaState.segmentPrefetch.evict(reference.startTime + fudgeTime);
1569
mediaState.segmentPrefetch.prefetchSegmentsByTime(reference.startTime)
1570
// We're treating this call as sync here, so ignore async errors
1571
// to not propagate them further.
0 commit comments