Navigator.mediaDevices has * an enumerateDevices function, which provides the same functionality as MediaStreamTrack.getSources and adds audio output devices to the list, and * a devicechange event to notify when the set of devices available have changed. enumerateDevices is enabled by default, and the devicechange event is behind a flag.
Demo
Documentation
Specification
Specification being incubated in a Community Group
Status in Chromium
Enabled by default
(tracking bug)
Consensus & Standardization
After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.
- Shipped/Shipping
- Positive
- No signals
Owners
Last updated on 2020-11-09
Comments
Firefox ships MediaDevices, but does not yet support ondevicechange. They are planning to add support: https://bugzilla.mozilla.org/show_bug.cgi?id=1152383