Skip to content

Commit

Permalink
fix: use startTime instead of 0 for finiteDuration (#1448)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrums86 authored Nov 21, 2023
1 parent cc22082 commit dc78d78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/text-tracks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dc78d78

Please sign in to comment.