ffmpegwasm/ffmpeg.wasm

Where is defined fetchFile?

Opened this issue · 1 comments

I'm using version 12.15 and in my code here is what i'm doing:

In my _Layout.cshtml page i have add the scripts:

<script src="~/ffmpeg-core/umd/ffmpeg-core.min.js"></script>
<script src="~/ffmpeg/umd/ffmpeg.min.js"></script>

<script>
document.addEventListener('DOMContentLoaded', async () => {
    if (typeof FFmpegWASM?.FFmpeg !== "function") {
        console.log("FFmpeg not available");
        return;
    }

    try {
        const ffmpeg = new FFmpegWASM.FFmpeg();
        await ffmpeg.load({
            log: true,
            corePath: '~/ffmpeg-core/umd/ffmpeg-core.min.js'
        });
    }
    catch (e) {
        console.log(e);
    }
}
</script>

But i didnt find where fetchFile is defined.
Am I missing something?

I found out that fetchFile is in that package:

<script src="https://cdn.jsdelivr.net/npm/@ffmpeg/util@0.12.2/dist/umd/index.min.js"></script>

But now i'm receiving that error:

index.js:1 Uncaught ReferenceError: exports is not defined
at index.js:1:728
at index.js:1:2954
at index.js:1:197
at index.js:1:201

Image