This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18962 - Allow appending with XHR
Summary: Allow appending with XHR
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: Media Source Extensions (show other bugs)
Version: unspecified
Hardware: All All
: P1 normal
Target Milestone: FPWD
Assignee: Adrian Bateman [MSFT]
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard: tpac2012
Keywords:
Depends on: 20434
Blocks: 20253
  Show dependency treegraph
 
Reported: 2012-09-21 22:07 UTC by Aaron Colwell (c)
Modified: 2013-01-20 16:16 UTC (History)
5 users (show)

See Also:


Attachments

Description Aaron Colwell (c) 2012-09-21 22:07:03 UTC
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.
Comment 1 Yang Sun 2012-09-27 00:57:39 UTC
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.
Comment 2 Adrian Bateman [MSFT] 2012-10-22 02:37:41 UTC
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
Comment 3 Adrian Bateman [MSFT] 2012-12-04 15:32:47 UTC
I will add void append(Stream stm) and two events for appendcomplete and appenderror to the SourceBuffer object. Assigned to me.
Comment 4 Aaron Colwell (c) 2013-01-04 19:20:31 UTC
Changes committed
http://dvcs.w3.org/hg/html-media/rev/52a85235137b
Comment 5 Cyril Concolato 2013-01-20 16:16:17 UTC
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)