ffmpegwasm / ffmpegwasm/ffmpeg.wasm
Default core path can be incorrect
- Dominant language
- C
- Stars
- 17.8k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Similar to https://github.com/ffmpegwasm/ffmpeg.wasm/issues/374, the [`defaultOptions` method](https://github.com/ffmpegwasm/ffmpeg.wasm/blob/master/src/browser/defaultOptions.js#L7) (which is called as a side-effect upon importing the library) can trigger the following error in a development environment:
```
error - ../../node_modules/@ffmpeg/ffmpeg/src/browser/defaultOptions.js:7:0
Module not found: Can't resolve '/node_modules/@ffmpeg/core/dist/ffmpeg-core.js'
Import trace for requested module:
../../node_modules/@ffmpeg/ffmpeg/src/browser/index.js
../../node_modules/@ffmpeg/ffmpeg/src/index.js
```
**To Reproduce**
- try and import the library in a development environment like next.js where the assets are hashed
**Expected behavior**
- I am overriding the `corePath` myself in `createFFmpeg` and will never be using these `defaultOptions` -- perhaps `defaultOptions` should be lazily evaluated when needed, instead of being assigned immediately upon importing the library
Contributor guide
Assessment
This issue has not been assessed yet.