-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshared.d.ts
38 lines (35 loc) · 948 Bytes
/
shared.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
// Add typings for missing Web APIs
declare class MediaRecorder {
constructor(m: MediaStream, opts?: any);
start(n?: number): void;
stop(): void;
ondataavailable(e: BlobEvent): void;
onerror(e: Error): void;
onstop(): void;
requestData(): void;
}
interface BlobEvent {
data: Blob;
}
type GetUserMediaFunction = (
options: {
audio: boolean;
video: {
mandatory: {
chromeMediaSource: string;
chromeMediaSourceId: string;
minWidth: number;
maxWidth: number;
minHeight: number;
maxHeight: number;
};
};
},
success: (stream: MediaStream) => void,
error: (error: Error) => void
) => void;
interface Navigator {
//getUserMedia: GetUserMediaFunction;
webkitGetUserMedia: GetUserMediaFunction;
//mediaDevices: { getUserMedia: GetUserMediaFunction }
}