forked from RSATom/WebChimera.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
74 lines (74 loc) · 1.79 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
export type PixelFormat = "RV32" | "I420";
declare enum _VLCAudioChannel {
Stereo = 0,
ReverseStereo = 1,
Left = 2,
Right = 3,
Dolby = 4,
}
export type VLCAudio = {
readonly count: number;
readonly [key: number]: string;
track: number;
mute: boolean;
volume: number;
channel: _VLCAudioChannel;
delay: number;
};
export type VLCSubtitle = {
readonly count: number;
readonly [key: number]: string;
track: number;
delay: number;
};
export type VLCInput = {
readonly length: number;
readonly fps: number;
readonly state: number;
readonly hasVout: boolean;
position: number;
time: number;
rate: number;
};
export interface Player {
readonly vlcVersion: string;
readonly playing: boolean;
readonly length: number;
pixelFormat: PixelFormat;
time: number;
volume: number;
mute: boolean;
play: (url?: string) => void;
pause: () => void;
togglePause: () => void;
stop: () => void;
toggleMute: () => void;
close: () => void;
onMediaChanged: () => void;
onBuffering: (percents: number) => void;
onPlaying: () => void;
onPaused: () => void;
onEncounteredError: () => void;
onEndReached: () => void;
onStopped: () => void;
onTimeChanged: (time: number) => void;
onPositionChanged: (time: number) => void;
onSeekableChanged: (seekable: boolean) => void;
onPausableChanged: (pausable: boolean) => void;
onLengthChanged: (length: number) => void;
onLogMessage: (level: string, message: string, format: string) => void;
onFrameReady: (
frame: {
width: number;
height: number;
uOffset: number;
vOffset: number;
} & Uint8Array
) => void;
audio: VLCAudio;
subtitles: VLCSubtitle;
position: number;
input: VLCInput;
}
export const createPlayer: (args?: string[]) => Player;
export const path: string | undefined;