Closed Bug 1426354 Opened 6 years ago Closed 6 years ago

mediaDevices.ondevicechange Linux

Categories

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

57 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: vitor.graziano, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20171128222554

Steps to reproduce:

I'm trying mediadevices.ondevicechange on Linux(Mint cinnanon 17.3 64 bit, kernel 3.19.0-32-generic), firefox 57.0.1 64 bit and i'm having a bad working. 




Actual results:

The problem is: the event is fired every time a mediadevices.getUserMedia is called, and when this occurs the event is fired for a long time(about 1 minute or more) every 2~5 seconds.


Expected results:

when i call mediadevices.getUserMedia  mediadevices.ondevicechange should be not triggered.
Only when i plug or unplug a media device mediadevices.ondevicechange should be called
jib, any thoughts here?
Component: Audio/Video → WebRTC: Audio/Video
Flags: needinfo?(jib)
Vitor, does this reproduce for you with https://jsfiddle.net/jib1/LbtxeLvw/ (start camera and share cam+mic)?

Unfortunately, I don't have a linux box to test with.
Flags: needinfo?(jib) → needinfo?(vitor.graziano)
I tried on linux using Nightly; I saw one device change on each plug/unplug event using the fiddle
(In reply to Jan-Ivar Bruaroey [:jib] (needinfo? me) from comment #2)
> Vitor, does this reproduce for you with https://jsfiddle.net/jib1/LbtxeLvw/
> (start camera and share cam+mic)?
> 
> Unfortunately, I don't have a linux box to test with.

Hi Jan,
i tried to reproduce using the link you provided and getting the console(using the jsfiddle feature jquery(edge)/firebug lite: https://stackoverflow.com/questions/39130610/how-to-get-console-inside-jsfiddle) i counted six "device changed" items, obviously i didn't plug or unplug any device during the test.
Flags: needinfo?(vitor.graziano)
(In reply to Randell Jesup [:jesup] from comment #3)
> I tried on linux using Nightly; I saw one device change on each plug/unplug
> event using the fiddle

I downloaded the Nighty and the bug is not occurred with this version, everything worked fine. Thanks for the help.
(In reply to vitor.graziano from comment #5)
> (In reply to Randell Jesup [:jesup] from comment #3)
> > I tried on linux using Nightly; I saw one device change on each plug/unplug
> > event using the fiddle
> 
> I downloaded the Nighty and the bug is not occurred with this version,
> everything worked fine. Thanks for the help.

Thanks to Andreas Pehrson, i did a check on this flag: media.ondevicechange.fakeDeviceChangeEvent.enabled and it was set to the bad value(true). Thanks again for the help.
Sorry for the inconvenience. This is a pref we use for testing the event propagation from our backend when we test in automation where we can't physically plug and unplug devices. We should hide this pref from about:config so it doesn't get set by mistake.
Closing per comment 6.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.