W3C home > Mailing lists > Public > public-media-capture@w3.org > November 2015

Re: Formalizing our permissions model using the Permissions API

From: Harald Alvestrand <harald@alvestrand.no>
Date: Mon, 30 Nov 2015 09:51:17 +0100
To: Stefan Håkansson LK <stefan.lk.hakansson@ericsson.com>, "public-media-capture@w3.org" <public-media-capture@w3.org>
Message-ID: <565C0E05.4000004@alvestrand.no>
Den 30. nov. 2015 09:27, skrev Stefan Håkansson LK:
> On 30/11/15 08:54, Harald Alvestrand wrote:
>> Den 30. nov. 2015 08:48, skrev Stefan Håkansson LK:
>>> This looks quite good IMO.
>>> But, for microphone and camera permissions, would it not make sense to
>>> have a list of devideIds? For the situation where the UA has stored
>>> permissions (for this origin) to use camera A and B but not C?
>>> (Slightly different from all-cameras).
>> My reading of the permissions model is that if a permission is qualified
>> by an ID, each different ID value turns the permisison into a different
>> permission.
> I think you are right.
>> So if there existed 3 cameras A, B and C, I have permissions to camera A
>> and B, I would have the permissions "camera A" and "camera B", and there
>> would exist a permission "camera C" that I did not have.
> What would happen if you called navigator.permissions.query without 
> supplying a deviceId? E.g.
> navigator.permissions.query({name:'camera'})

I think this is supposed to return "undefined", since no such permission

It would also be possible to interpret this as permissions for the
default device, if one exists - that would make sense for the speaker
permission, since one has a default device in that case, but wouldn't
make sense for video cameras, where we don't.

Perhaps simplest to say that "if you care about checking permissions,
you have to enumerate devices first".
Received on Monday, 30 November 2015 08:51:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:34 UTC