ffmpegwasm / ffmpegwasm/ffmpeg.wasm
UMD builds are bugged: workers are loaded in "module" mode, but webpack worker builds dont work with that
- Dominant language
- C
- Stars
- 17.8k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
this line here
https://github.com/ffmpegwasm/ffmpeg.wasm/blob/efac2471225bf7b3dc7f394886437f394a74f0c9/packages/ffmpeg/src/classes.ts#L193-L195
always loads the workers in module mode. BUT webpack umd modules are NOT in module mode. so importScripts silently fails and ffmpeg never loads.
webpack outputs some bizarre "import" code
and this is what webpack outputs for the module import code, a bare function that always fails.
**To Reproduce**
make a copy of the UMD builds from node, and try to load them from a non-module source
**Expected behavior**
the modules, in umd mode, should be loaded in classic mode, not umd
**Screenshots**
see above
**Desktop (please complete the following information):**
- OS: Windows 11
- Browser: MS Edge
- Version: 0.12.10
**Additional context**
this bug was a NIGHTMARE to track down. the errors are caught and silently fail with no traceback. horrible.
Contributor guide
Assessment
This issue has not been assessed yet.