4 ms·
it uses the [0]File System API of emscripten. i think it is possible to pipe via stdin somehow but i have no experience with any of this stuff but am interested
by mercora 5y ago
it uses the [0]File System API of emscripten. i think it is possible to pipe via stdin somehow but i have no experience with any of this stuff but am interested to do something similar myself. although i don't want to transcode but repackage input streams for browser consumption. I also found [1]this which implements various filesystem backends in a compatible way afaict although the XHR backend [2]requires some index file i would like to avoid and its also not clear to me if this will actually stream data and/or use range requests.
[0] https://emscripten.org/docs/api_reference/Filesystem-API.html https://emscripten.org/docs/api_reference/Filesystem-API.htm...
[1] https://github.com/jvilk/BrowserFS https://github.com/jvilk/BrowserFS
[2] https://github.com/jvilk/BrowserFS/blob/a96aa2d417995dac7d376987839bc4e95e218e06/src/backend/HTTPRequest.ts#L58 https://github.com/jvilk/BrowserFS/blob/a96aa2d417995dac7d37...