tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

mediacapture-streams.idl (6955B)


      1 // GENERATED CONTENT - DO NOT EDIT
      2 // Content was automatically extracted by Reffy into webref
      3 // (https://github.com/w3c/webref)
      4 // Source: Media Capture and Streams (https://w3c.github.io/mediacapture-main/)
      5 
      6 [Exposed=Window]
      7 interface MediaStream : EventTarget {
      8  constructor();
      9  constructor(MediaStream stream);
     10  constructor(sequence<MediaStreamTrack> tracks);
     11  readonly attribute DOMString id;
     12  sequence<MediaStreamTrack> getAudioTracks();
     13  sequence<MediaStreamTrack> getVideoTracks();
     14  sequence<MediaStreamTrack> getTracks();
     15  MediaStreamTrack? getTrackById(DOMString trackId);
     16  undefined addTrack(MediaStreamTrack track);
     17  undefined removeTrack(MediaStreamTrack track);
     18  MediaStream clone();
     19  readonly attribute boolean active;
     20  attribute EventHandler onaddtrack;
     21  attribute EventHandler onremovetrack;
     22 };
     23 
     24 [Exposed=Window]
     25 interface MediaStreamTrack : EventTarget {
     26  readonly attribute DOMString kind;
     27  readonly attribute DOMString id;
     28  readonly attribute DOMString label;
     29  attribute boolean enabled;
     30  readonly attribute boolean muted;
     31  attribute EventHandler onmute;
     32  attribute EventHandler onunmute;
     33  readonly attribute MediaStreamTrackState readyState;
     34  attribute EventHandler onended;
     35  MediaStreamTrack clone();
     36  undefined stop();
     37  MediaTrackCapabilities getCapabilities();
     38  MediaTrackConstraints getConstraints();
     39  MediaTrackSettings getSettings();
     40  Promise<undefined> applyConstraints(optional MediaTrackConstraints constraints = {});
     41 };
     42 
     43 enum MediaStreamTrackState {
     44  "live",
     45  "ended"
     46 };
     47 
     48 dictionary MediaTrackSupportedConstraints {
     49  boolean width = true;
     50  boolean height = true;
     51  boolean aspectRatio = true;
     52  boolean frameRate = true;
     53  boolean facingMode = true;
     54  boolean resizeMode = true;
     55  boolean sampleRate = true;
     56  boolean sampleSize = true;
     57  boolean echoCancellation = true;
     58  boolean autoGainControl = true;
     59  boolean noiseSuppression = true;
     60  boolean latency = true;
     61  boolean channelCount = true;
     62  boolean deviceId = true;
     63  boolean groupId = true;
     64  boolean backgroundBlur = true;
     65 };
     66 
     67 dictionary MediaTrackCapabilities {
     68  ULongRange width;
     69  ULongRange height;
     70  DoubleRange aspectRatio;
     71  DoubleRange frameRate;
     72  sequence<DOMString> facingMode;
     73  sequence<DOMString> resizeMode;
     74  ULongRange sampleRate;
     75  ULongRange sampleSize;
     76  sequence<(boolean or DOMString)> echoCancellation;
     77  sequence<boolean> autoGainControl;
     78  sequence<boolean> noiseSuppression;
     79  DoubleRange latency;
     80  ULongRange channelCount;
     81  DOMString deviceId;
     82  DOMString groupId;
     83  sequence<boolean> backgroundBlur;
     84 };
     85 
     86 dictionary MediaTrackConstraints : MediaTrackConstraintSet {
     87  sequence<MediaTrackConstraintSet> advanced;
     88 };
     89 
     90 dictionary MediaTrackConstraintSet {
     91  ConstrainULong width;
     92  ConstrainULong height;
     93  ConstrainDouble aspectRatio;
     94  ConstrainDouble frameRate;
     95  ConstrainDOMString facingMode;
     96  ConstrainDOMString resizeMode;
     97  ConstrainULong sampleRate;
     98  ConstrainULong sampleSize;
     99  ConstrainBooleanOrDOMString echoCancellation;
    100  ConstrainBoolean autoGainControl;
    101  ConstrainBoolean noiseSuppression;
    102  ConstrainDouble latency;
    103  ConstrainULong channelCount;
    104  ConstrainDOMString deviceId;
    105  ConstrainDOMString groupId;
    106  ConstrainBoolean backgroundBlur;
    107 };
    108 
    109 dictionary MediaTrackSettings {
    110  unsigned long width;
    111  unsigned long height;
    112  double aspectRatio;
    113  double frameRate;
    114  DOMString facingMode;
    115  DOMString resizeMode;
    116  unsigned long sampleRate;
    117  unsigned long sampleSize;
    118  (boolean or DOMString) echoCancellation;
    119  boolean autoGainControl;
    120  boolean noiseSuppression;
    121  double latency;
    122  unsigned long channelCount;
    123  DOMString deviceId;
    124  DOMString groupId;
    125  boolean backgroundBlur;
    126 };
    127 
    128 enum VideoFacingModeEnum {
    129  "user",
    130  "environment",
    131  "left",
    132  "right"
    133 };
    134 
    135 enum VideoResizeModeEnum {
    136  "none",
    137  "crop-and-scale"
    138 };
    139 
    140 enum EchoCancellationModeEnum {
    141  "all",
    142  "remote-only"
    143 };
    144 
    145 [Exposed=Window]
    146 interface MediaStreamTrackEvent : Event {
    147  constructor(DOMString type, MediaStreamTrackEventInit eventInitDict);
    148  [SameObject] readonly attribute MediaStreamTrack track;
    149 };
    150 
    151 dictionary MediaStreamTrackEventInit : EventInit {
    152  required MediaStreamTrack track;
    153 };
    154 
    155 [Exposed=Window]
    156 interface OverconstrainedError : DOMException {
    157  constructor(DOMString constraint, optional DOMString message = "");
    158  readonly attribute DOMString constraint;
    159 };
    160 
    161 partial interface Navigator {
    162  [SameObject, SecureContext] readonly attribute MediaDevices mediaDevices;
    163 };
    164 
    165 [Exposed=Window, SecureContext]
    166 interface MediaDevices : EventTarget {
    167  attribute EventHandler ondevicechange;
    168  Promise<sequence<MediaDeviceInfo>> enumerateDevices();
    169 };
    170 
    171 [Exposed=Window, SecureContext]
    172 interface MediaDeviceInfo {
    173  readonly attribute DOMString deviceId;
    174  readonly attribute MediaDeviceKind kind;
    175  readonly attribute DOMString label;
    176  readonly attribute DOMString groupId;
    177  [Default] object toJSON();
    178 };
    179 
    180 enum MediaDeviceKind {
    181  "audioinput",
    182  "audiooutput",
    183  "videoinput"
    184 };
    185 
    186 [Exposed=Window, SecureContext]
    187 interface InputDeviceInfo : MediaDeviceInfo {
    188  MediaTrackCapabilities getCapabilities();
    189 };
    190 
    191 [Exposed=Window]
    192 interface DeviceChangeEvent : Event {
    193  constructor(DOMString type, optional DeviceChangeEventInit eventInitDict = {});
    194  [SameObject] readonly attribute FrozenArray<MediaDeviceInfo> devices;
    195  [SameObject] readonly attribute FrozenArray<MediaDeviceInfo> userInsertedDevices;
    196 };
    197 
    198 dictionary DeviceChangeEventInit : EventInit {
    199  sequence<MediaDeviceInfo> devices = [];
    200 };
    201 
    202 partial interface MediaDevices {
    203  MediaTrackSupportedConstraints getSupportedConstraints();
    204  Promise<MediaStream> getUserMedia(optional MediaStreamConstraints constraints = {});
    205 };
    206 
    207 dictionary MediaStreamConstraints {
    208  (boolean or MediaTrackConstraints) video = false;
    209  (boolean or MediaTrackConstraints) audio = false;
    210 };
    211 
    212 dictionary DoubleRange {
    213  double max;
    214  double min;
    215 };
    216 
    217 dictionary ConstrainDoubleRange : DoubleRange {
    218  double exact;
    219  double ideal;
    220 };
    221 
    222 dictionary ULongRange {
    223  [Clamp] unsigned long max;
    224  [Clamp] unsigned long min;
    225 };
    226 
    227 dictionary ConstrainULongRange : ULongRange {
    228  [Clamp] unsigned long exact;
    229  [Clamp] unsigned long ideal;
    230 };
    231 
    232 dictionary ConstrainBooleanParameters {
    233  boolean exact;
    234  boolean ideal;
    235 };
    236 
    237 dictionary ConstrainDOMStringParameters {
    238  (DOMString or sequence<DOMString>) exact;
    239  (DOMString or sequence<DOMString>) ideal;
    240 };
    241 
    242 dictionary ConstrainBooleanOrDOMStringParameters {
    243  (boolean or DOMString) exact;
    244  (boolean or DOMString) ideal;
    245 };
    246 
    247 typedef ([Clamp] unsigned long or ConstrainULongRange) ConstrainULong;
    248 
    249 typedef (double or ConstrainDoubleRange) ConstrainDouble;
    250 
    251 typedef (boolean or ConstrainBooleanParameters) ConstrainBoolean;
    252 
    253 typedef (DOMString or
    254 sequence<DOMString> or
    255 ConstrainDOMStringParameters) ConstrainDOMString;
    256 
    257 typedef (boolean or DOMString or ConstrainBooleanOrDOMStringParameters) ConstrainBooleanOrDOMString;
    258 
    259 dictionary CameraDevicePermissionDescriptor : PermissionDescriptor {
    260  boolean panTiltZoom = false;
    261 };