cj
cj
CDCloudflare Developers
Created by cj on 10/7/2024 in #workers-help
I'm trying to build ffmpeg.wasm for CF worker. Need help
(Making ffmepg work on a cf worker)
10 replies
CDCloudflare Developers
Created by cj on 10/7/2024 in #workers-help
I'm trying to build ffmpeg.wasm for CF worker. Need help
Hey @Wallacy Where you able to give it a try?
10 replies
CDCloudflare Developers
Created by cj on 10/7/2024 in #workers-help
I'm trying to build ffmpeg.wasm for CF worker. Need help
Awesome! Thank you very much
10 replies
CDCloudflare Developers
Created by cj on 10/7/2024 in #workers-help
I'm trying to build ffmpeg.wasm for CF worker. Need help
It did set the ENVIRONMENT to WORKER
var ENVIRONMENT_IS_WEB = false;
var ENVIRONMENT_IS_WORKER = true;
var ENVIRONMENT_IS_NODE = false;
var ENVIRONMENT_IS_SHELL = false;
var ENVIRONMENT_IS_WEB = false;
var ENVIRONMENT_IS_WORKER = true;
var ENVIRONMENT_IS_NODE = false;
var ENVIRONMENT_IS_SHELL = false;
But it fails here because self.location is undefined
if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled
scriptDirectory = self.location.href;
}
if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled
scriptDirectory = self.location.href;
}
This is the error I see in my console
Failed to load FFmpeg: TypeError: Cannot read properties of undefined (reading 'href')
Does anyone know how to build ffmpeg for CF Worker? Or building a project using emscripten for CF Worker?
10 replies