w3c/mediacapture-main — pull request #45 by martinthomson (2014-10-26 22:52:52+00:00)
Title: Video preview

This adds a new method to `MediaDeviceInfo` called `grabPreview`. It provides applications with a way of acquiring a preview image for a video input device.

I didn't add the ability to acquire a preview stream, because that is totally creepy. This does risk creeping people out in a similar fashion, so I've suggested that access be limited. I think that the measures I have described are adequate, particularly because they offer the UA quite a bit of flexibility in how often lights come on. However, if we can't convince ourselves that they are, then this probably isn't a great idea to pursue.

What I haven't done here is provide information on the aspect ratio of the preview image, which will be necessary for the application to successfully draw this without distorting it. I'll add that in a subsequent commit if this idea sounds appealing.