feat: added types and changes are incoming
This commit is contained in:
37
src/types/index.ts
Normal file
37
src/types/index.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* type interfaces
|
||||||
|
*
|
||||||
|
* author: db123 at db
|
||||||
|
* creation: 22/4/2026
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface PlayerConfig {
|
||||||
|
theme?: "dark" | "light";
|
||||||
|
accent?: string;
|
||||||
|
controls?: boolean;
|
||||||
|
preload?: "auto" | "metadata" | "none";
|
||||||
|
autoplay?: boolean;
|
||||||
|
loop?: boolean;
|
||||||
|
muted?: boolean;
|
||||||
|
adapters?: AdapterConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AdapterConfig {
|
||||||
|
hls?: boolean | HLSOptions;
|
||||||
|
dash?: boolean | DASHOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HLSOptions {
|
||||||
|
enableWorker?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DASHOptions {
|
||||||
|
enableWorker?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PlayerEvents {
|
||||||
|
onPlay?: () => void;
|
||||||
|
onPause?: () => void;
|
||||||
|
onEnd?: () => void;
|
||||||
|
onError?: () => void;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user