Open Bug 1648209 Opened 4 years ago Updated 4 years ago

getDisplayMedia() prompts for permission twice under Fedora Linux

Categories

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

77 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: heavy, Unassigned)

Details

Attachments

(3 files)

Attached image first.png

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0

Steps to reproduce:

I am writing a WebRTC web app under Fedora Linux. I use navigator.mediaDevices.getDisplayMedia() to request permission to share the local screen with a peer.

Actual results:

The call to getDisplayMedia() instigates the permission/sharing dialog (see first.png), but after selecting something to share and pressing the "allow" button, the window for selecting the share target appears again and I must reselect my share target (see second.png).

Expected results:

It should only ask for the share target once. Firefox under Windows and Mac OS does not behave this way and only asks for the share target once.

Attached image second.png

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → WebRTC: Audio/Video
Product: Firefox → Core

Thank you for reporting this. Firefox does access the screen twice, once for the preview displayed in the sharing prompt and then a second time when the screen is actually shared. The first runs as part of the browser chrome, the second as part of the content.

That looks like a Fedora OS level permission prompt. Does Fedora provide a way of remembering that an application has already been given permission to access a window or screen? I'm not sure if there is anything we can do about this in Firefox itself (short of removing the preview in the Firefox sharing prompt.)

Flags: needinfo?(heavy)

Ahh. That would make some sense. I don't see anyway in the dialog boxes to record the decision.

Funny thing is, I just tried to experiment with clicking "remember this decision" in the Firefox sharing dropdown and when I click on that it actually disables "allow" and says "Firefox can not allow permanent access to your screen". It does this on Windows, Mac OS, and Linux, so perhaps remembering the granted permission for screen sharing just isn't allowed in general.

I guess I just have to live with this odd behavior.

Just as a side note, you can also see from the first screenshot I attached that the Firefox sharing dropdown doesn't include any text for selecting a specific window. The combobox in the sharing dropdown has two entries: blank and "Enter screen". So you just have to guess that you select the blank entry which causes the other Fedora dialog box show. And to make matters worse, it doesn't matter which entry you choose, since it brings up the same Fedora dialog box that allows you to choose either a specific window or the entire screen.

That makes the whole process even clunkier.

Thanks for following up.

Flags: needinfo?(heavy)

I don't have Fedora available to test with, but I'd be interested to know if Chromium is doing any better here. If you're hitting the same problems with it, it might be worthwhile filing a bug with Fedora indicating that this is causing problems the screensharing permissions model in browsers. For what it's worth, we've had similar problems with the new OS X OS level permissions prompt, but there at least it is possible to permanently grant access to an application.

I'm going to leave this open just in case there's something we can do about this in Firefox, but from everything you've said, it sounds like this is something to be fixed in Fedora.

Severity: -- → S4
Priority: -- → P5

Sorry, my last comment about the combobox entries should have said: blank and "Entire screen".

Doing a quick test on Chromium right now. It appears that WebRTC isn't working completely correctly (or at least my app is not working completely correctly in Chromuim); however, the experience there for screen sharing is much nicer.

One click on my button to share my screen brings up a single dialog box to share the screen, a window, or a tab (see chromium.png). Once I select the window I want to share, it is done and no further action is required. Very nice.

Attached image chromium.png
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: