From f0acf965149484546052dd69790b9df6c8e76084 Mon Sep 17 00:00:00 2001 From: b1rdmania <102524336+b1rdmania@users.noreply.github.com> Date: Mon, 29 Dec 2025 14:35:06 +0000 Subject: [PATCH] Fix audio on shared play page - add iOS audio unlock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shared links weren't playing audio on iOS because unlockAudio() wasn't being called 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/play.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/play.ts b/src/play.ts index eec1753..3b83816 100644 --- a/src/play.ts +++ b/src/play.ts @@ -1,6 +1,7 @@ import { MIDIService } from './services/MIDIService'; import { MIDIParser } from './midi/MIDIParser'; import { MotifEngine } from './core/MotifEngine'; +import { unlockAudio } from './utils/audioUnlock'; import type { NoteEvent } from './types'; function qs(id: string): HTMLElement { @@ -279,6 +280,9 @@ async function main(): Promise { } try { + // Unlock audio for iOS - must be called from user gesture + await unlockAudio(); + // First play generates the artifact (deterministically from MIDI structure). if (!isGenerated) { // Match main page "Generate & Play": procedural role-mapping → existing SynthesisEngine.