kalanchoej
PD🧩 Plasmo Developers
•Created by kalanchoej on 5/31/2023 in #👟framework
ffmpeg wasm cannot load
I'm trying to use ffmpeg wasm to extract audio from a video file at a remote URL. Unfortunately I'm not able to even load ffmpeg. By default, the loader tries to fetch from a CDN, which results in a CORS error for me. I've attempted to go around that by referencing the local file like this:
import ffmpegCoreFile from "url:../vendor/ffmpeg-core.js"
I've tried using this in a background script, through messagings, and in a content script. I am getting a variety of errors depending on the circumstance so I'm wondering: Is this something we have an example for?
I see this error most frequently URL.createObjectURL is not a function
which is coming from ffmpeg, but I don't think it's a problem with ffmpeg, and is likely just that I don't understand how to implement this properly in Plasmo. There is a non-Plasmo example of this idea here https://github.com/ffmpegwasm/chrome-extension-app7 replies