Re: Request for feedback: Media Capture and Streams Last Call

On 7/7/15 3:15 PM, Mathieu Hofman wrote:
> I like the idea of only persisting deviceIds after a site was granted permissions to use the track but I'm a little confused about the implication of the "ask" permission.
>
> Consider the following flow:
> enumerateDevices() => { device: id = 12345 type = videoinput }
> getUserMedia({video: { deviceId: { exact: 12345 } }, user allows but doesn't want choice remembered => success, app stores deviceId to localStorage

By "doesn't want choice remembered" I assume you mean the user didn't 
opt for persisting permission? That's fine. We'd persist deviceId on gUM 
success OR persistent permission, not AND. It just takes one or the 
other. The id will be persisted here (if it wasn't already).

> Browser gets closed, in a new session, user visits site again, deviceId is saved in localStorage:
> getUserMedia({video: { deviceId: { exact: 12345 } } => ?

User gets asked again for the same camera (aka 12345), just like before.

> enumerateDevices() => { device: id = ????? type = videoinput }
>
> What is the behavior here?

It'll be { device: id = 12345 type = videoinput }. Persisted.


> To make sure the app can function properly, we need to persist deviceId if the site was ever granted permissions in the past, even if the user chose not to remember their choice. This seems detached from the current permissions possibilities of "ask / always / never", and wouldn't be surfaced in the UI. The user might not have a way to reset this either.
>
> Or did I miss something?

This should fall out naturally from the fact that once a deviceId is 
persisted, the only action that clears it is the clearing of cookies 
(unless we do something special for "Always Deny").

Hope that matches your thinking,

> Mathieu

.: Jan-Ivar :.

Received on Tuesday, 7 July 2015 22:33:49 UTC