Re: [MSE] Appending URLs

Hi Mark,

Comments inline...

On Thu, Jun 14, 2012 at 5:51 PM, Mark Watson <watsonm@netflix.com> wrote:

>  Hi Aaron,
>
>  I do think this is a good idea, but I am not sure if it is a good idea
> to do it right away (in this first version).
>
>  We know that XHR + appending bytes works, moving to appending Urls is an
> optimization. My concerns are:
> (i) there are some other things that are necessary to make appending Urls
> work, specifically to ensure the script has enough network performance
> information to make the rate adaptation decisions
>

I was hoping that this information would be passed via the append events.
My hope that having progess events every ~350ms or so like HTMLMediaElement
does would be better than waiting for the whole transfer to complete.


> (ii) (you can answer this better than me) it's possible that appendUrls
> could be much more implementation work than append bytes
>

For Chrome at least, I was planning on using most of WebKit's resource
loading code to implement this. I was hoping to leverage as much common
code from XHR as possible. The one major difference is that I want to
append the data as it arrives instead of waiting for the entire request to
complete like XHR does.


>
>  I understand that a script could still use XHR and Blob URLs - is this
> efficient ? I'm not that familiar with blob URLs - can you get one from an
> XHR without copying the data up to the Javascript layer ? If that is the
> case, then my concerns are diminished.
>

Yes you can get XHR to return you a Blob and then you can pass that to
URL.createObjectURL() to get the Blob URL. A Blob is just a handle to the
underlying data. The Blob URL is just a way to pass this handle to things
that use URLs. The actual data doesn't surface into the JavaScript world
until you use something like XHR or FileReader to get at it.


>
>  The W3C Web Performance group has some good specifications for providing
> performance information to scripts on HTTP operations performed by the
> browser. But the information is available to Javascript only after each
> download is complete - I guess that is as much as you get with XHR…
>

I was hoping to be able to provide information during the transfer which is
why I was suggesting a progress style event. Perhaps we could take some of
the ideas/mechanisms and use them here as well.

Aaron

Received on Friday, 15 June 2012 20:58:27 UTC