Skip to content
New issue

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

ProgressCallback func params total = -1 #781

Open
omitchen opened this issue Sep 26, 2024 · 0 comments
Open

ProgressCallback func params total = -1 #781

omitchen opened this issue Sep 26, 2024 · 0 comments

Comments

@omitchen
Copy link

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<string>;
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant