devicechange event is sent to a
MediaDevices instance whenever a media device such as a camera, microphone, or speaker is connected to or removed from the system. It's a generic
Event with no added properties.
|| ||The event target (the topmost target in the DOM tree).|
|| ||The type of event.|
|| ||Whether the event normally bubbles or not|
|| ||Whether the event is cancellable or not?|
See Example in MediaDevices.ondevicechange for an example that uses
devicechange events to update lists of devices onscreen.
|Media Capture and Streams |
The definition of 'devicechange' in that specification.
|Candidate Recommendation||Initial specification.|
We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!
|Feature||Chrome||Firefox (Gecko)||Edge||Internet Explorer||Opera||Safari (WebKit)|
|Basic support||52.0||51 (51)||(Yes)||?||?||39||?|
|Feature||Android||Android Webview||Edge||Firefox Mobile (Gecko)||Firefox OS||IE Mobile||Opera Mobile||Safari Mobile||Chrome for Android|
|Basic support||No support||No support||(Yes)||?||?||?||39||?||No support|
 Support for the
devicechange event and for
MediaDevices.ondevicechange landed in Firefox 51, but only for Mac, and disabled by default. It can be enabled by setting the preference
true. Support for this event was added for Linux and Windows—and it was enabled by default—starting in Firefox 52.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.