New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 625769 link

Starred by 7 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature
Team-Security-UX



Sign in to add a comment

WebRTC: the getUserMedia permission denied dialog is confusing

Reported by fi...@appear.in, Jul 5 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/51.0.2704.79 Chrome/51.0.2704.79 Safari/537.36

Steps to reproduce the problem:
1. go to a room on appear.in
2. block the camera using the camera item at the right side of the address bar (why does this not stop camera access?)
3. reload the page
4. You are in the room without audio and video.
5. Click the camera icon. It allows re-enabling the camera.
6. Reload. Now you get camera access but microphone access is still blocked.
7. Allow microphone access.
8. Reload.

Do the same on meet.jit.si. There, you don't get a chance to re-allow the camera even.

What is the expected behavior?
Re-allow access to camera and microphone in a single step.

What went wrong?
appear.in does a fallback strategy fro getUserMedia from audio/video to audio-only to video-only.

It looks like the permission popup only takes into account the last getUserMedia call, but it should make a decision based on the arguments to the first getUserMedia call (or the biggest set of constraints)

Did this work before? N/A 

Chrome version: 51.0.2704.79  Channel: n/a
OS Version: 
Flash Version: Shockwave Flash 16.0 r0
 
Components: Blink>WebRTC
Status: Untriaged (was: Unconfirmed)
Marking the above issue as Untriaged as this is a new feature request.

Dev team will take a call on the above request.

Thank you!

Comment 2 by fi...@appear.in, Jul 7 2016

jsfiddle reproducing the current appear.in behaviour (which is going to change soon): https://jsfiddle.net/yn5dph2u/1/

I can't reproduce the meet.jit.si behaviour but https://jsfiddle.net/h5tfakr4/1/
is odd. An error indicator is shown even though audio access works.
Cc: hta@chromium.org tommi@chromium.org
This is an old and known issue which happens due to the current UI does not handle separate device permissions if they are different from one another. We have an old internal bug 347157 where this has been discussed since M33 (and even earlier but the bug was filed then).

Also, the UI is only for permissions rather than a control knob for the device like on Firofox i.e. it checks the permission when the gUM request is made but after the request has been made, the permissions no longer matter for the existing streams.

AFAIK the conclusion was to wait and see how the getSources/mediaDevices/enumerateDevices would pan out as well as landing the output device enumeration and selection since those would affect the permission UI.

Now that all that has landed I do not know what the current status. tommi@ might know more?


Comment 4 by fi...@appear.in, Jul 31 2016

this is inconsistent even with the UX in the success case.
Calling this in succession
  navigator.mediaDevices.getUserMedia({audio: true})
  navigator.mediaDevices.getUserMedia({video: true})
leaves me with a dialog that lets me make decisions about both audio and video.

Comment 5 by fi...@appear.in, Jul 31 2016

further: I have blocked camera access for https://jsfiddle.net/yn5dph2u/1/ but am allowing microphone. Audio access works, stream.getTracks() returns an audio track (which is not compliant with the spec but...)
Hovering over the camera icon in the address says (german, h/t blum@):
  diese seite darf nicht auf die Kamera und das Mikrofon zugreifen
(roughly: not allowed to acccess camera and microphone)
At best, that is an incorrect translation, the site is accessing the microphone (and the red dot is shown).  

Comment 6 by fi...@appear.in, Jul 31 2016

and another one: suppose the user has blocked permission to one of the devices, e.g. video.
This means that calling GUM with {audio: true, video: true} will fail with NotAllowedError (?)
How can the application figure out that there is a chance that falling back to audio works? I'd prefer not to have a fallback mechanism that needs to guess even though I suspect that I might use enumerateDevices' .label to make smart decisions here in some cases.

Did I mention that I find this confusing? ;-)
enumerateDevices helps detect users without a camera or mic [1], but not blocked permissions.

As to Comment 6, FWIW using a fallback should always be safe I believe, e.g. [2]:

    gUM({video: true, audio: true})
    .catch(e => (e.name == NotAllowedError) ? gUM({video: true}) : Promise.reject(e))
    .catch(e => (e.name == NotAllowedError) ? gUM({audio: true)) : Promise.reject(e));

should never double-prompt (If the user had previously blocked camera only then they only get a prompt on the third call. OTOH if the user had not blocked anything, then they get a prompt on the first gUM call, and if they choose to block (both) at that point, they'll not see a prompt on the second and third call).

[1] http://stackoverflow.com/questions/25308486/make-video-stream-optional-in-getusermedia/33770858#33770858

[2] s/NotAllowedError/PermissionDeniedError/

Comment 8 by hta@chromium.org, Aug 1 2016

Comment on #4:

"Calling this in succession
  navigator.mediaDevices.getUserMedia({audio: true})
  navigator.mediaDevices.getUserMedia({video: true})
leaves me with a dialog that lets me make decisions about both audio and video."

This is per spec's implementation advice, 10.6 best practice 3:

"A single call to getUserMedia() will always return a stream with either zero or one audio tracks, and either zero or one video tracks. If a script calls getUserMedia() multiple times before reaching a stable state, this document advises the UI designer that the permission dialogs should be merged, so that the user can give permission for the use of multiple cameras and/or media sources in one dialog interaction. The constraints on each getUserMedia call can be used to decide which stream gets which media sources."


If the advice is followed, getUserMedia({audio: true}).then(s => getUserMedia({video: true}) should give two prompts, if there's a desire to demonstrate that.

Components: -Blink>WebRTC Blink>Webrtc>GetUserMedia
Labels: -OS-Linux OS-All

Comment 10 by fi...@appear.in, Aug 1 2016

#8: yes, this is good behaviour for the success case. The permission dialogs are not merged for errors or revoking permissions which is not consistent with that.

Is that spec still tweakable such  that it says '...can give or revoke permission for...'?

Comment 11 by hta@chromium.org, Aug 1 2016

File a bug in github and make a PR for the spec, and we'll consider it.
yes, the spec is still open for bug-fixing.

(Even better - make w3c tests that expect the Right Thing to happen, and submit them to the w3c test repo. We'll get to them eventually.)

I don't understand what "the permission dialogs are not merged for errors or revoking permissions", so a test case will help clarify the issue.
To quote Mark S Miller: “Specs traffic only in observable differences". Whether a UA decides to bundle UX prompts or not, isn't inherently observable in the JS API (except maybe through timing). I think that's desirable decoupling, and would like to understand what problem we're solving before changing the spec.

Comment 13 by fi...@appear.in, Aug 25 2016

two more issues:
1/ (popup.jpg) the popup shows a microphone selection field on machines that don't have a microphone
2/ on linux at least there is a suggestion that it may be necessary to reload the page to get access. That doesn't seem to be true (which makes me happy). See eventuell.png (which also shows the cut-off german translation of it)
popup.jpg
148 KB View Download
eventuell.png
47.4 KB View Download
re (2) no it's not required for access, but I think that text was just added in order to reduce user confusion if any existing streams using old devices were still live.
Components: -Blink>Webrtc>GetUserMedia Blink>GetUserMedia
Components: UI>Browser>Permissions>Prompts Internals>Permissions
Components: -Internals>Permissions
Components: -Blink>GetUserMedia
Cc: guidou@chromium.org

Comment 20 by jww@chromium.org, Jan 18 2017

Owner: dominickn@chromium.org
Status: Assigned (was: Untriaged)
Dominick, would you mind taking this or bringing someone else from the permissions team in to look at it?
Cc: timloh@chromium.org raymes@chromium.org kcaratt...@chromium.org
Components: Internals>Permissions
+Permissions people. I currently don't have much bandwidth, but less confusion is definitely a good thing.
Components: -Internals>Permissions UI>Browser>Permissions>Indicators

Comment 23 by fi...@appear.in, Mar 14 2017

additional confusing thing: if the user changes the permission here, the camera icon continues to have a red 'x' until the next call to getUserMedia. enumerateDevices returns a string with a label before that even (which is great as it allows the application to detect the change in permission)

Comment 24 by hta@chromium.org, Mar 14 2017

last point is according to spec, I think. Once the "can see labels" bit is flipped, it stays on until page is closed.

Comment 25 by fi...@appear.in, Mar 14 2017

#24: yes. But when the "see labels" bit is flipped the red x should disappear too. Small details (-:
Cc: aleksand...@intel.com
 Issue 692440  has been merged into this issue.
Labels: Hotlist-EnamelAndFriendsFixIt
Cc: dominickn@chromium.org
Owner: ----
Status: Available (was: Assigned)
Labels: -Hotlist-EnamelAndFriendsFixIt
Cc: shik@chromium.org

Sign in to add a comment