-
Notifications
You must be signed in to change notification settings - Fork 17
Description
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):
- Using e.g. Airpods, open https://jan-ivar.github.io/dummy/speaker_output.html
- Choose
Select Speakers: Other...and pick "Airpods". - Put Airpods in their case
- Hit
Play!
Expected: audio over laptop speakers. Actual: the following prompt:

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.