Open padenot opened 1 year ago
How is different from onsinkchange
?
https://webaudio.github.io/web-audio-api/#dom-audiocontext-onsinkchange
This would be fired when the underlying device changes, not necessarily in reaction to setSinkId(...);
having been called on the AudioContext
.
It might be possible to reuse the even "sinkchange"
. It might be desirable to be able to distinguish a sink change because of setSinkId(...)
and something external though, we need to think about it.
In 02/09 Teleconf:
@padenot suggested that there might be a tricky case where setSinkId() user call could happen almost at the same time of user plugging out an audio device from the system. We need to think about the order of events and how to handle this case properly.
2023 TPAC Audio WG Discussion:
sinkchange
event for a platform-orignated callback when there is a change in the system device registry. sinkId
property under AudioContext to the empty string ("") when there’s no audio device to fallback.
We can probably use
"devicechange"
. This is useful, because changing the device can have problematic performance issue, because the block size, latency and channel count can change.