Skip to content

Commit 79a7383

Browse files
committed
Add WebIDL definitions for InputDeviceInfo and MediaTrackCapabilities
1 parent e78db23 commit 79a7383

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2+
/* This Source Code Form is subject to the terms of the Mozilla Public
3+
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
4+
* You can obtain one at http://mozilla.org/MPL/2.0/.
5+
*
6+
* The origin of this IDL file is
7+
* https://w3c.github.io/mediacapture-main/#dom-inputdeviceinfo
8+
*/
9+
10+
[Exposed=Window, SecureContext]
11+
interface InputDeviceInfo : MediaDeviceInfo {
12+
MediaTrackCapabilities getCapabilities();
13+
};
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2+
/* This Source Code Form is subject to the terms of the Mozilla Public
3+
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
4+
* You can obtain one at http://mozilla.org/MPL/2.0/.
5+
*
6+
* The origin of this IDL file is
7+
* https://w3c.github.io/mediacapture-main/#dom-mediatrackcapabilities
8+
*/
9+
10+
dictionary ULongRange {
11+
[Clamp] unsigned long max;
12+
[Clamp] unsigned long min;
13+
};
14+
15+
dictionary DoubleRange {
16+
double max;
17+
double min;
18+
};
19+
20+
dictionary MediaTrackCapabilities {
21+
ULongRange width;
22+
ULongRange height;
23+
DoubleRange aspectRatio;
24+
DoubleRange frameRate;
25+
sequence<DOMString> facingMode;
26+
sequence<DOMString> resizeMode;
27+
ULongRange sampleRate;
28+
ULongRange sampleSize;
29+
sequence<boolean> echoCancellation;
30+
sequence<boolean> autoGainControl;
31+
sequence<boolean> noiseSuppression;
32+
DoubleRange latency;
33+
ULongRange channelCount;
34+
DOMString deviceId;
35+
DOMString groupId;
36+
};

0 commit comments

Comments
 (0)