Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use startTime instead of 0 for finiteDuration (#1448)
Browse files Browse the repository at this point in the history
adrums86 authored and Dzianis Dashkevich committed Nov 30, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent e6feedb commit bfe0161
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
@@ -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

0 comments on commit bfe0161

Please sign in to comment.