Fix worker coreURL for ESM (#657)
This commit is contained in:
parent
2c2e2e2ad9
commit
f3a4ab9128
@ -54,7 +54,7 @@ const load = async ({
|
|||||||
// when web worker type is `classic`.
|
// when web worker type is `classic`.
|
||||||
importScripts(_coreURL);
|
importScripts(_coreURL);
|
||||||
} catch {
|
} catch {
|
||||||
if (!_coreURL) _coreURL = CORE_URL.replace('/umd/', '/esm/');
|
if (!_coreURL || _coreURL === CORE_URL) _coreURL = CORE_URL.replace('/umd/', '/esm/');
|
||||||
// when web worker type is `module`.
|
// when web worker type is `module`.
|
||||||
(self as WorkerGlobalScope).createFFmpegCore = (
|
(self as WorkerGlobalScope).createFFmpegCore = (
|
||||||
(await import(
|
(await import(
|
||||||
|
Loading…
Reference in New Issue
Block a user