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

Remove DevicePermissionDescriptor deviceId. #968

Merged
merged 6 commits into from
Aug 17, 2023
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
58 changes: 12 additions & 46 deletions getusermedia.html
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ <h4>Life-cycle</h4>
<p>If the end of the track was reached due to a user request, the event
source for this event is the user interaction event source.</p>
<p>To invoke the <dfn class="abstract-op">device permission revocation algorithm</dfn> with <var>permissionName</var> and
jan-ivar marked this conversation as resolved.
Show resolved Hide resolved
{{DevicePermissionDescriptor/deviceId}} <var>deviceId</var>, run the
{{MediaDeviceInfo/deviceId}} <var>deviceId</var>, run the
jan-ivar marked this conversation as resolved.
Show resolved Hide resolved
following steps:</p>
<ol class="algorithm">
<li>
Expand Down Expand Up @@ -3647,8 +3647,6 @@ <h2>Methods</h2>
use=] a {{PermissionDescriptor}} with its {{PermissionDescriptor/name}} member set
to the permission name associated with <var>kind</var>
(e.g. <a>"camera"</a> for <a>"video"</a>, <a>"microphone"</a> for <a>"audio"</a>),
and, optionally, consider its {{DevicePermissionDescriptor/deviceId}} member set to
any appropriate device's <var>deviceId</var>,
while considering all devices attached to a
live and <a>same-permission</a>
{{MediaStreamTrack}} in the current {{Document}}
Expand Down Expand Up @@ -5427,34 +5425,29 @@ <h1 id="permissions-integration">Permissions Integration</h1>
</dt>
<dd>
<pre class="idl">
dictionary DevicePermissionDescriptor : PermissionDescriptor {
DOMString deviceId;
};

dictionary CameraDevicePermissionDescriptor : DevicePermissionDescriptor {
dictionary CameraDevicePermissionDescriptor : PermissionDescriptor {
boolean panTiltZoom = false;
};
</pre>
<p>
A permission covers access to the device given in the associated descriptor.
A permission covers access to at least one device of a kind.
</p>
<p>
If the descriptor does not have a {{DevicePermissionDescriptor/deviceId}}, its
semantic is that it queries for access to any device of that kind. Thus, if a query
for the <a>"camera"</a> permission with no
{{DevicePermissionDescriptor/deviceId}} returns {{PermissionState/"granted"}}, the
The semantics of the descriptor is that it queries for access to any device of that kind.
Thus, if a query
for the <a>"camera"</a> permission returns {{PermissionState/"granted"}}, the
client knows that it will get access to one camera without a permission prompt, and if
{{PermissionState/"denied"}} is returned, it knows that no getUserMedia request for a
camera will succeed.
</p>
<p>
If a {{PermissionState/"granted"}} permission is present on some, but not all, devices of a kind, a query
without the {{DevicePermissionDescriptor/deviceId}} will return
If the User agent considers permission given to some, but not all, devices of a kind, a query
jan-ivar marked this conversation as resolved.
Show resolved Hide resolved
will return
{{PermissionState/"granted"}}.
</p>
<p>
If a {{PermissionState/"denied"}} permission is present on all devices of a kind, a query
without the {{DevicePermissionDescriptor/deviceId}} will return
If the User agent considers permission denied to all devices of a kind, a query
jan-ivar marked this conversation as resolved.
Show resolved Hide resolved
will return
{{PermissionState/"denied"}}.
</p>
<p>
Expand All @@ -5463,44 +5456,17 @@ <h1 id="permissions-integration">Permissions Integration</h1>
</p>
<p class="note">
A {{PermissionState/"granted"}} permission is no guarantee that getUserMedia will succeed. It
only indicates that the user will not be prompted for permission to the
{{DevicePermissionDescriptor/deviceId}} it specifies. There are many
only indicates that the user will not be prompted for permission. There are many
other things (such as constraints or the camera being in use) that can cause
getUserMedia to fail.
</p>
</dd>
<dt>
[=powerful feature/extra permission data type=]
</dt>
<dd>
A list of {{MediaDeviceInfo/deviceId}} values for the devices the user has made a
non-default decision on access to.
</dd>
<dt>
[=powerful feature/permission query algorithm=]
</dt>
<dd>
The permission query algorithm runs the following steps:
<ol class="algorithm">
<li>If |permissionDesc|.deviceId exists in the [=powerful feature/extra permission
data=], set <code>|status|.state</code> to |permissionDesc|'s <a>permission state</a>
and terminate these steps.
</li>
<li>Let <var>global</var> be a copy of |permissionDesc| with the
{{DevicePermissionDescriptor/deviceId}} member removed.
</li>
<li>Set <code>|status|.state</code> to <var>global</var>'s <a>permission state</a>.
</li>
</ol>
</dd>
<dt>
[=powerful feature/permission revocation algorithm=]
</dt>
<dd>
This is the result of calling the [=device permission revocation algorithm=] passing
{{PermissionDescriptor/name}} and {{DevicePermissionDescriptor/deviceId}} as arguments.
If the descriptor does not have a {{DevicePermissionDescriptor/deviceId}}, then
<code>undefined</code> is passed in place of {{DevicePermissionDescriptor/deviceId}}.
{{PermissionDescriptor/name}} and <code>undefined</code> as arguments.
jan-ivar marked this conversation as resolved.
Show resolved Hide resolved
</dd>
</dl>
</section>
Expand Down
Loading