feat(types): working on config available options
trying to make ui as configureable as possible while maintaining an understandable set of design choices
This commit is contained in:
@@ -10,6 +10,7 @@ export interface PlayerConfig {
|
||||
theme?: 'dark' | 'light';
|
||||
accent?: string;
|
||||
controls?: boolean | ControlConfig;
|
||||
ui?: boolean | UIConfig;
|
||||
preload?: 'auto' | 'metadata' | 'none';
|
||||
autoplay?: boolean;
|
||||
loop?: boolean;
|
||||
@@ -19,16 +20,27 @@ export interface PlayerConfig {
|
||||
}
|
||||
|
||||
export interface ControlConfig {
|
||||
playToggle: boolean;
|
||||
seekPos: number;
|
||||
seekNeg: number;
|
||||
qualitySelector: boolean;
|
||||
playbackSpeed: Array<number>;
|
||||
fullscreen: boolean;
|
||||
volume: boolean;
|
||||
progressBar: boolean;
|
||||
currentTime: boolean;
|
||||
timeLeft: boolean;
|
||||
}
|
||||
|
||||
export interface UIConfig {
|
||||
PlayButton?: boolean | UIElementConfig;
|
||||
}
|
||||
|
||||
export interface UIElementConfig {
|
||||
enable?: boolean;
|
||||
vPosition?: 'top' | 'middle' | 'bottom';
|
||||
hPosition?: 'left' | 'middle' | 'right';
|
||||
color?: string | UIElementConfigColor;
|
||||
}
|
||||
|
||||
export interface UIElementConfigColor {
|
||||
idleColor?: string;
|
||||
activeColor?: string;
|
||||
hoverColor?: string;
|
||||
disabledColor?: string;
|
||||
}
|
||||
|
||||
export interface AdapterConfig {
|
||||
|
||||
Reference in New Issue
Block a user