Skip to content

Commit 13d84f1

Browse files
committed
Refactor to import createFFmpegCore using importScripts in worker context
1 parent ff9c27e commit 13d84f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/browser/getCreateFFmpegCore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScop
3939
);
4040
if (typeof createFFmpegCore === 'undefined') {
4141
return new Promise((resolve) => {
42+
globalThis.importScripts(corePath);
4243
if (typeof createFFmpegCore === 'undefined') {
4344
throw Error(CREATE_FFMPEG_CORE_IS_NOT_DEFINED(coreRemotePath));
4445
}
45-
importScripts(corePath);
4646
log('info', 'ffmpeg-core.js script loaded');
4747
resolve({
4848
createFFmpegCore,

0 commit comments

Comments
 (0)