From 9d8c65382d8468073a0bc26df9fc515444064305 Mon Sep 17 00:00:00 2001 From: db123 Date: Tue, 28 Apr 2026 01:56:36 +0330 Subject: [PATCH] feat(types): working on config available options trying to make ui as configureable as possible while maintaining an understandable set of design choices --- src/types/PlayerConfig.ts | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/types/PlayerConfig.ts b/src/types/PlayerConfig.ts index 90ef2ac..6dc2b93 100644 --- a/src/types/PlayerConfig.ts +++ b/src/types/PlayerConfig.ts @@ -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; - 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 {