Re: Camera API proposal

On Wed, 26 Aug 2009, Brad Lassey wrote:
> 
> I think the best way to provide support for a live video preview is to 
> feed the video through an html5 video tag.  The simplest way to do that, 
> IMHO, would be to have a method in the api that returns a URI that can 
> be used as the source for a video tag.
> 
> ex:
>    myVideoEl.src = cameraAPI.getVideoPreviewURI().spec;

Having a "Stream" interface equivalent to the FileData interface, with a 
"URL" attribute that gives you a URL that returns that stream, is the way 
to go, IMHO. This would give us the broadest options for integration with, 
e.g., WebSockets later (we could just add an API that takes a stream, and 
another that returns a stream, for instance). Having consistency across 
all the various APIs in this manner is strongly desireable, IMHO.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 26 August 2009 21:13:23 UTC