ffmpegwasm / ffmpegwasm/ffmpeg.wasm

ProgressCallback func params total = -1

Open
#781 0 comments 0 reactions 0 assignees View on GitHub
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**
image

**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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.