mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-16 01:26:16 -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,5 +1,6 @@
|
||||
import type { SubscriptionHost } from '../component/resources'
|
||||
import type { ProgressPositionHost } from '../control/progress/position'
|
||||
import type { NoticeSink } from '../notice'
|
||||
|
||||
export interface GestureHost extends ProgressPositionHost, SubscriptionHost<{
|
||||
'document:touchend': [Event]
|
||||
@@ -12,7 +13,7 @@ export interface GestureHost extends ProgressPositionHost, SubscriptionHost<{
|
||||
isLock: boolean
|
||||
width: number
|
||||
currentTime: number
|
||||
notice: { show: string }
|
||||
notice: NoticeSink
|
||||
}
|
||||
|
||||
export interface Drag {
|
||||
|
||||
@@ -6,8 +6,10 @@ export interface HotkeyHost extends SubscriptionHost<{ 'document:keydown': [Keyb
|
||||
template: { $player: HTMLElement }
|
||||
isFocus: boolean
|
||||
fullscreenWeb: boolean
|
||||
backward: number
|
||||
forward: number
|
||||
get backward(): undefined
|
||||
set backward(value: number)
|
||||
get forward(): undefined
|
||||
set forward(value: number)
|
||||
volume: number
|
||||
toggle: () => unknown
|
||||
emit: (name: 'hotkey' | 'keydown', event: KeyboardEvent) => unknown
|
||||
|
||||
@@ -23,7 +23,7 @@ export interface ClickHost extends FocusHost {
|
||||
|
||||
template: { $player: HTMLElement, $video: EventTarget }
|
||||
isLock: boolean
|
||||
fullscreen: boolean
|
||||
fullscreen?: boolean
|
||||
toggle: () => unknown
|
||||
emit: (name: 'focus' | 'blur' | 'click' | 'dblclick', event: Event) => unknown
|
||||
}
|
||||
@@ -35,5 +35,5 @@ export interface HoverHost {
|
||||
|
||||
export interface MoveHost {
|
||||
template: { $player: HTMLElement }
|
||||
emit: (name: 'mousemove', event: Event) => unknown
|
||||
emit: (name: 'mousemove', event: MouseEvent) => unknown
|
||||
}
|
||||
Reference in new issue
Block a user