From 0ca1b392e35bcf64690156dc63bb0cbdc3c9bdba Mon Sep 17 00:00:00 2001 From: espadonne Date: Thu, 2 Apr 2026 11:31:07 -0400 Subject: [PATCH] convert relative URLs to absolute before passing to AudioProcessor worker --- components/audio/DAW/Multitrack/TakesImportModal.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/audio/DAW/Multitrack/TakesImportModal.js b/components/audio/DAW/Multitrack/TakesImportModal.js index ea260cd..0ac2459 100644 --- a/components/audio/DAW/Multitrack/TakesImportModal.js +++ b/components/audio/DAW/Multitrack/TakesImportModal.js @@ -49,6 +49,13 @@ export default function TakesImportModal({ show, onHide, takes = [] }) { try { let finalURL = selectedTake.audioURL; + // Web Workers can't resolve relative URLs (no page base URL context). + // Convert to absolute so both the AudioProcessor worker and main-thread + // fallback can fetch the resource. + if (finalURL.startsWith('/')) { + finalURL = `${window.location.origin}${finalURL}`; + } + // For blob URLs, we might need to ensure they're still valid if (selectedTake.audioURL.startsWith('blob:')) { console.log('🔄 TakesImportModal: Refreshing blob URL for take');