/** * Progress bar concern — slider-bar DOM construction, chapter-marker rendering, * scrub helper types, and the time-formatting utility. * * Integration: `buildSliderBar()` returns `SliderBarRefs`. The plugin class * keeps the refs as instance fields and passes them into the chapter-marker * renderer and update helpers below. Event wiring (`wireSliderBar`) stays on * the class because it closes over both `this` state (isMouseDown, isScrubbing) * and the plugin lifecycle (`this.listen`, `this.timeout`). */ import type { IVideoPlayer, VideoPlaylistItem } from '../../../index.js'; export { formatSeconds } from '../data/utils.js'; export interface SliderBarRefs { sliderBar: HTMLDivElement; sliderBuffer: HTMLDivElement; sliderHover: HTMLDivElement; sliderProgress: HTMLDivElement; chapterBar: HTMLDivElement; sliderNipple: HTMLDivElement; sliderPop: HTMLDivElement; sliderPopImage: HTMLDivElement; sliderPopText: HTMLDivElement; chapterText: HTMLDivElement; } /** * Build the slider-bar subtree and return all named refs. * The caller appends to its parent. */ export declare function buildSliderBar(player: IVideoPlayer): SliderBarRefs; export interface ChapterMarkerRef { /** Chapter range, as percentages of total duration. */ left: number; right: number; buffer: HTMLDivElement; hover: HTMLDivElement; progress: HTMLDivElement; } /** Chapter data as needed by the marker builder — subset of the player's chapter type. */ export interface ChapterLite { index: number; start: number; end: number; title?: string; } /** * Build segmented chapter-marker DOM inside `chapterBar`. Returns the new * chapter refs array. The caller must wire click listeners via their own * `listen` helper after calling this. */ export declare function buildChapterMarkers(chapterBar: HTMLDivElement, chapters: ReadonlyArray, dur: number, onChapterClick: (index: number) => void, listen: (el: EventTarget, event: string, handler: (event: Event) => void) => void): ChapterMarkerRef[]; /** Update chapter-marker progress fills for the given playback percentage. */ export declare function updateChapterProgress(refs: ChapterMarkerRef[], percentage: number): void; /** Update chapter-marker buffer fills for the given buffered percentage. */ export declare function updateChapterBuffer(refs: ChapterMarkerRef[], bufferedPct: number): void; /** Update chapter-marker hover fills for the given scrub percentage. */ export declare function updateChapterHover(refs: ChapterMarkerRef[], scrubPct: number): void;