Skip to content

Commit

Permalink
fix(live): cue end time not finite (#1411)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrums86 authored Jul 25, 2023
1 parent a9ff947 commit 9723e6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util/text-tracks.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ export const addMetadata = ({
// Map each cue group's endTime to the next group's startTime
sortedStartTimes.forEach((startTime, idx) => {
const cueGroup = cuesGroupedByStartTime[startTime];
const nextTime = Number(sortedStartTimes[idx + 1]) || videoDuration;
const finiteDuration = isFinite(videoDuration) ? videoDuration : 0;
const nextTime = Number(sortedStartTimes[idx + 1]) || finiteDuration;

// Map each cue's endTime the next group's startTime
cueGroup.forEach((cue) => {
Expand Down

0 comments on commit 9723e6d

Please sign in to comment.