Skip to content

Commit

Permalink
fix: allow vtt rollover with MPEGTS of 0 (#1537)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrums86 authored Aug 30, 2024
1 parent 11a159e commit 2125ecf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/vtt-segment-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,7 @@ export default class VTTSegmentLoader extends SegmentLoader {

segmentInfo.cues.forEach((cue) => {
const duration = cue.endTime - cue.startTime;
const startTime = MPEGTS === 0 ?
cue.startTime + diff :
this.handleRollover_(cue.startTime + diff, mappingObj.time);
const startTime = this.handleRollover_(cue.startTime + diff, mappingObj.time);

cue.startTime = Math.max(startTime, 0);
cue.endTime = Math.max(startTime + duration, 0);
Expand Down

0 comments on commit 2125ecf

Please sign in to comment.