-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
53 lines (50 loc) · 1.86 KB
/
index.d.ts
File metadata and controls
53 lines (50 loc) · 1.86 KB
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
declare module '@foobar404/wave';
declare module 'browser-id3-writer';
declare module 'audio-recorder-polyfill' {
interface MediaRecorderErrorEvent extends Event {
name: string;
}
interface MediaRecorderDataAvailableEvent extends Event {
data: any;
}
interface MediaRecorderEventMap {
dataavailable: MediaRecorderDataAvailableEvent;
error: MediaRecorderErrorEvent;
pause: Event;
resume: Event;
start: Event;
stop: Event;
warning: MediaRecorderErrorEvent;
}
class MediaRecorder extends EventTarget {
readonly mimeType: string;
readonly state: 'inactive' | 'recording' | 'paused';
readonly stream: MediaStream;
ignoreMutedMedia: boolean;
videoBitsPerSecond: number;
audioBitsPerSecond: number;
ondataavailable: (event: MediaRecorderDataAvailableEvent) => void;
onerror: (event: MediaRecorderErrorEvent) => void;
onpause: () => void;
onresume: () => void;
onstart: () => void;
onstop: () => void;
constructor(stream: MediaStream);
start(): void;
stop(): void;
resume(): void;
pause(): void;
isTypeSupported(type: string): boolean;
requestData(): void;
addEventListener<K extends keyof MediaRecorderEventMap>(type: K, listener: (this: MediaStream, ev: MediaRecorderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof MediaRecorderEventMap>(type: K, listener: (this: MediaStream, ev: MediaRecorderEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
}
}
// for importing images
declare module '*.jpg';
declare module '*.png';
declare module '*.jpeg';
declare module '*.gif';
declare module '*.svg';