Refactor code structure for improved readability and maintainability

This commit is contained in:
Harvey Zhao committed 2026-01-01 19:50:00 +08:00
1 parent 4a0fbda3c4
commit 0bb4e1acdb
214 files changed
+462 -415

No files matched your search

+61 -1
View File
@@ -1,12 +1,72 @@
interface Option {
eventDelay?: number
/**
* Timeout for loading media in milliseconds
* @default 0
*/
loadTimeout?: number
/**
* Interval for timeupdate events in milliseconds
* @default 250
*/
timeupdateInterval?: number
/**
* Audio-video synchronization tolerance in seconds
* @default 0.12
*/
avSyncTolerance?: number
/**
* Whether to drop late video frames
* @default false
*/
dropLateFrames?: boolean
/**
* Poster image URL
*/
poster?: string
/**
* Media source (URL, Blob, or ReadableStream)
*/
source?: string | Blob | ReadableStream<Uint8Array>
/**
* Check if server supports range requests before loading
* @default false
*/
preflightRange?: boolean
/**
* Initial volume (0-1)
* @default 0.7
*/
volume?: number
/**
* Initial muted state
* @default false
*/
muted?: boolean
/**
* Autoplay
* @default false
*/
autoplay?: boolean
/**
* Loop playback
* @default false
*/
loop?: boolean
/**
* Cross-origin setting
*/
crossOrigin?: string
}
type Result = HTMLCanvasElement
+22
View File
@@ -853,15 +853,28 @@ export interface CssVar {
'--art-theme': string
'--art-font-color': string
'--art-background-color': string
'--art-font-size-sm': string
'--art-text-shadow-color': string
'--art-transition-duration': string
'--art-ease-standard': string
'--art-padding': string
'--art-border-radius': string
'--art-mobile-padding': string
'--art-mobile-radius': string
'--art-radius-sm': string
'--art-space-xxs': string
'--art-space-xs': string
'--art-surface-hover-color': string
'--art-surface-border-color': string
'--art-surface-muted-color': string
'--art-surface-range-color': string
'--art-progress-height': string
'--art-progress-color': string
'--art-progress-top-gap': string
'--art-hover-color': string
'--art-loaded-color': string
'--art-tip-padding': string
'--art-tip-offset': string
'--art-state-size': string
'--art-state-opacity': number
'--art-bottom-height': string
@@ -873,6 +886,7 @@ export interface CssVar {
'--art-control-opacity': number
'--art-control-icon-size': string
'--art-control-icon-scale': number
'--art-touch-hit-size': string
'--art-volume-height': string
'--art-volume-handle-size': string
'--art-lock-size': string
@@ -883,6 +897,7 @@ export interface CssVar {
'--art-settings-max-height': string
'--art-selector-max-height': string
'--art-contextmenus-min-width': string
'--art-contextmenu-padding-x': string
'--art-subtitle-font-size': string
'--art-subtitle-gap': string
'--art-subtitle-bottom': string
@@ -893,6 +908,13 @@ export interface CssVar {
'--art-scrollbar-background': string
'--art-scrollbar-background-hover': string
'--art-mini-progress-height': string
'--art-shadow-low': string
'--art-shadow-medium': string
'--art-shadow-high': string
'--art-shadow-elevated': string
'--art-icon-small-size': string
'--art-overlay-dim': string
'--art-overlay-strong': string
}
export interface Config {