From dd880c358df5cc233c87a476dab8bc86b4f54ae4 Mon Sep 17 00:00:00 2001 From: b1rdmania <102524336+b1rdmania@users.noreply.github.com> Date: Thu, 1 Jan 2026 12:25:07 +0000 Subject: [PATCH] Use lamejs CDN instead of npm package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ESM compatibility issues with lamejs npm package - load from CDN instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- ux-test.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ux-test.html b/ux-test.html index bdc338d..ced9fd4 100644 --- a/ux-test.html +++ b/ux-test.html @@ -469,6 +469,7 @@ } } +
@@ -538,7 +539,7 @@ import { SoundfontMIDIPlayer } from './src/synthesis/SoundfontMIDIPlayer.ts'; import { MotifEngine } from './src/core/MotifEngine.ts'; import { unlockAudio } from './src/utils/audioUnlock.ts'; - import lamejs from 'lamejs'; + // lamejs loaded via CDN script tag (ESM compatibility issues with npm version) const NUM_BARS = 40; const midiService = new MIDIService(); @@ -799,9 +800,9 @@ shareHint.textContent = 'Encoding MP3…'; - // Use statically imported lamejs - const Mp3Encoder = lamejs.Mp3Encoder; - if (!Mp3Encoder) throw new Error('MP3 encoder not available'); + // Use lamejs from CDN (global) + const Mp3Encoder = window.lamejs?.Mp3Encoder; + if (!Mp3Encoder) throw new Error('MP3 encoder not available - lamejs not loaded'); const channels = audioBuffer.numberOfChannels; const kbps = 128;