@ezuikit/theme-plugin-playback-rate
Version:
回放主题
33 lines (32 loc) • 902 B
TypeScript
import './index.scss';
export interface IRate {
/** 值需要唯一 */
rate: 0.5 | 1 | 2 | 4 | 8;
text?: string;
isDefault?: boolean;
}
export interface PlaybackRatePanelOptions {
isMobile: boolean;
open: boolean;
rates: IRate[];
current: number;
onChange?: (rate?: IRate) => void;
/** 仅移动端支持 */
onOk?: (rate?: IRate) => void;
onOpenChange?: (open?: boolean) => void;
theme: any;
}
declare class PlaybackRatePanel {
$container: HTMLElement;
options: PlaybackRatePanelOptions;
$panelContainer: HTMLDivElement;
private _current;
get current(): number;
constructor($container: HTMLElement, options?: Partial<PlaybackRatePanelOptions>);
_getDefaultCurrent(): number;
show(): void;
hide(): void;
selectedCurrent(current?: number): void;
render(): HTMLDivElement;
}
export default PlaybackRatePanel;