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';
|
theme?: 'dark' | 'light';
|
||||||
accent?: string;
|
accent?: string;
|
||||||
controls?: boolean | ControlConfig;
|
controls?: boolean | ControlConfig;
|
||||||
|
ui?: boolean | UIConfig;
|
||||||
preload?: 'auto' | 'metadata' | 'none';
|
preload?: 'auto' | 'metadata' | 'none';
|
||||||
autoplay?: boolean;
|
autoplay?: boolean;
|
||||||
loop?: boolean;
|
loop?: boolean;
|
||||||
@@ -19,16 +20,27 @@ export interface PlayerConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ControlConfig {
|
export interface ControlConfig {
|
||||||
playToggle: boolean;
|
|
||||||
seekPos: number;
|
seekPos: number;
|
||||||
seekNeg: number;
|
seekNeg: number;
|
||||||
qualitySelector: boolean;
|
|
||||||
playbackSpeed: Array<number>;
|
playbackSpeed: Array<number>;
|
||||||
fullscreen: boolean;
|
}
|
||||||
volume: boolean;
|
|
||||||
progressBar: boolean;
|
export interface UIConfig {
|
||||||
currentTime: boolean;
|
PlayButton?: boolean | UIElementConfig;
|
||||||
timeLeft: boolean;
|
}
|
||||||
|
|
||||||
|
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 {
|
export interface AdapterConfig {
|
||||||
|
|||||||
Reference in New Issue
Block a user