Re: [whatwg] File API Streaming Blobs

On 8/9/2011 9:38 AM, Aaron Colwell wrote:
> FYI I'm working on an experimental extension to Chromium to allow 
> media data to be streamed into a media element via JavaScript. Here is 
> the draft spec 
> <> and 
> pending WebKit patch 
> <> related to this work. 
> I have simple WebM VOD playback w/ seeking working where all media 
> data is fetched via XHR.

It's nice to see this patch.

I'm hoping to see streamed array buffers in XHR, though fetching in 
chunks can work,
given the relatively small overhead of HTTP headers vs Video content.

The WHAWG specs have a Media Stream example which uses URL createObjectURL:
navigator.getUserMedia('video user', gotStream, noStream);
function gotStream(stream) {
     video.src = URL.createObjectURL(stream);

The WHATWG spec seems closer to (mediaElement.createStream()).append() 
Both WHATWG and the draft spec agree on src=uri;

File API has to toURL semantics on objects, simlar to the draft spec, 
for getting filesystem:// uris.

My understanding: The draft spec is simpler, intended only to be used by 
and only by one element at a time, without introducing a new object. In 
the long
run, it may make sense to create a media stream object, consistent with 
the WHATWG direction.

On another note, Mozilla Labs has some experiments on recording video 
from <canvas> (as well as general webcam, etc):


Received on Wednesday, 10 August 2011 21:06:31 UTC