From 373fdaf93e525d29b55b667aea7a823c6c5834f2 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Sun, 24 Sep 2023 13:06:33 +0800 Subject: [PATCH] fix mac and windows --- public/ffmpeg.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/ffmpeg.js b/public/ffmpeg.js index eca2fa1d..073b6065 100644 --- a/public/ffmpeg.js +++ b/public/ffmpeg.js @@ -26,7 +26,14 @@ function getFfPath(cmd) { const exeName = isWindows ? `${cmd}.exe` : cmd; if (customFfPath) return join(customFfPath, exeName); - if (isDev) return join('ffmpeg', `${platform}-${arch}/lib`, exeName); + + if (isDev) { + const components = ['ffmpeg']; + if (isWindows || isLinux) components.push('lib'); + components.push(exeName); + return join(...components); + } + return join(process.resourcesPath, exeName); }