[whatwg] File API Streaming Blobs

Charles Pritchard chuck at jumis.com
Mon Aug 8 19:16:41 PDT 2011

On 8/8/2011 2:51 PM, Glenn Maynard wrote:
> On Mon, Aug 8, 2011 at 4:31 PM, Simon Heckmann <simon at simonheckmann.de 
> <mailto:simon at simonheckmann.de>> wrote:
>     Well, not directly an answer to your question, but the use case I
>     had in mind is the following:
>     A large encrypted video (e.g. HD movie with 2GB) file is stored
>     using the File API, I then want to decrypt this file and start
>     playing with only a minor delay. I do not want to decrypt the
>     entire file before it can be viewed. As long as such as use case
>     gets covered I am fine with everything.
> Assuming you're thinking of DRM, are there any related use cases other 
> than crypto?  Encryption for DRM, at least, isn't a very compelling 
> use case; client-side Javascript encryption is a very weak level of 
> protection (putting aside, for now, the question of whether the web 
> can or should be attempting to handle DRM in the first place).  If 
> it's not DRM you're thinking of, can you clarify?

Jonas Sickling brought up a few cases for XHR-based streaming of 
arraybuffers: progressive rendering of word docs and PDFs.
WebP and WebM have had interesting packaging hacks. Packaging itself, 
whether DRM or not, is compelling.
PDF supports embedded data, a wide range of formats. GPAC provides many 
related tools (MP4 based, I believe):

The audio and video tags drop frames
It seems to me that if a listener is not registered to the stream, data 
would just be dropped.

As an alternative, the author could register a fixed length circular buffer.

For instance, I could create  1 megabyte arrayview, run 
and use .append(data). That kind of structure may support multicast 
(multiple audio/video elements)
and improved XHR2 semantics. The circular buffer, itself, is easy to 
prototype: subarray
works well with typed arrays.

Otherwise relevant, is the work on raw audio data
that Firefox and Chromium have released as experimental extensions.
It does work on a buffer-based system.


More information about the whatwg mailing list