Skip to content

Commit

Permalink
Identify the list of allowed required constraints for getUserMedia
Browse files Browse the repository at this point in the history
  • Loading branch information
youennf committed Jul 23, 2020
1 parent 714a237 commit ac34dde
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions getusermedia.html
Original file line number Diff line number Diff line change
Expand Up @@ -1802,19 +1802,19 @@ <h2>Constrainable Properties</h2>
</thead>
<tbody>
<tr id="def-constraint-sampleRate">
<td>sampleRate</td>
<td><dfn>sampleRate</dfn></td>
<td>{{ConstrainULong}}</td>
<td>The sample rate in samples per second for the audio
data.</td>
</tr>
<tr id="def-constraint-sampleSize">
<td>sampleSize</td>
<td><dfn>sampleSize</dfn></td>
<td>{{ConstrainULong}}</td>
<td>The linear sample size in bits. This constraint can only be
satisfied for audio devices that produce linear samples.</td>
</tr>
<tr id="def-constraint-echoCancellation">
<td>echoCancellation</td>
<td><dfn>echoCancellation</dfn></td>
<td>{{ConstrainBoolean}}</td>
<td>When one or more audio streams is being played in the
processes of various microphones, it is often desirable to
Expand All @@ -1826,7 +1826,7 @@ <h2>Constrainable Properties</h2>
behavior.</td>
</tr>
<tr id="def-constraint-autoGainControl">
<td>autoGainControl</td>
<td><dfn>autoGainControl</dfn></td>
<td>{{ConstrainBoolean}}</td>
<td>Automatic gain control is often desirable on the input signal
recorded by the microphone. There are cases where it is not
Expand All @@ -1835,7 +1835,7 @@ <h2>Constrainable Properties</h2>
behavior.</td>
</tr>
<tr id="def-constraint-noiseSuppression">
<td>noiseSuppression</td>
<td><dfn>noiseSuppression</dfn></td>
<td>{{ConstrainBoolean}}</td>
<td>Noise suppression is often desirable on the input signal
recorded by the microphone. There are cases where it is not
Expand All @@ -1844,7 +1844,7 @@ <h2>Constrainable Properties</h2>
behavior.</td>
</tr>
<tr id="def-constraint-latency">
<td>latency</td>
<td><dfn>latency</dfn></td>
<td>{{ConstrainDouble}}</td>
<td>The latency or latency range, in seconds. The latency is the
time between start of processing (for instance, when sound occurs
Expand All @@ -1856,7 +1856,7 @@ <h2>Constrainable Properties</h2>
some variation from that.</td>
</tr>
<tr id="def-constraint-channelCount">
<td>channelCount</td>
<td><dfn>channelCount</dfn></td>
<td>{{ConstrainULong}}</td>
<td>The number of independent channels of sound that the audio
data contains, i.e. the number of audio samples per sample
Expand Down Expand Up @@ -3462,6 +3462,9 @@ <h2>Methods</h2>
inside of <a>"video"</a> and video-only constraints inside of
<a>"audio"</a> are simply ignored rather than causing
<code>OverconstrainedError</code>.</li>
<li>Remove any constrainable property inside of
<var>CS</var> that is <a data-lt="required">required</a>
and whose name is not in <a>getUserMedia allowed required constraint list</a>.</li>
<li>
<p>Run the <a>SelectSettings</a> algorithm on each
track in <var>candidateSet</var> with <var>CS</var>
Expand Down Expand Up @@ -3635,6 +3638,27 @@ <h2>Methods</h2>
between those checks, so it is conceivable that the selected device is
no longer suitable. In this case, a NotReadableError will result.</p>
</div>
<div>
<p>The <dfn>getUserMedia allowed required constraint list</dfn>
contains the following constraint names:
<a>width</a>,
<a>height</a>,
<a>aspectRatio</a>,
<a>frameRate</a>,
<a>facingMode</a>,
<a>resizeMode</a>,
<a>sampleRate</a>,
<a>sampleSize</a>,
<a>echoCancellation</a>,
<a>autoGainControl</a>,
<a>noiseSuppression</a>,
<a>latency</a>,
<a>channelCount</a>,
<a>deviceId</a>,
<a>groupId</a>.
</p>
</div>

</section>
<section>
<h2>{{MediaStreamConstraints}}</h2>
Expand Down

0 comments on commit ac34dde

Please sign in to comment.