Skip to content

Commit

Permalink
Update enumerateDevices algorithm to make use of device-kind specific…
Browse files Browse the repository at this point in the history
… exposure checks when building cameraList and microphoneList.

This ensures we do not get dummy similar audioinput or camera devices if only camera or only microphone is used.
  • Loading branch information
youennf committed Oct 6, 2022
1 parent e84ad3e commit a8699aa
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions getusermedia.html
Original file line number Diff line number Diff line change
Expand Up @@ -2933,16 +2933,12 @@ <h2>Methods</h2>
</ol>
</li>
<li>
<p>If [=device information can be exposed=] is <code>false</code>,
run the following sub steps:<p>
<ol>
<li>
<p>If <var>microphoneList</var> is not empty, truncate <var>microphoneList</var> to its first item.</p>
</li>
<li>
<p>If <var>cameraList</var> is not empty, truncate <var>cameraList</var> to its first item.</p>
</li>
</ol>
<p>If [=microphone information can be exposed=] is <code>false</code>,
truncate <var>microphoneList</var> to its first item.</p>
</li>
<li>
<p>If [=camera information can be exposed=] is <code>false</code>,
truncate <var>cameraList</var> to its first item.</p>
</li>
<li>
<p>Run the following sub steps for each discovered device in <var>deviceList</var>, <var>device</var>:</p>
Expand Down

0 comments on commit a8699aa

Please sign in to comment.