mirror of
https://github.com/LuanRT/googlevideo.git
synced 2026-06-28 09:06:41 +00:00
fix(SabrUmpProcessor): Init segment not being fetched when cache is disabled
This commit is contained in:
@@ -199,11 +199,14 @@ export class SabrUmpProcessor {
|
||||
* and caching the init segment reduces latency when switching between different quality levels
|
||||
* or initializing new streams.
|
||||
*/
|
||||
if (this.cacheManager && this.requestMetadata.isInit && this.requestMetadata.byteRange && this.requestMetadata.format) {
|
||||
this.cacheManager.setInitSegment(
|
||||
createSegmentCacheKey(segment.mediaHeader, this.requestMetadata.format),
|
||||
segmentData
|
||||
);
|
||||
if (this.requestMetadata.isInit && this.requestMetadata.byteRange && this.requestMetadata.format) {
|
||||
if (this.cacheManager) {
|
||||
this.cacheManager.setInitSegment(
|
||||
createSegmentCacheKey(segment.mediaHeader, this.requestMetadata.format),
|
||||
segmentData
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
data: segmentData.slice(this.requestMetadata.byteRange.start, this.requestMetadata.byteRange.end + 1),
|
||||
done: true
|
||||
|
||||
Reference in New Issue
Block a user