UNPKG

wave-roll

Version:

JavaScript Library for Comparative MIDI Piano-Roll Visualization

29 lines 1.12 kB
/** * Time + progress bar updater for PlayerDemo. * Keeps DOM elements in sync with the AudioPlayer state. */ export interface ProgressDisplayRefs { /** HH:MM label showing the current playback time. */ currentLabel?: HTMLElement | null; /** HH:MM label showing the total duration. */ totalLabel?: HTMLElement | null; /** Filled bar element indicating progress (width%). */ progressBar?: HTMLElement | null; /** Draggable circle / square handle that follows progress. */ seekHandle?: HTMLElement | null; /** Small triangle indicator above the bar. */ progressIndicator?: HTMLElement | null; /** Function returning whether the user is currently dragging. */ seeking?: () => boolean; /** Converts seconds -> HH:MM string (injected by caller). */ formatTime: (seconds: number) => string; } export interface ProgressState { currentTime: number; duration: number; } /** * Update labels + bar/handle position. */ export declare function updateTimeDisplay(refs: ProgressDisplayRefs, state: ProgressState): void; //# sourceMappingURL=time-display.d.ts.map