getDisplayMedia - minor user experience concerns

381 views
Skip to first unread message

Christoph Eggert

unread,
Mar 25, 2019, 4:18:48 PM3/25/19
to discuss-webrtc
Hello everyone,

I know this is not strictly a WebRTC topic, but as it has been mentioned in this group as part of the Chrome releases (since this is pretty much the only use case I guess), so I thought this might be the best place to ask. 

Basically, with getDisplayMedia there are still two minor concerns I heard from users that I agree are not optimal for the user experience, and those are present in at least Firefox, Chrome and Vivaldi from my tests:

1. The NotAllowedError covers both voluntary user denials, as well as restrictions for the browser. Users find it quite annoying to get an error message for something they decided themselves, on the other hand I don't want to risk not throwing an error when the browser is actually denied permission by something else. Is there any way to differentiate this reliably? If not, who is to blame? :) 

2. During the selection which screen to share, it seems like buttons with cursor effects etc. still show the cursor changes most of the time, at least when it's initiated by a button that has this. See this modified fiddle from Mozilla's documentation for example: https://jsfiddle.net/k2zc6bmg/ -> Firefox still seems to show the fitting cursor everywhere normally, implying you can still control things; Chrome seems to change the cursor for the whole bottom right area (the behavior seems kind of all over the place regarding that). In any case, it's not possible to click anything in any browser. Vivaldi at least darkens the whole window so that it's obvious you first have to interact. This seems very browser-specific, but all browsers seem to have issues in common. Same question here: Any best practices I'm overlooking, where should this be filed otherwise? 

Thanks!

Neil Young

unread,
Mar 25, 2019, 8:11:27 PM3/25/19
to discuss-webrtc
Maybe not the answer you want to have. I'm missing the most a way to revoke a share from Firefox :/ There is no such a handle as in Chrome.

Neil Young

unread,
Mar 25, 2019, 8:31:31 PM3/25/19
to discuss...@googlegroups.com
Sorry, OT I admit :)

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/7170abe6-efcb-4145-bd63-a12194e5ad5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Harald Alvestrand

unread,
Mar 26, 2019, 3:36:53 AM3/26/19
to discuss...@googlegroups.com
The spec says: (https://w3c.github.io/mediacapture-screen-share/#mediadevices-additions):

The User Agent MUST NOT create a permission storage entry with a value of "granted".

If the result is "denied", jump to the step labeled Permission Failure below. If the user never responds, this algorithm stalls on this step. [[This results in the NotAllowedError]]

If the user grants permission but a hardware error such as an OS/program/webpage lock prevents access, reject p with a new DOMException object whose name attribute has the valueNotReadableError and abort these steps.

If the result is "granted" but device access fails for any reason other than those listed above, rejectp with a new DOMException object whose name attribute has the value AbortError and abort these steps.

I think this means that the behavior you are complaining about is a bug - non-user restrictions ("any other reason") should result in NotReadableError or AbortError, not NotAllowedError. Feel free to file a bug quoting this section of the spec.





--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.

Christoph Eggert

unread,
Mar 26, 2019, 5:02:46 AM3/26/19
to discuss-webrtc
Hi Harald,

thanks for the headsup - I was actually referring to the Mozilla documentation (https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia), which claims that the NotAllowedError triggers on "Permission to access a screen area was denied by the user, or the current browsing instance is not permitted access to screen sharing." -> so I can take it that this is just a wrong description on their end, looking into the specs? Honestly I don't even know how to not permit the browser to access the screensharing, so I was just developing around this description.

Best,
Christoph
Reply all
Reply to author
Forward
0 new messages