On 19 Apr 2014, at 11:42 am, Jonas Sicking <[email protected]> wrote:

> On Thu, Apr 17, 2014 at 4:07 AM, Paul Theriault <[email protected]> 
> wrote:
>> Both APIs have a similar prompt, and would likely have a similar name in the 
>> settings app, possibly leading to confusion for the user. So I think we 
>> should aim to have a single camera prompt and single camera permission in 
>> the settings app. But I am not what the long term plan is for mozCamera, or 
>> what the best approach to achieve this unified UI.
> 
> Agreed. There's no reason to separate these two security-wise.
> 
> One important question is, will we require that application enumerate
> some permission in the app manifest in order to use getUserMedia? We
> did this for geolocation and for the notification APIs, where even
> though normal web pages can use these APIs, if an app wants to use
> them we require the app to enumerate a permission in its manifest.
> 
> Requiring the permission to be in the manifest does have the advantage
> that we can make those permissions show up in the settings app's UI
> for configuring application permissions. I'm inclined to require the
> same for getUserMedia for the same reason.

gUM on b2g currently requires video-capture/audio-capture to be declared in the 
manifest, and I agree we should continue this.

> 
> But I think that regarding what we put in the permissions part of the
> manifest, and what we display to the user both in prompts and in the
> settings UI, we should treat mozCamera and getUserMedia the same. So
> we should figure out a single permission name which would cover both
> APIs. I'm fine with this being "video-capture" if that's what the
> WebRTC team prefers.

If we are not going to expose mozCamera and video-capture to the same app 
levels (i.e. if mozCamera is privileged only), I was thinking we would need to 
keep the permissions separate. For example, if we merged to use ‘video-capture’ 
- this has to be prompt for web-apps and web content, but we want to deny 
mozCamera access to hosted and web content. I suppose we could change the 
mozCamera permission check to check for both the permission, and the app level, 
which I assume is what you have in mind. 

That sounds like a more simple approach to what I had in mind so (e.g. grant 
both permissions with one prompt) so I’ll raise a bug to merge the permissions.

> 
>> Do we plan to expose mozCamera to regular web apps and web content, and 
>> perhaps could we therefore eventually just use the same permission)?  Or do 
>> we need want to remain having separate permissions, and unify the prompt and 
>> the permission in the settings app somehow?
> 
> Starting with the v2.0 release I'd like to expose mozCamera to
> privileged apps. I'd like to not expose it to normal webpages given
> that we likely need to deprecate the API at some point.
> 
> Eventually I am indeed hoping that getUserMedia will be able to meet
> the same use cases as mozCamera does, however so far that is not the
> case.

Ok great - this is exactly the guidance I was looking for. 

Maire - if there are no objections from the webrtc team, this is approach I 
will advocate in bug 938467.

> 
> / Jonas

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to