mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 08:01:20 -08:00
refactor(core): [CORE-20] type entry and converge initialization
This commit is contained in:
1 parent
ccf77c4ed2
commit
ee895a558f
100 files changed
+33854
-839
No files matched your search
@@ -1,3 +1,6 @@
|
||||
import type { PipProperty } from '../display/types'
|
||||
import type { NoticeSink } from '../notice'
|
||||
|
||||
export interface Position {
|
||||
readonly duration: number
|
||||
get currentTime(): number
|
||||
@@ -14,13 +17,13 @@ export interface SeekMethods {
|
||||
}
|
||||
|
||||
export interface SeekHost extends Position {
|
||||
notice: { set show(message: string) }
|
||||
notice: NoticeSink
|
||||
emit: (name: 'seek', currentTime: number, requestedTime: number | string) => unknown
|
||||
}
|
||||
|
||||
export interface PlaybackNotice {
|
||||
i18n: { get: (key: string) => string }
|
||||
notice: { set show(message: string) }
|
||||
notice: NoticeSink
|
||||
}
|
||||
|
||||
export interface VolumeHost extends PlaybackNotice {
|
||||
@@ -30,7 +33,7 @@ export interface VolumeHost extends PlaybackNotice {
|
||||
}
|
||||
|
||||
export type DisplayState = 'mini' | 'pip' | 'fullscreen' | 'fullscreenWeb'
|
||||
export type DisplayStates = Record<DisplayState, boolean>
|
||||
export type DisplayStates = Record<'mini' | 'fullscreenWeb', boolean> & PipProperty & { fullscreen?: boolean }
|
||||
|
||||
export interface StateProperty {
|
||||
get state(): DisplayState | 'standard'
|
||||
|
||||
Reference in new issue
Block a user