Re: Permission-hint? (was Re: [Bug 22214] How long do permissions persist?)

On 05/15/2014 01:03 AM, Jan-Ivar Bruaroey wrote:
>
>> One option for asking for multiple cameras would be to hack/kluge an 
>> extra argument into gUM that indicates that  the app will be asking 
>> for more devices.   So the app could call gUM multiple times but the 
>> user would be prompted only once the app indicated that it had made 
>> its final request.  (The parameter could be something like 
>> 'additionalRequest' with a default value of 'false'.  If gUM is 
>> called with 'additionalRequest=true', the UA stores the description 
>> of the desired device but waits to display the permissions prompt.)
>
> Yes, if we cared about the difference between all cameras and "more 
> than one camera but short of all". Otherwise I think what we're 
> suggesting seems the same.

Long memory .... at one point we had the idea that if getUserMedia() was 
called twice before reaching a browser stable state (that is, before the 
Javascript function ended), it would be recommended practice that the 
browser gave only one access prompt even though multiple devices were 
requested.

This is actually captured under "implementation suggestions" in 10.5:


Best Practice 2: Handling multiple devices

A|MediaStream| 
<http://dev.w3.org/2011/webrtc/editor/getusermedia.html#idl-def-MediaStream>may 
contain more than one video and audio track. This makes it possible to 
include video from two or more webcams in a single stream object, for 
example. However, the current API does not allow a page to express a 
need for multiple video streams from independent sources.

It is recommended for multiple calls togetUserMedia() 
<http://dev.w3.org/2011/webrtc/editor/getusermedia.html#dom-navigator-getusermedia>from 
the same page be allowed as a way for pages to request multiple, 
discrete, video or audio streams.

A single call togetUserMedia() 
<http://dev.w3.org/2011/webrtc/editor/getusermedia.html#dom-navigator-getusermedia>will 
always return a stream with either zero or one audio tracks, and either 
zero or one video tracks. If a script callsgetUserMedia() 
<http://dev.w3.org/2011/webrtc/editor/getusermedia.html#dom-navigator-getusermedia>multiple 
times before reaching a stable state, this document advises the UI 
designer that the permission dialogs should be merged, so that the user 
can give permission for the use of multiple cameras and/or media sources 
in one dialog interaction. The constraints on each getUserMedia call can 
be used to decide which stream gets which media sources.

Perhaps we don't need to revisit this particular sub-issue.....

Received on Tuesday, 27 May 2014 19:21:59 UTC