cross origin isolated tests to fix Atomics.wait RuntimeError

This commit is contained in:
Lucas Gelfond 2024-12-23 16:27:08 -08:00
parent 9e6ac2a0f1
commit 1a336b84c3
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@
"serve": "http-server -c-1 -s -p 3000 .",
"test": "server-test test:browser:server 3000 test:all",
"test:all": "npm-run-all test:browser:*:*",
"test:browser": "mocha-headless-chrome -a enable-features=SharedArrayBuffer -a no-sandbox",
"test:browser": "mocha-headless-chrome --args=\"--enable-features=SharedArrayBuffer --enable-experimental-web-platform-features --cross-origin-isolated --allow-file-access-from-files\" -a no-sandbox -f http://localhost:3000/tests/ffmpeg-core-mt.test.html",
"test:browser:core:mt": "npm run test:browser -- -f http://localhost:3000/tests/ffmpeg-core-mt.test.html",
"test:browser:core:st": "npm run test:browser -- -f http://localhost:3000/tests/ffmpeg-core-st.test.html",
"test:browser:ffmpeg:mt": "npm run test:browser -- -f http://localhost:3000/tests/ffmpeg-mt.test.html",

View File

@ -6,7 +6,7 @@ const createFFmpeg = async () => {
const ffmpeg = new FFmpeg();
await ffmpeg.load({
coreURL: CORE_URL,
thread: FFMPEG_TYPE === "mt",
thread: FFMPEG_TYPE === "mt" && crossOriginIsolated,
});
return ffmpeg;
};