Re: Streams and Blobs

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 UTC