Files
VideoPlayer/src/types/PlayerConfig.ts
db123 98ee8b5653 chore(types): corrected defenition pose of types
changed where each type is defined in types/ dir for consistency and updated related files.
2026-04-29 23:48:38 +03:30

49 lines
989 B
TypeScript

/**
* player config and options type interface
*
* author: db123 at db
* creation: 28/4/2026
*/
export interface PlayerConfig {
type: 'native' | 'hls' | 'dash';
theme?: 'dark' | 'light';
accent?: string;
controls?: boolean | ControlConfig;
ui?: boolean | UIConfig;
preload?: 'auto' | 'metadata' | 'none';
autoplay?: boolean;
loop?: boolean;
muted?: boolean;
adapters?: AdapterConfig;
prefixClass: string;
}
export interface ControlConfig {
seekPos: number;
seekNeg: number;
playbackSpeed: Array<number>;
}
export interface UIConfig {
PlayButton?: boolean | UIElementConfig;
}
export interface UIElementConfig {
enable?: boolean;
vPosition?: 'top' | 'middle' | 'bottom';
hPosition?: 'left' | 'middle' | 'right';
color?: string | UIElementColorConfig;
}
export interface UIElementColorConfig {
idleColor?: string;
activeColor?: string;
hoverColor?: string;
disabledColor?: string;
}
export interface AdapterConfig {
src?: string;
}