Skip to content

Commit

Permalink
Only fire devicechange on 0->1 & 1->0 kind devices pre-gUM.
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ivar committed Apr 30, 2020
1 parent 8ccfda5 commit 48986c4
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion getusermedia.html
Expand Up @@ -2724,9 +2724,26 @@ <h3>{{MediaDevices}}</h3>
<code>false</code>.</p>
</li>
</ol>
<p>When new media input and/or output devices of a kind are made
available where zero devices of that kind were available before, or the
lone input and/or output device of a kind becomes unavailable, then if
<a>[[\canExposeDeviceInfo]]</a> is <code>false</code>, the User Agent
MUST run the following steps in browsing contexts for which the
<a>device information can be exposed check</a> returns <code>true</code>,
but in no other contexts:</p>
<ol>
<li>
<p>Set <a>[[\storedDeviceList]]</a> to null.</p>
</li>
<li>
<p>Queue a task that fires a simple event named <a>devicechange</a> at the
{{MediaDevices}} object.</p>
</li>
</ol>
<p>When new media input and/or output devices are made available, or any
available input and/or output device becomes unavailable, or the system
default camera changed, or the system default microphone changed, the User Agent
default camera changed, or the system default microphone changed, then
if <a>[[\canExposeDeviceInfo]]</a> is <code>true</code>, the User Agent
MUST run the following steps in browsing contexts for which the
<a>device information can be exposed check</a> returns <code>true</code>,
but in no other contexts:</p>
Expand Down

0 comments on commit 48986c4

Please sign in to comment.