browser-compat-data icon indicating copy to clipboard operation
browser-compat-data copied to clipboard

api.MediaDevices.devicechange_event - Not emit in Firefox 90.0 (Ubuntu Linux / 64-bit)

Open jzombie opened this issue 4 years ago • 2 comments

Xubuntu 20.04 64-bit / Firefox 90.0

What information was incorrect, unhelpful, or incomplete?

navigator.mediaDevices.addEventListener('devicechange', eventHandler) does not invoke event handler.

What did you expect to see?

eventHandler invoked

Did you test this? If so, how?

Yes, compared against Google Chrome 91, and it works in Chrome with the same code.

MDN page report details
  • Query: api.MediaDevices.devicechange_event
  • MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/devicechange_event
  • Report started: 2021-08-14T19:25:06.246Z

jzombie avatar Aug 14 '21 19:08 jzombie

@jzombie I know this issue is quite old, but do you still remember how you reproduced the issue?

Edit: This may have been fixed by bug 1753131 in Firefox 98:

Gecko currently dispatches "devicechange" events only when

  1. there is an actively capturing MediaStreamTrack, or
  2. the origin has a permission for permanent access to a camera or microphone.

"fully active and has focus" has subsequently been added to the spec as a sufficient condition. This provides for "audiooutput" devices even when getUserMedia() is not used.

caugner avatar Jan 13 '25 09:01 caugner

@caugner I can't exactly recall but I believe that I was testing it when plugging in new (or unplugging) audio devices via USB and detecting the event generation.

jzombie avatar Jan 13 '25 16:01 jzombie