UNPKG

ranui

Version:

A framework-agnostic Web Components UI library built on native custom elements, with TypeScript types, light/dark theming, SSR and PWA support.

48 lines (47 loc) 1.96 kB
import type { EventManager } from '../../../utils/builder'; export interface PlayerControllerElements { host: HTMLElement; container: HTMLDivElement; player: HTMLDivElement; playerBtn: HTMLDivElement; progress: HTMLDivElement; progressDot: HTMLDivElement; playBtn: HTMLDivElement; volumeProgress: HTMLElement; fullScreenBtn: HTMLDivElement; volumeIcon: HTMLDivElement; pipBtn: HTMLDivElement; remoteBtn: HTMLDivElement; } export interface PlayerControllerHandlers { onContainerClick: (e: Event) => void; onPlayerBtnClick: (e: Event) => void; onKeydown: (e: KeyboardEvent) => void; onProgressDotPointerDown: (e: PointerEvent) => void; onPlayBtnClick: (e: Event) => void; onPlayBtnKeydown: (e: KeyboardEvent) => void; onFullScreenKeydown: (e: KeyboardEvent) => void; onProgressClick: (e: MouseEvent) => void; onProgressKeydown: (e: KeyboardEvent) => void; onProgressMouseEnter: (e: MouseEvent) => void; onProgressMouseMove: (e: MouseEvent) => void; onProgressMouseLeave: (e: MouseEvent) => void; onPlayerMouseMove: (e: MouseEvent) => void; onDocumentPointerMove: (e: PointerEvent) => void; onDocumentPointerUp: (e: PointerEvent) => void; onDocumentPointerCancel: (e: PointerEvent) => void; onVolumeChange: (e: Event) => void; onFullScreenClick: (e: Event) => void; onVolumeIconClick: (e: Event) => void; onFullscreenChange: () => void; onResize: () => void; onPipClick: (e: Event) => void; onRemoteClick: (e: Event) => void; onVisibilityChange: () => void; } /** * Registers every controller/chrome listener through `events` (an * `EventManager`). Teardown is a single `events.abort()` call by the caller — * there is no matching unbind function to keep in sync. */ export declare function bindControllerEvents(events: EventManager, elements: PlayerControllerElements, handlers: PlayerControllerHandlers): void;