-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
28 lines (23 loc) · 812 Bytes
/
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
declare type TDevice = {
id: string;
label: string;
alternativeName?: string;
}
declare type TAuthorization = "AUTHORIZED" | "DENIED" | "NOT_DETERMINED";
declare type TMediaType = "camera" | "microphone";
declare type TMediaDevicesUtil = {
getDefaultVideoDevice(): TDevice;
getDefaultAudioDevice(): TDevice;
getVideoDevices(): TDevice[];
getAudioDevices(): TDevice[];
getScreenAuthorizationStatus(): TAuthorization;
getMediaAuthorizationStatus(mediaType: TMediaType): TAuthorization;
getMediaAuthorizationStatus(): {
camera: TAuthorization;
microphone: TAuthorization;
};
requestScreenAuthorization(): TAuthorization;
requestMediaAuthorization(mediaType: TMediaType): Promise<TAuthorization>;
}
declare const mediaDevicesUtil: TMediaDevicesUtil;
export = mediaDevicesUtil;