fix: use esm.sh CDN to resolve spessasynth_core bare import
- jdelivr raw index.js has bare import 'spessasynth_core' which browser can't resolve - esm.sh automatically rewrites bare imports to full URLs - Keep jdelivr for worklet processor (self-contained, no imports) - WorkerSynthesizer fallback also uses esm.sh
This commit is contained in:
@@ -68,7 +68,8 @@
|
||||
} catch (e) {
|
||||
console.warn("[SonicSF] SpessaSynth AudioWorklet init failed:", e, "- trying WorkerSynthesizer...");
|
||||
try {
|
||||
const { WorkerSynthesizer } = await import(window.__SpessaSynthCDN + "index.js");
|
||||
const mod = await import("https://esm.sh/spessasynth_lib@4.3.1");
|
||||
const WorkerSynthesizer = mod.WorkerSynthesizer;
|
||||
_synthInstance = new WorkerSynthesizer(audioContext);
|
||||
await _synthInstance.isReady;
|
||||
_initialized = true;
|
||||
|
||||
Reference in New Issue
Block a user