Open Bug 1325397 Opened 4 years ago Updated 3 years ago
The number of open windows is only updated in the sharing drop down after a page refresh
[Affected versions]: - latest Nightly 53.0a1 (2016-12-22) - latest Aurora 52.0a2 (2016-12-22) - 51.0b9 (20161219140923) - 50.1.0 (20161208153507) [Affected platforms]: - Mac OS X 10.12.1 - Ubuntu 14.04 x86 - Windows 10 x64 [Steps to reproduce]: 1. Lanuch Firefox 2. Navigate to about:config and confirm that: * media.getusermedia.screensharing.allow_on_old_platforms is false; * media.getusermedia.screensharing.enabled is true * media.getusermedia.screensharing.allowed_domains is set to many different websites, including mozilla.github.io 3. Go to https://mozilla.github.io/webrtc-landing/gum_test.html - have al least one more open applications - choose one of them 4. Click the Application button (or the Window button) 5. Open the "Application to share" drop down (or the "Window to share" drop down) and look for the application (or window) chosen in step 3 6. Open a new window of the same application 7. Repeat the step 5 8. Refresh the https://mozilla.github.io/webrtc-landing/gum_test.html page 9. Repeat the step 5 [Expected result]: - The number of open windows is properly updated in step 7 and step 9 (namely increased by one) [Actual result]: - The number of open windows is only updated after a page refresh (only in step 9) [Regression range]: - This issue is not a recent regression, as is reproducible all the way back to Firefox 42
Is the ondevicechange event fired (or expected to be fired in the future) in this case? From a UI perspective, this is almost the same thing as updating the list of devices when a user plugs a headset.
It is not fired, and I think it's unlikely it'll ever be fired on content at least. The screensharing spec  (which hasn't been updated in a while) makes no mention of it, and I think it would be a significant privacy intrusion if we generally potentially fired an event on lots of browser tabs whenever a user opened or closed an application window in the OS. That said, it may still be the way to go internally, given how we use enumerateDevices already internally to enumerate screensharing devices, but it's work. Alternatively, you could poll on mozGetUserMediaDevices() on an interval and detect changes yourself while the prompt is up. But as I recall, even that would require platform changes, since I believe that method only returns the same cached list today.  https://w3c.github.io/mediacapture-screen-share/
backlog: --- → webrtc/webaudio+
Priority: -- → P2
Mass change P3->P4 to align with new Mozilla triage process.
Priority: P3 → P4
You need to log in before you can comment on or make changes to this bug.