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 23726 - Integration between XMLHttpRequest and Streams API
Summary: Integration between XMLHttpRequest and Streams API
Status: RESOLVED WONTFIX
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Streams API (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Takeshi Yoshino
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-05 17:17 UTC by Takeshi Yoshino
Modified: 2015-04-28 04:51 UTC (History)
2 users (show)

See Also:


Attachments

Description Takeshi Yoshino 2013-11-05 17:17:01 UTC
Current ED tries to support upload-with-Stream usage by making send() to accept a Stream as its argument. We can also choose to let XHR provide a WritableByteStream.

For example, if we can make send() to return a WritableByteStream, it'll be

streamForUpload = xhr.send();
source.pipe(streamForUpload);

Current extension approach is easy. But maybe now we should revisit this and discuss which is better not only about XHR but for each API and if possible figure out good practice in general.
Comment 1 Takeshi Yoshino 2013-11-05 17:35:56 UTC
The SourceBuffer.appendStream method of Media Source Extensions takes a Stream as an argument.

https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#widl-SourceBuffer-appendStream-void-Stream-stream-unsigned-long-long-maxSize

void appendStream (Stream stream, [EnforceRange] optional unsigned long long maxSize);

----

Media Capture API

http://www.w3.org/wiki/Media_Capture

----

Discussion between Takeshi and Aymeric with some examples.

http://lists.w3.org/Archives/Public/public-webapps/2013JulSep/0593.html
http://lists.w3.org/Archives/Public/public-webapps/2013JulSep/0664.html
http://lists.w3.org/Archives/Public/public-webapps/2013OctDec/0232.html
Comment 2 Takeshi Yoshino 2015-04-28 04:51:44 UTC
Integration of Streams and XMLHttpRequest has been discontinued as the WG roughly agreed on feature freeze of XMLHttpRequest.

Integration with the Fetch API is happening at https://github.com/yutakahirano/fetch-with-streams.