W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: [whatwg] File API Streaming Blobs

From: Charles Pritchard <chuck@jumis.com>
Date: Wed, 10 Aug 2011 14:05:37 -0700
Message-ID: <4E42F2A1.9030608@jumis.com>
To: Aaron Colwell <acolwell@chromium.org>
CC: Glenn Maynard <glenn@zewt.org>, Simon Heckmann <simon@simonheckmann.de>, WHATWG <whatwg@lists.whatwg.org>, "WEBAPPLICATIONS (WEBAPPS) WORKING GROUP" <public-webapps@w3.org>, Eric U <ericu@google.com>, "arun@mozilla.com" <arun@mozilla.com>, Adam Malcontenti-Wilson <adman.com@gmail.com>
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 
> <http://html5-mediasource-api.googlecode.com/svn/tags/0.2/draft-spec/mediasource-draft-spec.html> and 
> pending WebKit patch 
> <https://bugs.webkit.org/show_bug.cgi?id=64731> 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);
http://www.whatwg.org/specs/web-apps/current-work/complete/video-conferencing-and-peer-to-peer-communication.html#dom-mediastream

The WHATWG spec seems closer to (mediaElement.createStream()).append() 
semantics.
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 
HTMLMediaElement
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):
https://mozillalabs.com/rainbow/
https://github.com/mozilla/rainbow
https://github.com/mozilla/rainbow/blob/master/content/example_canvas.html


-Charles
Received on Wednesday, 10 August 2011 21:06:31 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:47 GMT