From 1b659c2f246cae4165d7822decfc10aada57ceb3 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Sat, 13 Nov 2021 16:21:34 -0500 Subject: [PATCH 1/3] Define "speaker-selection" powerful feature types and algorithms. --- index.html | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 72 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 987c9fd..be7c313 100644 --- a/index.html +++ b/index.html @@ -59,7 +59,7 @@

Attributes

output is being delivered, or the empty string if output is delivered through the user-agent default device. If nonempty, this ID should be equal to the {{MediaDeviceInfo/deviceId}} - attribute of one of the {{MediaDeviceInfo}} values returned from + attribute of one of the {{MediaDeviceInfo}} values returned from {{MediaDevices/enumerateDevices()}}.

On getting, the attribute MUST return the value of the {{HTMLMediaElement/[[SinkId]]}} slot.

@@ -256,8 +256,8 @@

Methods

  • Run the following steps in parallel:

      -
    1. Let descriptor be a {{PermissionDescriptor}} named - {{PermissionName/"speaker-selection"}}.

      +
    2. Let descriptor be a {{PermissionDescriptor}} with its + [=powerful feature/name=] set to "speaker-selection"

    3. If descriptor's [=permission state=] is @@ -432,6 +432,75 @@

      Obtaining Consent

    +
    +

    Permissions Integration

    +

    The Audio Output Devices API is a [=powerful feature=] that is + identified by the [=powerful feature/name=] "speaker-selection".

    +

    It defines the following types and algorithms:

    +
    +
    + [=powerful feature/permission descriptor type=] +
    +
    +

    + A permission covers access to the device given in the associated + {{DevicePermissionDescriptor}} 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 "speaker-selection" [=powerful feature=] with no + {{DevicePermissionDescriptor/deviceId}} returns {{PermissionState/"granted"}}, the + client knows that there will never be a permission prompt for an audio output device, + and if {{PermissionState/"denied"}} is returned, it knows that no getUserMedia request + for an audio output device will succeed. +

    +

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

    +

    + 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 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 one From dc353041e4b7ed4f49d4f91a011eae8523878769 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 10 Feb 2022 13:01:25 -0500 Subject: [PATCH 2/3] s/getUserMedia/selectAudioOutput/ Co-authored-by: Jan-Ivar Bruaroey --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index be7c313..a1a3c89 100644 --- a/index.html +++ b/index.html @@ -452,7 +452,7 @@

    Permissions Integration

    for the "speaker-selection" [=powerful feature=] with no {{DevicePermissionDescriptor/deviceId}} returns {{PermissionState/"granted"}}, the client knows that there will never be a permission prompt for an audio output device, - and if {{PermissionState/"denied"}} is returned, it knows that no getUserMedia request + and if {{PermissionState/"denied"}} is returned, it knows that no selectAudioOutput request for an audio output device will succeed.

    From 932592cf3d8580d7609683d445ad0e246cf94c8b Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 10 Feb 2022 13:35:20 -0500 Subject: [PATCH 3/3] Remove note --- index.html | 5 ----- 1 file changed, 5 deletions(-) diff --git a/index.html b/index.html index a1a3c89..4f4b0e8 100644 --- a/index.html +++ b/index.html @@ -460,11 +460,6 @@

    Permissions Integration

    a query without the {{DevicePermissionDescriptor/deviceId}} will return {{PermissionState/"prompt"}}.

    -

    - 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 that can cause getUserMedia to fail. -

    [=powerful feature/extra permission data type=]