fix build arm64 in x64 runner

This commit is contained in:
an-lee
2024-03-01 15:23:25 +08:00
parent 4adc8d2178
commit 5c3a750442
2 changed files with 6 additions and 3 deletions

View File

@@ -39,6 +39,10 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
env:
# It will build arm64 version in x64 runner
# This env help ffmpeg/ffprobe-static to install the right binary
npm_config_arch: ${{ github.event.inputs.arch }}
run: yarn install
- name: Install Apple certificate

View File

@@ -82,9 +82,7 @@ export const AppSettingsProvider = ({
const valid = await EnjoyApp.ffmpeg.check();
setFfmpegValid(valid);
if (!valid) {
loadFfmpegWASM();
}
loadFfmpegWASM();
};
const loadFfmpegWASM = async () => {
@@ -113,6 +111,7 @@ export const AppSettingsProvider = ({
workerURL,
});
setFfmpegWasm(ffmpegRef.current);
(window as any).ffmpeg = ffmpegRef.current;
} catch (err) {
toast.error(err.message);
}