mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 02:01:20 -08:00
refactor(core): [CORE-21] generate compatible public and editor declarations
This commit is contained in:
1 parent
ee895a558f
commit
faaa3e8c2d
123 files changed
+31305
-1712
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import type { Subtitle as SubtitleInput } from '../subtitle'
|
||||
|
||||
export type SubtitleOption = Required<SubtitleInput>
|
||||
|
||||
export interface SubtitleCue extends TextTrackCue {
|
||||
text: string
|
||||
originalStartTime?: number
|
||||
originalEndTime?: number
|
||||
}
|
||||
|
||||
export interface SubtitleTrack extends HTMLTrackElement { offset?: number }
|
||||
|
||||
export interface Subtitle {
|
||||
name: string
|
||||
option: SubtitleOption | null
|
||||
destroyEvent: () => unknown
|
||||
url: string
|
||||
readonly textTrack: TextTrack | undefined
|
||||
readonly activeCues: SubtitleCue[]
|
||||
readonly cues: SubtitleCue[]
|
||||
show: boolean
|
||||
toggle: () => void
|
||||
style: {
|
||||
(styles: Partial<CSSStyleDeclaration>): HTMLDivElement
|
||||
(key: string, value: string | number): HTMLDivElement
|
||||
}
|
||||
update: () => void
|
||||
switch: (url: string, option?: SubtitleInput) => Promise<string | null | undefined>
|
||||
init: (option: SubtitleOption) => Promise<string | null | undefined>
|
||||
createTrack: (kind: string, url: string) => void
|
||||
}
|
||||
|
||||
export interface Notice {
|
||||
timer: number | null
|
||||
get show(): boolean
|
||||
set show(value: string | Error | false)
|
||||
destroy: () => void
|
||||
}
|
||||
Reference in new issue
Block a user