Closed Bug 1396338 Opened 7 years ago Closed 7 years ago

mediaDevices.ondevicechange broken on Windows 7

Categories

(Core :: WebRTC: Audio/Video, defect)

55 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1397977

People

(Reporter: pablo.platt, Unassigned)

Details

(Whiteboard: [needinfo to reporter 2017-09-07])

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0
Build ID: 20170824053622

Steps to reproduce:

1. Load https://jsfiddle.net/jib1/Lqo4paed/
3. Connect and disconnect devices and watch for "device change" messages.

Tested with Microsoft Lifecam and 3.5mm headset.
Works on Chrome 60.0.3112.113.

Another example
https://mdn.mozillademos.org/en-US/docs/Web/API/MediaDevices/ondevicechange$samples/Example?revision=1228449


Actual results:

No "device change" messages.
mediaDevices.ondevicechange doesn't fire.


Expected results:

We should see a "device change" message every time we connect or disconnect a device.
Component: Untriaged → WebRTC: Audio/Video
Product: Firefox → Core
Can you check if this is a duplicate of any of your bugs?
Flags: needinfo?(mchiang)
Whiteboard: [needinfo 2017-09-07 mchiang]
Pablo, FYI, for "devicechange" to work you need to have given consent to use your capture devices already. Either by a persistent permission, or by an active capture in progress.

In the fiddle, when I click the "gUM!" button first, and allow the capture, it works for me on Windows 10.

Clearing Munro's ni? until we're clear on the steps to reproduce.
Flags: needinfo?(mchiang) → needinfo?(pablo.platt)
Whiteboard: [needinfo 2017-09-07 mchiang] → [needinfo to reporter 2017-09-07]
Andreas, I can confirm that if I click on "gUM!" first and allow the capture I'm getting device change events on Windows 7.

ondevicechange and nenumerateDevices()has exactly the same level of privacy. An app can periodically call enumerateDevices() and get the same info. If Firefox doesn't require GUM approval for navigator.mediaDevices.enumerateDevices() (with fake device names) than it shouldn't require it for navigator.mediaDevices.ondevicechange.

Feel free to close the issue if you don't agree.
Thanks
Flags: needinfo?(pablo.platt)
Flags: needinfo?(jib)
The spec was updated last year to always fire on the tab in focus. Hope that helps.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(jib)
Resolution: --- → DUPLICATE
As to polling on enumerateDevices, bug 1397978 is about plugging that hole.
You need to log in before you can comment on or make changes to this bug.