mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
webrtc: Add MediaDeviceInfo interface and MediaDevices.enumeratedDevices()
This commit is contained in:
10
webrtc/MediaStream.d.ts
vendored
10
webrtc/MediaStream.d.ts
vendored
@@ -188,6 +188,14 @@ interface Navigator {
|
||||
|
||||
interface MediaDevices {
|
||||
getSupportedConstraints(): MediaTrackSupportedConstraints;
|
||||
|
||||
|
||||
getUserMedia(constraints: MediaStreamConstraints): Promise<MediaStream>;
|
||||
enumerateDevices(): Promise<MediaDeviceInfo[]>;
|
||||
}
|
||||
|
||||
interface MediaDeviceInfo {
|
||||
label: string;
|
||||
id: string;
|
||||
kind: string;
|
||||
facing: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user