Skip to content

Commit 1a336b8

Browse files
committed
cross origin isolated tests to fix Atomics.wait RuntimeError
1 parent 9e6ac2a commit 1a336b8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"serve": "http-server -c-1 -s -p 3000 .",
1111
"test": "server-test test:browser:server 3000 test:all",
1212
"test:all": "npm-run-all test:browser:*:*",
13-
"test:browser": "mocha-headless-chrome -a enable-features=SharedArrayBuffer -a no-sandbox",
13+
"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",
1414
"test:browser:core:mt": "npm run test:browser -- -f http://localhost:3000/tests/ffmpeg-core-mt.test.html",
1515
"test:browser:core:st": "npm run test:browser -- -f http://localhost:3000/tests/ffmpeg-core-st.test.html",
1616
"test:browser:ffmpeg:mt": "npm run test:browser -- -f http://localhost:3000/tests/ffmpeg-mt.test.html",

tests/ffmpeg.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const createFFmpeg = async () => {
66
const ffmpeg = new FFmpeg();
77
await ffmpeg.load({
88
coreURL: CORE_URL,
9-
thread: FFMPEG_TYPE === "mt",
9+
thread: FFMPEG_TYPE === "mt" && crossOriginIsolated,
1010
});
1111
return ffmpeg;
1212
};

0 commit comments

Comments
 (0)