diff --git a/src/createFFmpeg.js b/src/createFFmpeg.js index c5425ce..61753ff 100644 --- a/src/createFFmpeg.js +++ b/src/createFFmpeg.js @@ -75,17 +75,14 @@ module.exports = (_options = {}) => { * as we are using blob URL instead of original URL to avoid cross origin issues. */ locateFile: (path, prefix) => { - if (typeof window !== 'undefined') { - if (typeof wasmPath !== 'undefined' - && path.endsWith('ffmpeg-core.wasm')) { - return wasmPath; - } - if (typeof workerPath !== 'undefined' - && path.endsWith('ffmpeg-core.worker.js')) { - return workerPath; - } + if (typeof wasmPath !== 'undefined' + && path.endsWith('ffmpeg-core.wasm')) { + return wasmPath; + } + if (typeof workerPath !== 'undefined' + && path.endsWith('ffmpeg-core.worker.js')) { + return workerPath; } - return prefix + path; }, }); ffmpeg = Core.cwrap('proxy_main', 'number', ['number', 'number']);