We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey, in short: I have a problem with handling progress in toBlobURL method, when downloading a compressed wasm module.
toBlobURL
Some observations:
downloadWithProgress
Content-Length
Content-Encoding
Accept-Encoding: gzip, deflate, br, zstd
fetch
This causes this exception to occur in this downloadWithProgress method:
if (total != -1 && total !== received) throw ERROR_INCOMPLETED_DOWNLOAD;
Then in the catch block, we call buf = await resp.arrayBuffer(), and this causes a second exception on the already downloaded file:
catch
buf = await resp.arrayBuffer()
ffmpegwasm Failed to execute 'arrayBuffer' on 'Response': body stream already read…
Which effectively makes it impossible to download this wasm module.
Wasm files compress very well, for example, the ffmpeg-core.wasm module compresses from ~30MB to ~7MB using brotli.
ffmpeg-core.wasm
Personally, I don't know how to fix this properly, that the downloadWithProgress method handles compressed files.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey,
in short: I have a problem with handling progress in
toBlobURL
method, when downloading a compressed wasm module.Some observations:
downloadWithProgress
implementation is used under-the-hood,Content-Length
headerContent-Length
header is related toContent-Encoding
(which is controlled by the client, e.g.:Accept-Encoding: gzip, deflate, br, zstd
)fetch
method downloads the compressed module, but returns the uncompressed one,This causes this exception to occur in this
downloadWithProgress
method:Then in the
catch
block, we callbuf = await resp.arrayBuffer()
, and this causes a second exception on the already downloaded file:Which effectively makes it impossible to download this wasm module.
Wasm files compress very well, for example, the
ffmpeg-core.wasm
module compresses from ~30MB to ~7MB using brotli.Personally, I don't know how to fix this properly, that the
downloadWithProgress
method handles compressed files.The text was updated successfully, but these errors were encountered: