ranui
Version:
A framework-agnostic Web Components UI library built on native custom elements, with TypeScript types, light/dark theming, SSR and PWA support.
34 lines (33 loc) • 1.4 kB
TypeScript
export interface PlayerControllerElements {
host: HTMLElement;
container: HTMLDivElement;
player: HTMLDivElement;
playerBtn: HTMLDivElement;
progress: HTMLDivElement;
progressDot: HTMLDivElement;
playBtn: HTMLDivElement;
volumeProgress: HTMLElement;
fullScreenBtn: HTMLDivElement;
volumeIcon: HTMLDivElement;
}
export interface PlayerControllerHandlers {
onContainerClick: (e: Event) => void;
onPlayerBtnClick: (e: Event) => void;
onKeydown: (e: KeyboardEvent) => void;
onProgressDotMouseDown: (e: MouseEvent) => void;
onPlayBtnClick: (e: Event) => void;
onProgressClick: (e: MouseEvent) => void;
onProgressMouseEnter: (e: MouseEvent) => void;
onProgressMouseMove: (e: MouseEvent) => void;
onProgressMouseLeave: (e: MouseEvent) => void;
onPlayerMouseMove: (e: MouseEvent) => void;
onDocumentMouseMove: (e: MouseEvent) => void;
onDocumentMouseUp: (e: MouseEvent) => void;
onVolumeChange: (e: Event) => void;
onFullScreenClick: (e: Event) => void;
onVolumeIconClick: (e: Event) => void;
onFullscreenChange: () => void;
onResize: () => void;
}
export declare function bindControllerEvents(elements: PlayerControllerElements, handlers: PlayerControllerHandlers): void;
export declare function unbindControllerEvents(elements: PlayerControllerElements, handlers: PlayerControllerHandlers): void;