Re: File API: reading a Blob

Aymeric,

On Jul 16, 2014, at 8:20 AM, Aymeric Vitte <vitteaymeric@gmail.com> wrote:

> Example:
> var myfile=new Blob();
> 
> //chunks are coming in
> myfile=new Blob([myfile,chunk],...)
> 
> //mylink A tag
> mylink.href=URL.createObjectURL(myfile)
> 
> click on mylink --> does not work
> 
> Expected behavior: the file (a video for example) should play as it is incremented.
> 
> This is inconsistent with the standard files behavior (see [1] for example), this example should work without having to use the Media Source Extensions API.



This is a great use case, but breaks File API currently (and the abstract model, too).  

Options to consider might be:

1. Including partial Blob data with the existing FIle API. But we already ship as is, so we could forego decoding to get this right, but that doesn’t seem optimal either. 

2. Use a new API for this, such as Streams. Since we’ll use streams for non-file cases, it could be useful here (and might be a better fit for the use case, which features heavy video use).

— A*

Received on Thursday, 17 July 2014 13:10:38 UTC