Closed grkblood13 closed 2 years ago
Can you provide a step by step guide on how to set this up? First, I want to root of my html server and ran:
$ npm install --prefix . ffmpeg-webworker
This got me node_modules with you package.
I then tried loading the module in a simple html file via:
With the contents being of this js file being:
import { FFMPEGWebworkerClient } from "/node_modules/ffmpeg-webworker/dist/es/index.js";
const webworkerClient = new FFMPEGWebworkerClient();
// The above is same as // import webworkerClient from "ffmpeg-webworker";
webworkerClient.on("ready", () => { console.log("FFMPEG has been loaded, and can receive commands"); });
First error I got was:
GET http://127.0.0.1:8080/node_modules/ffmpeg-webworker/dist/es/FFMPEGWebWorkerClient net::ERR_ABORTED 404 (Not Found) index.js:2 GET http://127.0.0.1:8080/node_modules/ffmpeg-webworker/dist/es/FFMPEGWebWorker net::ERR_ABORTED 404 (Not Found)
So I edited /node_modules/ffmpeg-webworker/src/index.js from:
import WebworkerClient from "./FFMPEGWebWorkerClient"; import Webworker from "./FFMPEGWebWorker";
to:
import WebworkerClient from "./FFMPEGWebWorkerClient.js"; import Webworker from "./FFMPEGWebWorker.js";
Now I'm getting this error:
Uncaught TypeError: Failed to resolve module specifier "webworker-file". Relative references must start with either "/", "./", or "../".
At this point I'm out of ideas.
Can you provide a step by step guide on how to set this up? First, I want to root of my html server and ran:
$ npm install --prefix . ffmpeg-webworker
This got me node_modules with you package.
I then tried loading the module in a simple html file via:
With the contents being of this js file being:
import { FFMPEGWebworkerClient } from "/node_modules/ffmpeg-webworker/dist/es/index.js";
const webworkerClient = new FFMPEGWebworkerClient();
// The above is same as // import webworkerClient from "ffmpeg-webworker";
webworkerClient.on("ready", () => { console.log("FFMPEG has been loaded, and can receive commands"); });
First error I got was:
GET http://127.0.0.1:8080/node_modules/ffmpeg-webworker/dist/es/FFMPEGWebWorkerClient net::ERR_ABORTED 404 (Not Found) index.js:2 GET http://127.0.0.1:8080/node_modules/ffmpeg-webworker/dist/es/FFMPEGWebWorker net::ERR_ABORTED 404 (Not Found)
So I edited /node_modules/ffmpeg-webworker/src/index.js from:
import WebworkerClient from "./FFMPEGWebWorkerClient"; import Webworker from "./FFMPEGWebWorker";
to:
import WebworkerClient from "./FFMPEGWebWorkerClient.js"; import Webworker from "./FFMPEGWebWorker.js";
Now I'm getting this error:
Uncaught TypeError: Failed to resolve module specifier "webworker-file". Relative references must start with either "/", "./", or "../".
At this point I'm out of ideas.