ffmpegwasm / ffmpegwasm/ffmpeg.wasm
ProgressCallback func params total = -1
- Dominant language
- C
- Stars
- 17.8k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
I want to implement the download progress function of wasm. Through
`export declare const toBlobURL: (url: string, mimeType: string, progress?: boolean, cb?: ProgressCallback) => Promise;`
I found that cb can be used, but the total in the callback is always -1
**To Reproduce**
```
const ProgressCallback = (event: DownloadProgressEvent) => {
console.log("event", event);
};
const [coreURL, wasmURL] = await Promise.all([
toBlobURL(
`${baseURL}/ffmpeg-core.js`,
"text/javascript",
true,
ProgressCallback
),
toBlobURL(
`${baseURL}/ffmpeg-core.wasm`,
"application/wasm",
true,
ProgressCallback
),
]);
```
**Expected behavior**
Hope to get the total value
**Screenshots**
**Desktop (please complete the following information):**
- OS: MacOS
- Browser chrome
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.
Contributor guide
Assessment
This issue has not been assessed yet.