-
-
Couldn't load subscription status.
- Fork 1k
-
I'm following this pattern. https://github.com/ffmpegwasm/ffmpeg.wasm/blob/main/apps/react-vite-app/src/App.tsx
And getting the above error whenever I try to load this library.
const loadFFMpeg = async () => {
// TRIED UMD AND ESM, BOTH BOMB
// const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.2/dist/umd';
const baseURL = "https://unpkg.com/@ffmpeg/core-mt@0.12.2/dist/esm";
const ffmpeg = ffmpegRef.current;
ffmpeg.on('log', ({ message }) => {
console.log({message});
});
// BOMBS OUT HERE
await ffmpeg.load({
coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`, 'text/javascript'),
wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`, 'application/wasm'),
});
setLoaded(true);
}
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments
-
I'm getting the same error too.
Beta Was this translation helpful? Give feedback.
All reactions
-
Same root cause as issues #594, #548, etc... will be fixed when pull request #562 is implemented. For now here are 3 options:
- 1 download and host ffmpeg.wasm alongside your code (simplest)
- 2 fork the repo, implement [WIP] Proof of concept to let ffmpeg.wasm work in angular #562 and run the GitHub action that creates a new build... or build yourself (not as simple)
- 3 Use the umd version with an on the fly patch demoed in discussion Browser example using unpkg.com CDN #580
Beta Was this translation helpful? Give feedback.
All reactions
-
same issue on me with webpack 4 project.
I also tried to solve this problem by directly downloading and hosting the core files and wasm files, but it didn't work properly.
Beta Was this translation helpful? Give feedback.