W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2011

[whatwg] Invoking getUserMedia() with Unknown Options

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Thu, 31 Mar 2011 13:45:42 +0200
Message-ID: <4D946966.1010101@lachy.id.au>
   When getUserMedia() is invoked with unknown options, the spec 
currently implicitly requires a PERMISSION_DENIED error to be thrown.

e.g. navigator.getUserMedia("foo");

In this case, the option for "foo" is unknown.  Presumably, this would 
fall under platform limitations, and would thus jump from step 11 to the 
failure case, and throw a permission denied error.

We are wondering if this is the most ideal error to throw in this case, 
as opposed to introducing a more logical NOT_SUPPORTED error, and if it 
might be useful to authors to distinguish these cases?

We assume, however, that if the author requests "audio,foo", and the 
user grants access to audio, then the success callback would be invoked, 
despite the unknown option for "foo".

Lachlan Hunt - Opera Software
Received on Thursday, 31 March 2011 04:45:42 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:31 UTC