- From: Domenic Denicola <notifications@github.com>
- Date: Thu, 07 May 2015 03:34:23 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
Received on Thursday, 7 May 2015 10:34:52 UTC
There is an additional paradigm where you pipe the response body stream to a writable stream. I am not 100% sure on how this would all work but you could imagine e.g. ```js const ws = new StreamingImageDecoder(); responseInstance.body.pipeTo(ws).then(() => { // use ws.something... maybe ws.bitmap returns an ImageBitmap? // ws.element returns a HTMLImageElement? }); ``` In this scenario you could probably access `ws.something` before the pipe finishes to see the in-progress image. (Remember the 90s where you could see images stream visually over slow connections?) Another version (possibly more useful for continually-updating things) is ```js responseInstance.body.pipeTo(videoEl.writable); ``` --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/49#issuecomment-99808120
Received on Thursday, 7 May 2015 10:34:52 UTC