Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace device-info permission by a browsing context boolean flag #641

Merged
merged 2 commits into from
Nov 28, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions getusermedia.html
Original file line number Diff line number Diff line change
Expand Up @@ -2803,6 +2803,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 @@ -3049,10 +3053,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 not "granted",
Expand Down Expand Up @@ -3107,18 +3109,18 @@ <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
focus</a>, return <code>true</code>.
</li>
<li>Return <code>false</code>.</li>
<div class="note">
<p>A User Agent MAY at any point set back [[\canExposeDeviceInfo]] to <code>false</code>, for instance in the case
the user explicitly asks the User Agent to revoke device access on a given browsing context.</p>
</div>
</ol>
</section>
</section>
Expand Down Expand Up @@ -3664,12 +3666,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>Set [[\canExposeDeviceInfo] 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