Closed Bug 1811341 Opened 2 years ago Closed 2 years ago

Display capture under Wayland causes double system prompting for permissions

Categories

(Core :: WebRTC, defect, P1)

defect

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: ng, Assigned: ng)

References

Details

Attachments

(1 file, 2 obsolete files)

We need to restore the behavior in which the gUM/gDM dialog prompts the user, asking if they want to select a surface to share from the system dialog.

As it is the user gets prompted by the system dialog twice: once for generating the thumbnail preview of the screen in the prompt, and once again after clicking allow.

This is annoying, confusing, and the user can select different surfaces in each prompt.

Pushed by na-g@nostrum.com: https://hg.mozilla.org/integration/autoland/rev/9076240166d0 restore OS picker behavior under wayland for gUM;r=jib,mjf
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch

Recent WebRTC upstream changed the way xdg-desktop-portal calls are made
and while previously it always asked for both screens and windows in one
call, now it's being made separate. This resulted into making just call
requesting screens and there was no way to share an application window.
For that reason a new API addition is needed on top of WebRTC desktop
capture API. Also make use of MouseCursorMonitorPipeWire on Linux, as
with recent WebRTC the mouse cursor is no longer embedded and is sent
using PipeWire stream metadata. We also need to make sure when there is
MediaDevice that will request OS prompt, make it checked as first.

Attachment #9316997 - Attachment description: WIP: Bug 1811341 - fix OS picker behavior under Wayland and missing cursor → Bug 1811341 - fix OS picker behavior under Wayland and missing cursor

Recent WebRTC backports and changes that are about to be backported from
upstream to Firefox breaks and will break how we work with PipWire based
desktop capturer. Currently when constructing device list, a fallback to
ScreenCapturerX11 is used, as we don't call set_allow_pipewire(), which
wouldn't make a difference anyway. In such case the only thing we need
is a placeholder for a screen that will request OS level prompt. We also
need a way to request both screens and windows in one xdg-desktop-portal
call as recent WebRTC made each type be called separately, therefore the
introduction of GenericCapturer. Lastly we need to make sure when there
is a MediaDevice requesting the OS prompt, that it will be checked as
first.

Attachment #9316997 - Attachment is obsolete: true
Attachment #9317326 - Attachment description: WIP: Bug 1811341 - fix OS picker behavior under Wayland → Bug 1811341 - fix OS picker behavior under Wayland
Attachment #9317326 - Attachment description: Bug 1811341 - fix OS picker behavior under Wayland → WIP: Bug 1811341 - fix OS picker behavior under Wayland
Attachment #9317326 - Attachment description: WIP: Bug 1811341 - fix OS picker behavior under Wayland → Bug 1811341 - fix OS picker behavior under Wayland
Attachment #9317326 - Attachment description: Bug 1811341 - fix OS picker behavior under Wayland → WIP: Bug 1811341 - fix OS picker behavior under Wayland
Attachment #9317326 - Attachment description: WIP: Bug 1811341 - fix OS picker behavior under Wayland → Bug 1811341 - fix OS picker behavior under Wayland
Attachment #9317326 - Attachment description: Bug 1811341 - fix OS picker behavior under Wayland → WIP: Bug 1811341 - fix OS picker behavior under Wayland
Attachment #9317326 - Attachment description: WIP: Bug 1811341 - fix OS picker behavior under Wayland → Bug 1811341 - fix OS picker behavior under Wayland

A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)

(In reply to Release mgmt bot [:suhaib / :marco/ :calixte] from comment #6)

A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)

Thanks bot. I am opening a new bug as clone of this bug to attach the new work to.

Regressions: 1817263

Comment on attachment 9317326 [details]
Bug 1811341 - fix OS picker behavior under Wayland

Revision D169627 was moved to bug 1817263. Setting attachment 9317326 [details] to obsolete.

Attachment #9317326 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: