diff --git a/getusermedia.html b/getusermedia.html index 479fef30..27a33aea 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -5174,6 +5174,88 @@

Examples

+
+

Permissions Integration

+

This specification defines two [=powerful features=] identified by the + [=powerful feature/names=] "camera" and "microphone".

+

It defines the following types and algorithms:

+
+
+ [=powerful feature/permission descriptor type=] +
+
+
+          dictionary DevicePermissionDescriptor : PermissionDescriptor {
+            DOMString deviceId;
+          };
+
+          dictionary CameraDevicePermissionDescriptor : DevicePermissionDescriptor {
+            boolean panTiltZoom = false;
+          };
+        
+

+ A permission covers access to the device given in the associated descriptor. +

+

+ If the descriptor does not have a {{DevicePermissionDescriptor/deviceId}}, its + semantic is that it queries for access to all devices of that class. Thus, if a query + for the {{PermissionName/"camera"}} permission with no + {{DevicePermissionDescriptor/deviceId}} returns {{PermissionState/"granted"}}, the + client knows that there will never be a permission prompt for a camera, and if + {{PermissionState/"denied"}} is returned, it knows that no getUserMedia request for a + camera will succeed. +

+

+ If a permission state is present for access to some, but not all, cameras, a query + without the {{DevicePermissionDescriptor/deviceId}} will return + {{PermissionState/"prompt"}}. +

+

+ `{name: "camera", panTiltZoom: true}` is [=PermissionDescriptor/stronger than=] + `{name: "camera", panTiltZoom: false}`. +

+

+ Note that a "granted" permission is no guarantee that getUserMedia will succeed. It + only guarantees 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. +

+
+
+ [=powerful feature/extra permission data type=] +
+
+ A list of {{MediaDeviceInfo/deviceId}} values for the devices the user has made a + non-default decision on access to. +
+
+ [=powerful feature/permission query algorithm=] +
+
+ The permission query algorithm runs the following steps: +
    +
  1. If |permissionDesc|.deviceId exists in the [=powerful feature/extra permission + data=], set |status|.state to |permissionDesc|'s permission state + and terminate these steps. +
  2. +
  3. Let global be a copy of |permissionDesc| with the + {{DevicePermissionDescriptor/deviceId}} member removed. +
  4. +
  5. Set |status|.state to global's permission state. +
  6. +
+
+
+ [=powerful feature/permission revocation algorithm=] +
+
+ 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 + undefined is passed in place of {{DevicePermissionDescriptor/deviceId}}. +
+
+

Permissions Policy Integration

This specification defines two [=policy-controlled feature=]s