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

Unable to import and worker.js error #769

Open
ralyodio opened this issue Aug 1, 2024 · 1 comment
Open

Unable to import and worker.js error #769

ralyodio opened this issue Aug 1, 2024 · 1 comment

Comments

@ralyodio
Copy link

ralyodio commented Aug 1, 2024

import { FFmpeg } from '@ffmpeg/ffmpeg';
import { fetchFile } from '@ffmpeg/util';
@ralyodio
Copy link
Author

ralyodio commented Aug 1, 2024

So I realized it has to run client side only. I'm using svelte. Here's what I did:

	let FFmpeg;
	let fetchFile;

	onMount(async () => {
		fetchFile = (await import('@ffmpeg/util')).fetchFile;
		FFmpeg = (await import('@ffmpeg/ffmpeg')).FFmpeg;
		ffmpeg = new FFmpeg({ log: true });
	});


The problem is something is requesting /worker.js which obviously isn't on my root static folder...so it just gets a 404

Where is this worker.js file coming from and why is it not loading from the package?

@ralyodio ralyodio changed the title Unable to import Unable to import and worker.js error Aug 1, 2024
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