diff --git a/src/util/text-tracks.js b/src/util/text-tracks.js index 7d46ea026..c182d6956 100644 --- a/src/util/text-tracks.js +++ b/src/util/text-tracks.js @@ -234,7 +234,7 @@ export const addMetadata = ({ // Map each cue group's endTime to the next group's startTime sortedStartTimes.forEach((startTime, idx) => { const cueGroup = cuesGroupedByStartTime[startTime]; - const finiteDuration = isFinite(videoDuration) ? videoDuration : 0; + const finiteDuration = isFinite(videoDuration) ? videoDuration : startTime; const nextTime = Number(sortedStartTimes[idx + 1]) || finiteDuration; // Map each cue's endTime the next group's startTime