Skip to content

Undesirable prompt from selectAudioOutput({deviceId}) if valid device removed #137

@jan-ivar

Description

@jan-ivar

Use case: A website has two buttons: PLAY and SELECT SPEAKERS. If the latter is used, the site persists the resulting deviceId to localStorage. On subsequent visits, the user just hits PLAY.

Problem: if the user removes their chosen device, they get a picker prompt when they click PLAY, which is confusing since they only associate that prompt with the SELECT SPEAKERS button.

Instead, the expected behavior would be to play out over the default audio output in this case.

STRs (requires Firefox Nightly 117):

  1. Using e.g. Airpods, open https://jan-ivar.github.io/dummy/speaker_output.html
  2. Choose Select Speakers: Other... and pick "Airpods".
  3. Put Airpods in their case
  4. Hit Play!

Expected: audio over laptop speakers. Actual: the following prompt:
image
I propose we consider having selectAudioOutput reject in this case instead of prompt, provided the user agent recognizes the deviceId as one it used to satisfy. This should still deter trackers.

Implementing this should be possible by tracking recently removed devices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions