This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
This bug is the result of discussions around Bug 16998 http://lists.w3.org/Archives/Public/public-html-media/2012Jul/0074.html http://www.w3.org/2012/07/31-html-media-minutes.html#item05 The goal is to allow appending data fetched from XMLHttpRequest without having to surface the media data to the JavaScript layer. Ideally this data would be progressively appended as it arrives.
what does it mean by without surface media data to JS layer? In common operation, I will fetch data from XHR response by JS API, then using append() to append to SourceBuffer. What are other means direct media data in XHR reponse to SourceBuffer? (In reply to comment #0) > This bug is the result of discussions around Bug 16998 > > http://lists.w3.org/Archives/Public/public-html-media/2012Jul/0074.html > http://www.w3.org/2012/07/31-html-media-minutes.html#item05 > > The goal is to allow appending data fetched from XMLHttpRequest without having > to surface the media data to the JavaScript layer. Ideally this data would be > progressively appended as it arrives.
The goal here is to avoid JavaScript from having to do work to load the data with script (for example into an ArrayBuffer) before pushing back down to the media engine. User agents use fewer resources by letting the media engine and related components take care of buffer management. I propose adding void appendStream(Stream stream) based on the Microsoft proposal [1], which was discussed recently in Webapps [2]. We need to understand if and how this feature will be added to the W3C XHR spec. [1] http://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm#addition-of-stream-responsetype [2] http://lists.w3.org/Archives/Public/public-webapps/2012OctDec/0134.html
I will add void append(Stream stm) and two events for appendcomplete and appenderror to the SourceBuffer object. Assigned to me.
Changes committed http://dvcs.w3.org/hg/html-media/rev/52a85235137b
Why did you add the maxSize attribute ? I don't see the use case where one would want to push XHR data limited to a size, except maybe if it has parsed the data in already, in which case the appendArrayBuffer will be used. I would rather see a maxDuration attribute. (As a side note, I think the Stream object has a problem in that it keeps all data since the beginning of the download, which is not what we want here. More details here: http://lists.w3.org/Archives/Public/public-webapps/2013JanMar/0081.html)