Closed Bug 1740824 Opened 3 years ago Closed 3 years ago

Add a pref to turn off focus requirements in enumerateDevices and getUserMedia

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
98 Branch
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?

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.)

See Also: → 1729889

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.

(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?

(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.

Flags: needinfo?(karlt)

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: nobody → karlt

and "devicechange" events.

Depends on D132908

Flags: needinfo?(karlt)

"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.

Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6a115af40640 add a pref to turn off focus requirements for enumerateDevices() r=jib https://hg.mozilla.org/integration/autoland/rev/27d0103a7155 remove unused support file links r=mjf
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: