-
Notifications
You must be signed in to change notification settings - Fork 106
/
Copy pathindex.d.ts
41 lines (37 loc) · 1.77 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import VideoJsPlayer from "video.js/dist/types/player";
declare module "video.js/dist/types/player" {
export default interface VideoJsPlayer {
hotkeys(options?: VideoJsHotkeysOptions): void;
}
}
export interface VideoJsHotkeysOptions {
volumeStep?: number | undefined;
seekStep?: number | undefined;
enableMute?: boolean | undefined;
enableVolumeScroll?: boolean | undefined;
enableHoverScroll?: boolean | undefined;
enableFullscreen?: boolean | undefined;
enableNumbers?: boolean | undefined;
enableModifiersForNumbers?: boolean | undefined;
alwaysCaptureHotkeys?: boolean | undefined;
enableInactiveFocus?: boolean | undefined;
skipInitialFocus?: boolean | undefined;
captureDocumentHotkeys?: boolean | undefined;
documentHotkeysFocusElementFilter?: ((element: HTMLElement) => boolean) | undefined;
enableJogStyle?: boolean | undefined;
playPauseKey?: ((event: KeyboardEvent, player: VideoJsPlayer) => boolean) | undefined;
rewindKey?: ((event: KeyboardEvent, player: VideoJsPlayer) => boolean) | undefined;
forwardKey?: ((event: KeyboardEvent, player: VideoJsPlayer) => boolean) | undefined;
volumeUpKey?: ((event: KeyboardEvent, player: VideoJsPlayer) => boolean) | undefined;
volumeDownKey?: ((event: KeyboardEvent, player: VideoJsPlayer) => boolean) | undefined;
muteKey?: ((event: KeyboardEvent, player: VideoJsPlayer) => boolean) | undefined;
fullscreenKey?: ((event: KeyboardEvent, player: VideoJsPlayer) => boolean) | undefined;
customKeys?: VideoJsCustomHotkeyOptions | undefined;
}
export interface VideoJsCustomHotkeyOptions {
[key: string]: VideoJsCustomHotkey;
}
export interface VideoJsCustomHotkey {
key: (event: KeyboardEvent, player: VideoJsPlayer) => boolean;
handler: (player: VideoJsPlayer, options: VideoJsHotkeysOptions, event: KeyboardEvent) => void;
}