Skip to content

Commit

Permalink
Merge pull request #641 from youennf/remove-media-device-info-permission
Browse files Browse the repository at this point in the history
Replace device-info permission by a browsing context boolean flag
  • Loading branch information
alvestrand authored Nov 28, 2019
2 parents 8f8a161 + d3389c9 commit ccd1653
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions getusermedia.html
Original file line number Diff line number Diff line change
Expand Up @@ -2816,6 +2816,10 @@ <h3>MediaDevices</h3>
<p>Create one internal slot: [[\storedDeviceList]], initialized
to null.</p>
</li>
<li>
<p>Create one internal slot: [[\canExposeDeviceInfo]], initialized
to <code>false</code>.</p>
</li>
</ol>
</li>
<li>
Expand Down Expand Up @@ -3064,10 +3068,8 @@ <h2>Methods</h2>
<code>live</code> MediaStreamTrack in the current
browsing context, set <var>list-permission</var> to
"granted", otherwise set <var>list-permission</var>
to the result of <a data-lt=
"retrieve the permission state">retrieving the
permission state</a> of the "device-info"
permission.</p>
to "granted" if [[\canExposeDeviceInfo]] is
<code>true</code> and "denied" otherwise.</p>
</li>
<li>
<p>If <var>list-permission</var> is "granted",
Expand Down Expand Up @@ -3141,12 +3143,8 @@ <h2>Device information can be exposed check</h2>
"device-information-can-be-exposed">device information can be exposed check</dfn>,
run the following steps:</p>
<ol>
<li>If the <a data-lt="retrieve the permission state">permission state</a>
of the "device-info" permission is "granted" for this browsing context, return <code>true</code>.
<li>If [[\canExposeDeviceInfo]] is <code>true</code>, return <code>true</code>.
</li>
<li>If any of the input devices are attached to an
<a href="#stream-active">active</a> <code><a>MediaStream</a></code>
in the browsing context, return <code>true</code>.</li>
<li>If the <a>current settings object</a>'s <a>responsible
document</a> is <a data-cite="!HTML/#fully-active">fully
active</a> and <a data-cite="!HTML/#gains-focus">has
Expand All @@ -3155,6 +3153,19 @@ <h2>Device information can be exposed check</h2>
<li>Return <code>false</code>.</li>
</ol>
</section>
<section>
<h2>Set device information exposure</h2>
<p>To <dfn data-lt="set-device-information-exposure" id=
"set-device-information-exposure">set the device information exposure</dfn>,
with a <code>value</code> of type boolean, run the following steps:</p>
<ol>
<li>Set [[\canExposeDeviceInfo]] to <code>value</code>.</li>
</ol>
<div class="note">
<p>A User Agent MAY at any point set the device information exposure back to <code>false</code>,
for instance if the User Agent decides to revoke device access on a given browsing context.</p>
</div>
</section>
</section>
<section>
<h2>Device Info</h2>
Expand Down Expand Up @@ -3712,12 +3723,13 @@ <h2>Methods</h2>
tracks in <var>stream</var> with the appropriate
constraints. Should this fail, let
<var>failedConstraint</var> be the result of the
algorithm that failed if the <a data-lt="retrieve the
permission state">permission state</a> of the
"device-info" permission is "granted" for this browsing
context or <code>undefined</code> otherwise, and jump to the step
algorithm that failed if [[\canExposeDeviceInfo]] is <code>true</code>,
or <code>undefined</code> otherwise, and jump to the step
labeled <em>Constraint Failure</em> below.</p>
</li>
<li>
<p><a>Set the device information exposure</a> to <code>true</code>.</p>
</li>
<li>
<p><a>Resolve</a> <var>p</var> with <var>stream</var> and
abort these steps.</p>
Expand Down

0 comments on commit ccd1653

Please sign in to comment.