W3C home > Mailing lists > Public > public-webrtc@w3.org > July 2013

Re: Improve error message when browser denies access to getUserMedia()

From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
Date: Fri, 26 Jul 2013 08:17:44 +1000
Message-ID: <CAHp8n2niDF6mdFxNnL4nOBMDKW_UBi+TpAaBQCT_GTXAzrAq3w@mail.gmail.com>
To: cowwoc <cowwoc@bbs.darktech.org>
Cc: "public-webrtc@w3.org" <public-webrtc@w3.org>
On Fri, Jul 26, 2013 at 1:51 AM, cowwoc <cowwoc@bbs.darktech.org> wrote:
>
>     I think there is a misunderstanding of the issue. I am asking to
> differentiate between:
>
> * Access denied by the user (whether directly or by way of a saved preference)

Looking at http://dev.w3.org/2011/webrtc/editor/getusermedia.html#idl-def-NavigatorUserMediaError,
that's the error message PERMISSION_DENIED

> * Access denied by the browser

and this would be CONSTRAINT_NOT_SATISFIED - or wouldn't it?


>     The former is recoverable. The latter is fatal (likely a programming
> bug).
>
>     I am *not* asking to differentiate between a user denying access
> directly versus denying access by way of a saved preference.

PERMISSION_DENIED_USER and PERMISSION_DENIED_BROWSER don't seem the
right choice of names then.

Maybe you can specify more clearly what case you'd like flagged that
is different from CONSTRAINT_NOT_SATISFIED ?


Is it e.g. something like DEVICE_NOT_AVAILABLE ? Then I could imagine
the browser going:

1. Did the user (at some stage) disallow me to access the device?
Yes: flag PERMISSION_DENIED error
     -> JS can react and bring up informative dialog
    (I'd actually prefer that to the browser bringing up the dialog -
maybe there should be a way to ask the browser not to bring up the
dialog?)
No: proceed

2. Can I get to the device?
No: flag DEVICE_NOT_AVAILABLE error
    -> JS can react and bring up a dialog telling the user to check
the camera connection
Yes: proceed

3. Can I get the stream from the device with the given constraints?
No: flag CONSTRAINT_NOT_SATISFIED error
    -> JS can react and read what constraints the device supports (do
we have such an API??) or at least try a different constraint set
Yes: proceed


Cheers,
Silvia.
Received on Thursday, 25 July 2013 22:18:32 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:35 UTC