Closed smaug---- closed 5 years ago
That is correct, and it is written that way for practical reasons. "Switching the underlying audio output device" is typically a task that cannot be performed synchronously (i.e., typically you have to go to another thread or process to switch the device, and then get an asynchronous notification about the change being completed, which must run on another task).
Please reopen if you think this requires more discussion.
https://w3c.github.io/mediacapture-output/#dom-htmlmediaelement-setsinkid 5.5 queues a task to set [[SinkId]] . [[SinkId]] is just a slot with initial value null. 5.3. has already changed element's underlying output device.
So, there is time between 5.3 and 5.5 when element's [[SinkId]] doesn't tell what the output device actually is.