From d9b6dfceeb237636c8eded6e8d1336388c2fb77f Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Fri, 23 Aug 2024 15:58:55 -0400 Subject: [PATCH 1/4] allow prompt bypass for miked speakers exposed through getUserMedia() --- index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 240362a..a8625e9 100644 --- a/index.html +++ b/index.html @@ -277,8 +277,9 @@

Methods

  • If deviceId is not - "" and matches an id previously exposed by - {{MediaDevices/selectAudioOutput}} in an earlier browsing + "" and matches an audio output device id previously + exposed by {{MediaDevices/selectAudioOutput}} or + {{MediaDevices/enumerateDevices()}} in an earlier browsing session, the user agent MAY decide, based on its previous decision of whether to persist this id or not for this set of origins, to run the following sub steps:

    From 6423a63b9897fd99583028227e9107cffdd9f8a6 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Mon, 26 Aug 2024 16:14:55 -0400 Subject: [PATCH 2/4] say selectAudioOutput() or getUserMedia() --- index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index a8625e9..55f91c5 100644 --- a/index.html +++ b/index.html @@ -279,7 +279,7 @@

    Methods

    If deviceId is not "" and matches an audio output device id previously exposed by {{MediaDevices/selectAudioOutput}} or - {{MediaDevices/enumerateDevices()}} in an earlier browsing + {{MediaDevices/getUserMedia()}} in an earlier browsing session, the user agent MAY decide, based on its previous decision of whether to persist this id or not for this set of origins, to run the following sub steps:

    @@ -345,7 +345,8 @@

    Dictionary AudioOutputOptions Members

    When the value of this dictionary member is not "", and matches the id previously exposed by - {{MediaDevices/selectAudioOutput}} in an earlier session, the user + {{MediaDevices/selectAudioOutput}} or + {{MediaDevices/getUserMedia()}} in an earlier session, the user agent MAY opt to skip prompting the user in favor of resolving with this id or a new rotated id for the same device, assuming that device is currently available.

    From bc261dda37c4e8155e1592da7c5ac39ef82739fd Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 29 Aug 2024 09:59:35 -0400 Subject: [PATCH 3/4] Clarify language around selectAudioOutput deviceId validation --- index.html | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index 55f91c5..884e66a 100644 --- a/index.html +++ b/index.html @@ -276,22 +276,30 @@

    Methods

    these steps.

  • -

    If deviceId is not - "" and matches an audio output device id previously - exposed by {{MediaDevices/selectAudioOutput}} or - {{MediaDevices/getUserMedia()}} in an earlier browsing - session, the user agent MAY decide, based on its previous - decision of whether to persist this id or not for this set - of origins, to run the following sub steps:

    +

    If deviceId is not "" + run the following sub steps:

    1. -

      Let device be the device identified by - deviceId, if available.

      +

      If deviceId matches a + a device id previously exposed by + {{MediaDevices/selectAudioOutput}} in an earlier browsing + session, or matches a device id of an audio output device + with the same groupId as an audio input device previously + exposed by {{MediaDevices/getUserMedia()}} in an earlier browsing + session, the user agent MAY decide, based on its previous + decision of whether to persist this id or not for this set + of origins, to run the following sub steps:

      +
        +
      1. +

        Let device be the device identified by + deviceId, if available.

        +
      2. +
      3. If device is available, resolve + p with either deviceId or a freshly + rotated device id for device, and abort the + in-parallel steps.

      4. +
    2. -
    3. If device is available, resolve - p with either deviceId or a freshly - rotated device id for device, and abort the - in-parallel steps.

  • [=Prompt the user to choose=] an audio output device, with @@ -346,6 +354,8 @@

    Dictionary AudioOutputOptions Members

    When the value of this dictionary member is not "", and matches the id previously exposed by {{MediaDevices/selectAudioOutput}} or + a device id of an audio output device with the same groupId as an + audio input device previously exposed by {{MediaDevices/getUserMedia()}} in an earlier session, the user agent MAY opt to skip prompting the user in favor of resolving with this id or a new rotated id for the same device, assuming From e8f358798ce3668a8010000bfa8b12eb87e71d02 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Thu, 29 Aug 2024 11:02:02 -0400 Subject: [PATCH 4/4] ...in this or an earlier browsing session... --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 884e66a..8ded1da 100644 --- a/index.html +++ b/index.html @@ -282,10 +282,10 @@

    Methods

  • If deviceId matches a a device id previously exposed by - {{MediaDevices/selectAudioOutput}} in an earlier browsing + {{MediaDevices/selectAudioOutput}} in this or an earlier browsing session, or matches a device id of an audio output device with the same groupId as an audio input device previously - exposed by {{MediaDevices/getUserMedia()}} in an earlier browsing + exposed by {{MediaDevices/getUserMedia()}} in this or an earlier browsing session, the user agent MAY decide, based on its previous decision of whether to persist this id or not for this set of origins, to run the following sub steps:

    @@ -356,7 +356,7 @@

    Dictionary AudioOutputOptions Members

    {{MediaDevices/selectAudioOutput}} or a device id of an audio output device with the same groupId as an audio input device previously exposed by - {{MediaDevices/getUserMedia()}} in an earlier session, the user + {{MediaDevices/getUserMedia()}} in this or an earlier session, the user agent MAY opt to skip prompting the user in favor of resolving with this id or a new rotated id for the same device, assuming that device is currently available.