W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

Re: Streams and Blobs

From: Anne van Kesteren <annevk@annevk.nl>
Date: Tue, 26 Feb 2013 16:38:01 +0000
Message-ID: <CADnb78jLt6DR9LpWRA-WNFS2qRSdB8qaDGNOQ5j6uPjcs+XKxg@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: WebApps WG <public-webapps@w3.org>
On Tue, Feb 26, 2013 at 3:53 PM, Glenn Maynard <glenn@zewt.org> wrote:
> On Tue, Feb 26, 2013 at 4:56 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
> I suppose a use case would be making a POST request or a request with
> special headers set to access a video stream.  You can createObjectURL on
> the resulting Stream and pass that to <video>.

Fair point.


> We can get "chunked" reads without an additional mode.  Just add an
> additional method, eg. clearResponse, which empties .response.  This would
> work for all modes that support incremental reads.  For Blobs, this would
> cause .response to return an empty blob and start filling up from scratch.
> In other words, .response in incremental blob mode returns a slice of the
> complete response in the range [start,end), where end is the total number of
> bytes read, start is initialized to 0, and clearResponse sets start = end.

Keeping the API closer to responseType/response seems nicer.


-- 
http://annevankesteren.nl/
Received on Tuesday, 26 February 2013 16:38:28 GMT

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