Open eeeps opened 8 years ago
Might be possible with the new fetch api
https://fetch.spec.whatwg.org/#fetch-api http://caniuse.com/#search=fetch
@eeeps Thanks for bringing it up. There are actually many related questions:
Yes, XHR allows partial content to be requested. This requires server side support and requires user to know in advance how much partial data to fetch.
fetch
mentioned by @jnordberg might also be a good solution; I don't know much about it.
This would be the ideal solution. It would allow decoding to continue in parallel with data download, and stopping when the target resolution is reached. But this requires the decoding to yield to the JS event loop. It's a hard problem to solve; issue #19 tracks this.
Yes, if the partial size is indicated as an attribute. In this case, we can use the XHR partial content strategy.
If the size is not known, then we are back to #19
Under “Controlling the image dimensions” here it talks about partially decoding the image to fit a
canvas
element’s actual size... is there any way to partially load the FLIF resource as well, with, say, HTTP range requests?