blob: c37a6b2ad3531c58af4989ec4fb86320e70a297b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// The spec for MediaDevices is in two parts:
// https://w3c.github.io/mediacapture-main/#mediadevices
// https://w3c.github.io/mediacapture-main/#mediadevices-interface-extensions
[
ActiveScriptWrappable
] interface MediaDevices : EventTarget {
[RuntimeEnabled=OnDeviceChange] attribute EventHandler ondevicechange;
[CallWith=ScriptState, MeasureAs=MediaDevicesEnumerateDevices] Promise<sequence<MediaDeviceInfo>> enumerateDevices();
MediaTrackSupportedConstraints getSupportedConstraints();
[CallWith=ScriptState,
RaisesException,
MeasureAs=GetUserMediaPromise
] Promise<MediaStream> getUserMedia(optional MediaStreamConstraints constraints);
};
|