S1: fix sunet campanie — deblochează AudioContext la gestul părintelui

Camerele cheamă parent.beep() din iframe; gestul din iframe NU deblochează
AudioContext-ul orchestratorului (părinte), care rămânea suspended → tăcere.
Fix: creează+resume beep._ctx în handler-ul btn-start (gest direct pe părinte),
escape-builder.html:1928. Verificat: ctx 'running' după start (era NO_CTX).
Suita smoke 21/21 fără regresie. Board: TODOS.md ▶ BOARD ACTIV S1 [x].

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-06-13 09:33:31 +00:00
parent b935a21b41
commit 52f97af533
2 changed files with 13 additions and 6 deletions

View File

@@ -1925,7 +1925,12 @@ function hideAll(){
document.getElementById('intro-title').textContent = MASTER.title;
document.getElementById('intro-story').textContent = (MASTER.player?'Salut, '+MASTER.player+'! ':'')+MASTER.story;
document.getElementById('intro-promise').textContent = N+' camere \\u00b7 ${nStyles} stiluri \\u00b7 1 cuvânt magic';
document.getElementById('btn-start').onclick = function(){ clearProgress(); mountRoom(0); };
document.getElementById('btn-start').onclick = function(){
/* Deblochează AudioContext-ul AICI (gest direct pe părinte) — camerele cheamă
parent.beep() din iframe, iar gestul din iframe NU deblochează ctx-ul părintelui. */
try{ var c=beep._ctx||(beep._ctx=new(window.AudioContext||window.webkitAudioContext)()); if(c.state==='suspended') c.resume(); }catch(e){}
clearProgress(); mountRoom(0);
};
buildDots();