w3c / mediacapture-output

API to manage the rendering of audio on any audio output device
https://w3c.github.io/mediacapture-output/
Other
26 stars 25 forks source link

Behaviour when the system default audio output device changes #49

Closed padenot closed 7 years ago

padenot commented 7 years ago

What happens when the following happens:

  1. We're playing an HTMLMediaElement through the default device, with a empty sinkId
  2. The default device changes (because the user changes it in the control panel of the operating system, or a new device has been plugged in, and the system sets it as the default).

Is the HTMLMediaElement silently re-routed to the new default device? Does it stop playing ? The former is what happens right now in UAs, the latter is probably not web-compatible.

More broadly, the concept of a "default device" is too overloaded, and needs to be defined. Is it the device that was the default at the time the audio playback started? Is it a kind of "virtual device" that always outputs to whatever the default device is (i.e. the audio output follows the system default, even if the system default changes) ?

guidou commented 7 years ago

I think your concern is valid. However, it refers to a situation that already exists outside this spec (playing audio on the default device). When the sinkId attribute is empty, the UA should have the same behavior as if this spec didn't exist. Thus, specifying what happens when the default device changes is outside the scope of this spec.

padenot commented 7 years ago

This is the first spec that talks about output audio devices, and patches existing specs, with existing non-specificed behaviour.

Not speccing the current behaviour (automatic device switching, following the system default output device) and extending it is not something that is going to end up with the same behaviour accross User Agents.