diff --git a/lib/media/streaming_engine.js b/lib/media/streaming_engine.js index 16f8be75d1..47802a74d0 100644 --- a/lib/media/streaming_engine.js +++ b/lib/media/streaming_engine.js @@ -1381,6 +1381,10 @@ shaka.media.StreamingEngine = class { await this.append_( mediaState, presentationTime, stream, reference, dataToAppend, /* isChunkedData= */ true); + + if (mediaState.segmentPrefetch && mediaState.segmentIterator) { + mediaState.segmentPrefetch.prefetchSegments(reference); + } } }; @@ -1411,6 +1415,10 @@ shaka.media.StreamingEngine = class { await this.append_( mediaState, presentationTime, stream, reference, result); } + + if (mediaState.segmentPrefetch && mediaState.segmentIterator) { + mediaState.segmentPrefetch.prefetchSegments(reference); + } } else { if (this.config_.lowLatencyMode && !isReadableStreamSupported) { shaka.log.warning('Low latency streaming mode is enabled, but ' +