Skip to content

Commit

Permalink
fix: allow vtt rollover with MPEGTS of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
adrums86 committed Aug 29, 2024
1 parent 11a159e commit 8b13af4
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 8b13af4

Please sign in to comment.