File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -199,11 +199,14 @@ export class SabrUmpProcessor {
199199 * and caching the init segment reduces latency when switching between different quality levels
200200 * or initializing new streams.
201201 */
202- if ( this . cacheManager && this . requestMetadata . isInit && this . requestMetadata . byteRange && this . requestMetadata . format ) {
203- this . cacheManager . setInitSegment (
204- createSegmentCacheKey ( segment . mediaHeader , this . requestMetadata . format ) ,
205- segmentData
206- ) ;
202+ if ( this . requestMetadata . isInit && this . requestMetadata . byteRange && this . requestMetadata . format ) {
203+ if ( this . cacheManager ) {
204+ this . cacheManager . setInitSegment (
205+ createSegmentCacheKey ( segment . mediaHeader , this . requestMetadata . format ) ,
206+ segmentData
207+ ) ;
208+ }
209+
207210 return {
208211 data : segmentData . slice ( this . requestMetadata . byteRange . start , this . requestMetadata . byteRange . end + 1 ) ,
209212 done : true
You can’t perform that action at this time.
0 commit comments