From 029037b69c5c22ffdbf6c1133673ca6c14cdacb7 Mon Sep 17 00:00:00 2001 From: Rahim Alwer Date: Tue, 3 Oct 2023 02:42:25 +1100 Subject: [PATCH] fix(player): remove filling slider end gap for now --- .../ui/sliders/time-slider/slider-chapters.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/vidstack/src/components/ui/sliders/time-slider/slider-chapters.ts b/packages/vidstack/src/components/ui/sliders/time-slider/slider-chapters.ts index c4f48b654..40d1f71d6 100644 --- a/packages/vidstack/src/components/ui/sliders/time-slider/slider-chapters.ts +++ b/packages/vidstack/src/components/ui/sliders/time-slider/slider-chapters.ts @@ -259,17 +259,10 @@ export class SliderChapters extends Component { chapters.push(cues[cues.length - 1]); - let seenDuration = false; - effect(() => { - if (seenDuration) return; - - const { duration } = this._media.$state; - if (Math.abs(cues[cues.length - 1].endTime - duration()) > 1) { - chapters.push(new window.VTTCue(cues[cues.length - 1].endTime, duration(), '')); - } - - seenDuration = duration() > 0; - }); + // const { duration } = this._media.$state; + // if (Math.abs(cues[cues.length - 1].endTime - duration()) > 1) { + // chapters.push(new window.VTTCue(cues[cues.length - 1].endTime, duration(), '')); + // } return chapters; }