Add a pref to turn off focus requirements in enumerateDevices and getUserMedia
Categories
(Core :: WebRTC: Audio/Video, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox98 | --- | fixed |
People
(Reporter: jib, Assigned: karlt)
References
Details
Attachments
(2 files)
This has been requested by partners to assist with internal testing of Firefox. Apparently some test harnesses run tests without focus.
We have a media.navigator.permission.disabled
pref to turn off permissions, so having a pref for this shouldn't be much worse, but that one does not bypass focus checks.
Thoughts?
Assignee | ||
Comment 1•3 years ago
|
||
Web-platform tests use the "focusmanager.testmode" for focus emulation, but I suspect a WebDriver:SwitchToWindow through geckodriver or similar is still necessary to set the initial focus. (We don't want to ignore focus altogether when that is set, because tests still expect a particular single window to have the focus.)
Reporter | ||
Comment 2•3 years ago
|
||
This particular partner has a setup where all clients are launched on the same test device, so if there are 2+ FF clients in a call it will be not be trivial to keep focus for all of them.
Assignee | ||
Comment 3•3 years ago
|
||
(In reply to Jan-Ivar Bruaroey [:jib] (needinfo? me) from comment #2)
This particular partner has a setup where all clients are launched on the same test device, so if there are 2+ FF clients in a call it will be not be trivial to keep focus for all of them.
That's the kind of situation that "focusmanager.testmode" is designed to address. Each client emulates focus so that it behaves as if one of its windows has focus. Do you know whether the partner uses geckodriver?
Comment 4•3 years ago
|
||
(In reply to Karl Tomlinson (back Feb 1 :karlt) from comment #3)
(In reply to Jan-Ivar Bruaroey [:jib] (needinfo? me) from comment #2)
This particular partner has a setup where all clients are launched on the same test device, so if there are 2+ FF clients in a call it will be not be trivial to keep focus for all of them.
That's the kind of situation that "focusmanager.testmode" is designed to address. Each client emulates focus so that it behaves as if one of its windows has focus. Do you know whether the partner uses geckodriver?
No apparently they don't use WebDriver. Is there some sort of pref they can flip? I think we spoke about this last year and there wasn't, but we might be able to land something.
Assignee | ||
Comment 5•3 years ago
|
||
Without WebDriver, I suspect "focusmanager.testmode" would still need something like SpecialPowers.spawnChrome()
to set emulated window
focus.
Assuming SpecialPowers
is not available, a new and different pref would be required.
Yet to cobble together a test, perhaps after bug 1748737 is fixed.
https://hg.mozilla.org/try/rev/61706e1aa49e85461d379235179c6ff3ca8b38b1#l2.12
Assignee | ||
Comment 6•3 years ago
|
||
and "devicechange" events.
Depends on D132908
Assignee | ||
Comment 7•3 years ago
|
||
I don't know why these were included in
https://hg.mozilla.org/mozilla-central/rev/4271ef91a68621e3de091f455a18777fae0f7a0d#l67.15
The files may be used with /dom/media/test/manifest.js, but that is used only in
https://searchfox.org/mozilla-central/rev/fe800a7fd291db3c4b3e498cfe12ef2097662290/dom/media/webrtc/tests/mochitests/test_peerConnection_capturedVideo.html#76
which uses only gLongerTests
https://searchfox.org/mozilla-central/rev/fe800a7fd291db3c4b3e498cfe12ef2097662290/dom/media/test/manifest.js#127
Depends on D137616
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 8•3 years ago
|
||
"media.navigator.permission.disabled" is sufficient to bypass focus checks for getUserMedia()
and getDisplayMedia()
, so AFAIK there's nothing further we need to do there.
Comment 10•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6a115af40640
https://hg.mozilla.org/mozilla-central/rev/27d0103a7155
Description
•