Fix audio on shared play page - add iOS audio unlock

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 <noreply@anthropic.com>
This commit is contained in:
b1rdmania
2025-12-29 14:35:06 +00:00
parent eb3f61b63a
commit f0acf96514
+4
View File
@@ -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<void> {
}
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.