Re: PROPOSAL: Simple image capture API

On Tue, Mar 13, 2012 at 5:01 PM, Randell Jesup <randell-ietf@jesup.org>wrote:

> On 3/13/2012 4:17 AM, Anant Narayanan wrote:
>
>> I'm trying to avoid a dependency on MediaStreams for the particular case
>> where all the web page wants is a single image from the user's camera.
>> Profile pictures, QR codes, there might be more…
>>
>
But you almost always want a preview, and that often needs to be
app-specific, even for profile pictures and QR codes, so I think
MediaStreams are usually needed anyway.

I don't think we want to propagate events along MediaStreams. That doesn't
seem necessary.

I think it would make sense to have VideoMediaStreamTrack (like
AudioMediaStreamTrack already), and APIs on video tracks to request setting
of various camera parameters (resolution, focus mode, etc) (async of
course), and an API to request a snapshot with/without flash and various
other parameters set momentarily (also async). The snapshot API should
probably trigger a callback passing a Blob which can be used as an <img>
source.

Rob
-- 
“You have heard that it was said, ‘Love your neighbor and hate your enemy.’
But I tell you, love your enemies and pray for those who persecute you,
that you may be children of your Father in heaven. ... If you love those
who love you, what reward will you get? Are not even the tax collectors
doing that? And if you greet only your own people, what are you doing more
than others?" [Matthew 5:43-47]

Received on Wednesday, 14 March 2012 23:41:12 UTC