webrtc: Add MediaDeviceInfo interface and MediaDevices.enumeratedDevices()

This commit is contained in:
Seth Miller
2015-09-25 17:00:13 -07:00
parent 54f064352a
commit d66b227f9a

View File

@@ -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;
}