Re: [html-media-capture] VideoFacingModeEnum as the capture attribute's value

To reiterate, the use case here is that mobile web authors may want to
 provide a more convenient experience for their users to update their 
profile pictures. Since many smartphones have two cameras, this 
proposal allows the author to provide a hint to the user agent of 
which camera to use. If the hint cannot be obeyed, the user agent is 
free to fall back to the camera that is available.

Concretely, the proposal is to allow 
[`VideoFacingModeEnum`](http://w3c.github.io/mediacapture-main/#idl-def-VideoFacingModeEnum)
 as values to the `capture` attribute. I think `user` and 
`environment` are the most useful ones.

The proposal turns the IDL from
`attribute boolean capture;`
to
`attribute DOMString capture;`

which makes for one backwards incompatible change, which is that 
disabling capture via JS would no longer work:

```
document.getElementById("inputFileCapture").capture = false;
```

I think it's an acceptable tradeoff for a more streamlined flow of 
capturing with the right camera.

Any thoughts?

-- 
GitHub Notification of comment by legion80
Please view or discuss this issue at 
https://github.com/w3c/html-media-capture/issues/4#issuecomment-268876241
 using your GitHub account

Received on Thursday, 22 December 2016 19:48:07 UTC