@@ -399,6 +399,8 @@ shaka.util.PeriodCombiner = class {
399
399
( streams ) => streams . filter ( ( s ) => s . type == ContentType . VIDEO ) ) ;
400
400
const textStreamDbsPerPeriod = streamDbsPerPeriod . map (
401
401
( streams ) => streams . filter ( ( s ) => s . type == ContentType . TEXT ) ) ;
402
+ const imageStreamDbsPerPeriod = streamDbsPerPeriod . map (
403
+ ( streams ) => streams . filter ( ( s ) => s . type == ContentType . IMAGE ) ) ;
402
404
403
405
// It's okay to have a period with no text, but our algorithm fails on any
404
406
// period without matching streams. So we add dummy text streams to each
@@ -429,6 +431,13 @@ shaka.util.PeriodCombiner = class {
429
431
shaka . util . PeriodCombiner . cloneStreamDB_ ,
430
432
shaka . util . PeriodCombiner . concatenateStreamDBs_ ) ;
431
433
434
+ const combinedImageStreamDbs = await shaka . util . PeriodCombiner . combine_ (
435
+ /* outputStreams= */ [ ] ,
436
+ imageStreamDbsPerPeriod ,
437
+ /* firstNewPeriodIndex= */ 0 ,
438
+ shaka . util . PeriodCombiner . cloneStreamDB_ ,
439
+ shaka . util . PeriodCombiner . concatenateStreamDBs_ ) ;
440
+
432
441
// Recreate variantIds from scratch in the output.
433
442
// HLS content is always single-period, so the early return at the top of
434
443
// this method would catch all HLS content. DASH content stored with v3.0
@@ -457,7 +466,8 @@ shaka.util.PeriodCombiner = class {
457
466
458
467
return combinedVideoStreamDbs
459
468
. concat ( combinedAudioStreamDbs )
460
- . concat ( combinedTextStreamDbs ) ;
469
+ . concat ( combinedTextStreamDbs )
470
+ . concat ( combinedImageStreamDbs ) ;
461
471
}
462
472
463
473
/**
0 commit comments