You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The interesting version of devicechange with backgrounded tabs is if someone unplugs his headset while the tab is backgrounded, and expects sound to automagically switch to speakers without having to foreground the tab first.
JS can't intervene if backgrounded, since enumeration may not work (enumerateDevices"MAY ... wait ... until ... focus"), so there's no general solution for this. Even worse, there's a solution in some user agents but not others.
But is this behavior desirable? The VC use case from a private office makes sense. OTOH, someone passively attending from a library worrying audio might start blaring out of their laptop speakers should their headset accidentally disconnect, seems undesirable.
The text was updated successfully, but these errors were encountered:
I think Jan-Ivar's comment points out that the platform will be unable to confidently switch output devices on its own, so it seems that if we switch at all, we need to punt the choice of how to switch to JS.
One solution would be to define that a change in an output device that is in active use acts like a substitute for focus in the permission-gating algorithm, so that the signal gets fired and the enumerateDevices works within the callback from that signal.
The spec says "When the audio device ... is no longer available, the user agent must take no action".
@alvestrand wrote in w3c/mediacapture-main#842 (comment):
JS can't intervene if backgrounded, since enumeration may not work (enumerateDevices "MAY ... wait ... until ... focus"), so there's no general solution for this. Even worse, there's a solution in some user agents but not others.
But is this behavior desirable? The VC use case from a private office makes sense. OTOH, someone passively attending from a library worrying audio might start blaring out of their laptop speakers should their headset accidentally disconnect, seems undesirable.
The text was updated successfully, but these errors were encountered: