Skip to content

Commit 8faf9fd

Browse files
committed
fix(player): account for rounding filling slider chapter end gap
1 parent da5272c commit 8faf9fd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/vidstack/src/components/ui/sliders/time-slider/slider-chapters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ export class SliderChapters extends Component<SliderChaptersProps> {
264264
if (seenDuration) return;
265265

266266
const { duration } = this._media.$state;
267-
if (cues[cues.length - 1].endTime !== duration()) {
267+
if (Math.abs(cues[cues.length - 1].endTime - duration()) > 1) {
268268
chapters.push(new window.VTTCue(cues[cues.length - 1].endTime, duration(), ''));
269269
}
270270

0 commit comments

Comments
 (0)