Zwischenraum: eigene Vorsilbe bz- statt zr- – die Ziele-Vorschau war verschoben

Der Backstage-Zwischenraum (b44ae093) nutzte die Vorsilbe zr- – dieselbe
wie das Ziele-Formular der Regie (#zr-vorschau, zr-titel). Seine Regeln
(u. a. .zr-vorschau mit Spiegelung) verschoben die Ziele-Vorschau um 15 px;
gefunden von mess-serverziele, am Stand vor meinen Runden gegengemessen.

- 256 Stellen in zwischenraum.js/.css und ihren Prüfungen auf bz- umbenannt;
  das Ziele-Formular selbst unverändert.
- Neue Wache in pruef-reaktion (Abschnitt 35): keine Element-Kennung darf
  aus zwei Dateien der Saal-Seite kommen – abgeleitet aus reaktion.html und
  seinen 46 Skripten; die echte Kollision von heute wird erkannt.
- pruef-reaktion 1104/0, mess-serverziele, zwischenraum-blick, mess-reaktion grün.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-04 21:05:25 +01:00
co-authored by Claude Opus 5.5
parent e74b3aa7b1
commit 20c0a30490
58 changed files with 1068 additions and 1035 deletions
+90 -90
View File
@@ -132,51 +132,51 @@
function tonSpur() { return strom()?.getAudioTracks?.().find((t) => t.readyState === 'live') || null; }
function feldBauen() {
let f = $('zr-gast');
let f = $('bz-gast');
if (f) return f;
const kopf = document.querySelector('#schiene .schiene__kopf');
if (!kopf) return null;
f = el('section', 'zr');
f.id = 'zr-gast';
f = el('section', 'bz');
f.id = 'bz-gast';
f.hidden = true;
f.setAttribute('aria-labelledby', 'zr-titel');
const titel = el('h3', 'zr-titel', 'Du bist im Backstage');
titel.id = 'zr-titel';
const satzP = el('p', 'zr-satz', 'Das Publikum sieht und hört dich noch nicht. Die Regie sieht deine Prüfwerte und holt dich auf die Bühne.');
const oben = el('div', 'zr-oben');
const vorschau = el('video', 'zr-vorschau');
vorschau.id = 'zr-vorschau';
f.setAttribute('aria-labelledby', 'bz-titel');
const titel = el('h3', 'bz-titel', 'Du bist im Backstage');
titel.id = 'bz-titel';
const satzP = el('p', 'bz-satz', 'Das Publikum sieht und hört dich noch nicht. Die Regie sieht deine Prüfwerte und holt dich auf die Bühne.');
const oben = el('div', 'bz-oben');
const vorschau = el('video', 'bz-vorschau');
vorschau.id = 'bz-vorschau';
vorschau.muted = true; vorschau.playsInline = true; vorschau.autoplay = true;
vorschau.setAttribute('aria-label', 'Deine Vorschau – so sähe dich das Publikum');
const ohne = el('p', 'zr-ohne', 'Keine Kamera – das Publikum hört dich nur.');
ohne.id = 'zr-ohne';
const ohne = el('p', 'bz-ohne', 'Keine Kamera – das Publikum hört dich nur.');
ohne.id = 'bz-ohne';
ohne.hidden = true;
const rahmen = el('div', 'zr-rahmen');
const rahmen = el('div', 'bz-rahmen');
/* Der Rahmen ist eine Hilfe zum Ausrichten, keine Behauptung: Ob das
Gesicht darin ist, sagt nur die Erkennung – und nur, wenn es sie gibt. */
const oval = el('i', 'zr-oval');
const oval = el('i', 'bz-oval');
oval.setAttribute('aria-hidden', 'true');
const hinweis = el('p', 'zr-bildhinweis');
hinweis.id = 'zr-bildhinweis';
const hinweis = el('p', 'bz-bildhinweis');
hinweis.id = 'bz-bildhinweis';
hinweis.hidden = true;
rahmen.append(vorschau, oval, hinweis, ohne);
const liste = el('ul', 'zr-schritte');
liste.id = 'zr-schritte';
const liste = el('ul', 'bz-schritte');
liste.id = 'bz-schritte';
liste.setAttribute('aria-label', 'Prüfung');
for (const [k, name] of SCHRITTE) {
const li = el('li', 'zr-schritt');
const li = el('li', 'bz-schritt');
li.dataset.schritt = k;
li.dataset.stufe = 'offen';
const punkt = el('i', 'zr-punkt'); punkt.setAttribute('aria-hidden', 'true');
const text = el('span', 'zr-schritt__text', `${name} …`);
const punkt = el('i', 'bz-punkt'); punkt.setAttribute('aria-hidden', 'true');
const text = el('span', 'bz-schritt__text', `${name} …`);
li.append(punkt, text);
liste.append(li);
}
oben.append(rahmen, liste);
const knoepfe = el('div', 'zr-knoepfe');
const bereit = el('button', 'bs-knopf bs-knopf--bereit zr-bereit', 'Ich bin bereit');
bereit.type = 'button'; bereit.id = 'zr-bereit';
const knoepfe = el('div', 'bz-knoepfe');
const bereit = el('button', 'bs-knopf bs-knopf--bereit bz-bereit', 'Ich bin bereit');
bereit.type = 'button'; bereit.id = 'bz-bereit';
bereit.setAttribute('aria-pressed', 'false');
bereit.addEventListener('click', async () => {
const soll = bereit.getAttribute('aria-pressed') !== 'true';
@@ -187,31 +187,31 @@
else sagen(satz(r.j?.fehler, 'Das ging gerade nicht.'));
} catch { sagen('Das ging gerade nicht.'); } finally { bereit.disabled = false; gastZeichnen(); }
});
const neu = el('button', 'bs-knopf zr-neu', 'Leitung neu messen');
neu.type = 'button'; neu.id = 'zr-leitung';
const neu = el('button', 'bs-knopf bz-neu', 'Leitung neu messen');
neu.type = 'button'; neu.id = 'bz-leitung';
neu.addEventListener('click', () => leitungMessen(true));
knoepfe.append(bereit, neu);
const wie = el('p', 'zr-wie');
wie.id = 'zr-wie';
const wie = el('p', 'bz-wie');
wie.id = 'bz-wie';
wie.setAttribute('role', 'status');
wie.setAttribute('aria-live', 'polite');
const draht = el('div', 'zr-draht');
const dTitel = el('p', 'zr-draht__titel', 'Kurzer Draht zur Regie');
const dListe = el('ol', 'zr-draht__liste');
dListe.id = 'zr-draht';
const draht = el('div', 'bz-draht');
const dTitel = el('p', 'bz-draht__titel', 'Kurzer Draht zur Regie');
const dListe = el('ol', 'bz-draht__liste');
dListe.id = 'bz-draht';
dListe.setAttribute('role', 'log');
dListe.setAttribute('aria-live', 'polite');
dListe.setAttribute('aria-label', 'Nachrichten mit der Regie');
const form = el('form', 'zr-draht__form');
form.id = 'zr-draht-form';
const eingabe = el('input', 'zr-draht__feld');
eingabe.id = 'zr-draht-text';
const form = el('form', 'bz-draht__form');
form.id = 'bz-draht-form';
const eingabe = el('input', 'bz-draht__feld');
eingabe.id = 'bz-draht-text';
eingabe.type = 'text'; eingabe.maxLength = 200; eingabe.autocomplete = 'off';
eingabe.placeholder = 'Nur die Regie liest das';
eingabe.setAttribute('aria-label', 'Nachricht an die Regie');
const schick = el('button', 'bs-knopf zr-draht__senden', 'Senden');
const schick = el('button', 'bs-knopf bz-draht__senden', 'Senden');
schick.type = 'submit';
form.append(eingabe, schick);
form.addEventListener('submit', async (e) => {
@@ -227,8 +227,8 @@
});
draht.append(dTitel, dListe, form);
const sagt = el('p', 'zr-sagt');
sagt.id = 'zr-sagt';
const sagt = el('p', 'bz-sagt');
sagt.id = 'bz-sagt';
sagt.setAttribute('role', 'status');
f.append(titel, satzP, oben, knoepfe, wie, draht, sagt);
/* Manche Browser (Safari am iPhone) starten die Tonmessung erst nach
@@ -239,7 +239,7 @@
}
function sagen(text) {
const s = $('zr-sagt');
const s = $('bz-sagt');
if (!s) return;
s.textContent = text;
clearTimeout(sagen.uhr);
@@ -265,7 +265,7 @@
liste.textContent = '';
liste.hidden = !l.length;
for (const d of l) {
const li = el('li', 'zr-draht__zeile');
const li = el('li', 'bz-draht__zeile');
li.dataset.von = d.von;
li.append(el('strong', '', d.von === ich ? 'Du' : (andere || 'Regie')), document.createTextNode(` ${d.text}`));
liste.append(li);
@@ -338,7 +338,7 @@
return { licht: Math.round(s / n), mitte: Math.round(sm / nm), rand: Math.round((s - sm) / (n - nm)) };
}
function lichtMessen() {
const v = $('zr-vorschau');
const v = $('bz-vorschau');
const spur = bildSpur();
if (!v || !spur || !spur.enabled || v.videoWidth === 0 || v.readyState < 2) { mess.licht = mess.mitte = mess.rand = null; return; }
try {
@@ -392,7 +392,7 @@
async function leitungMessen(vonHand) {
if (mess.misst) return;
mess.misst = true;
const knopf = $('zr-leitung');
const knopf = $('bz-leitung');
if (knopf) knopf.disabled = true;
mess.leitung = null;
mess.leitungGrund = 'Leitung wird gemessen …';
@@ -461,13 +461,13 @@
}
function gastZeichnen() {
const f = $('zr-gast');
const f = $('bz-gast');
if (!f || f.hidden) return;
const v = $('zr-vorschau');
const v = $('bz-vorschau');
const s = strom();
if (v && v.srcObject !== s) { v.srcObject = s; if (s) v.play().catch(() => { /* stumm darf immer */ }); }
const w = jetzigeWerte();
$('zr-ohne').hidden = w.kamera;
$('bz-ohne').hidden = w.kamera;
v.hidden = !w.kamera;
const b = bewerten(w);
/* Schläft die Tonmessung (keine Berührung erlaubt sie noch), sagt das
@@ -476,24 +476,24 @@
b.ton = ['offen', 'Tippe kurz in dieses Feld – dann misst die Seite deinen Ton'];
}
const hin = bildHinweis(w);
const hp = $('zr-bildhinweis');
const hp = $('bz-bildhinweis');
hp.hidden = !hin;
hp.textContent = hin || '';
for (const li of f.querySelectorAll('.zr-schritt')) {
for (const li of f.querySelectorAll('.bz-schritt')) {
const [stufe, text] = b[li.dataset.schritt];
li.dataset.stufe = stufe;
li.querySelector('.zr-schritt__text').textContent = text;
li.querySelector('.bz-schritt__text').textContent = text;
}
const knopf = $('zr-bereit');
const knopf = $('bz-bereit');
knopf.setAttribute('aria-pressed', String(!!stand?.bereit));
knopf.textContent = stand?.bereit ? 'Bereit ✓' : 'Ich bin bereit';
knopf.setAttribute('aria-label', stand?.bereit ? 'Bereit gemeldet – tippen nimmt es zurück' : 'Ich bin bereit');
const schwach = Object.values(b).some(([st]) => st === 'schwach');
$('zr-wie').textContent = stand?.bereit
$('bz-wie').textContent = stand?.bereit
? 'Die Regie weiß, dass du bereit bist. Sie holt dich auf die Bühne – du musst nichts weiter tun.'
: schwach ? 'Ein Punkt ist noch schwach – du kannst trotzdem „Ich bin bereit“ drücken.'
: 'Sieht gut aus? Dann drück „Ich bin bereit“.';
drahtZeichnen($('zr-draht'), stand?.draht, 'gast');
drahtZeichnen($('bz-draht'), stand?.draht, 'gast');
}
function gastAn() {
@@ -518,13 +518,13 @@
gastZeichnen();
}
function gastAus(naechster) {
const f = $('zr-gast');
const f = $('bz-gast');
if (f) f.hidden = true;
$('schiene')?.removeAttribute('data-zwischenraum');
clearInterval(messUhr);
messUhr = null;
tonAb();
const v = $('zr-vorschau');
const v = $('bz-vorschau');
if (v) v.srcObject = null;
mess.leitung = null;
/* Aus dem Backstage herausgenommen (nicht auf die Bühne geholt): Die
@@ -534,19 +534,19 @@
/* ================================================= REGIE */
function regieFeld() {
let f = $('zr-regie');
let f = $('bz-regie');
if (f) return f;
const zeile = $('cockpit-backstage');
if (!zeile) return null;
f = el('div', 'zr-regie');
f.id = 'zr-regie';
f = el('div', 'bz-regie');
f.id = 'bz-regie';
f.hidden = true;
f.setAttribute('role', 'group');
f.setAttribute('aria-label', 'Wartet im Backstage');
const ul = el('ul', 'zr-warten');
ul.id = 'zr-warten';
const sagt = el('p', 'zr-sagt');
sagt.id = 'zr-regie-sagt';
const ul = el('ul', 'bz-warten');
ul.id = 'bz-warten';
const sagt = el('p', 'bz-sagt');
sagt.id = 'bz-regie-sagt';
sagt.setAttribute('role', 'status');
f.append(ul, sagt);
const vor = $('bs-haende') || $('cockpit-gaeste');
@@ -554,7 +554,7 @@
return f;
}
function regieSagen(text) {
const s = $('zr-regie-sagt');
const s = $('bz-regie-sagt');
if (!s) return;
s.textContent = text;
clearTimeout(regieSagen.uhr);
@@ -565,30 +565,30 @@
ein Antwortfeld, das bei jedem Stand neu gebaut würde, verlöre den
halb geschriebenen Satz und den Fokus. */
function warteKarte(g) {
const li = el('li', 'zr-warte');
const li = el('li', 'bz-warte');
li.dataset.id = String(g.id);
/* KOMPAKT (gemessen 04.11.2026): Ausgeklappt nahm die Karte im
seitlichen Pult 309 px, und der Regie-Inhalt darunter bekam 0 px.
Oben steht deshalb nur, was zum Holen nötig ist – eine Zeile mit Name,
„bereit ✓“, fünf Punkten und dem Knopf. Werte und Draht klappen auf. */
const kopf = el('div', 'zr-warte__kopf');
const punkte = el('span', 'zr-punkte');
const kopf = el('div', 'bz-warte__kopf');
const punkte = el('span', 'bz-punkte');
punkte.setAttribute('role', 'img');
for (const [k] of SCHRITTE) { const i = el('i', 'zr-punkt'); i.dataset.schritt = k; punkte.append(i); }
kopf.append(el('strong', 'zr-warte__name', g.name), el('span', 'zr-warte__bereit'), punkte);
const werte = el('ul', 'zr-werte');
for (const [k] of SCHRITTE) { const i = el('i', 'bz-punkt'); i.dataset.schritt = k; punkte.append(i); }
kopf.append(el('strong', 'bz-warte__name', g.name), el('span', 'bz-warte__bereit'), punkte);
const werte = el('ul', 'bz-werte');
for (const [k] of SCHRITTE) {
const w = el('li', 'zr-wert');
const w = el('li', 'bz-wert');
w.dataset.schritt = k;
const punkt = el('i', 'zr-punkt'); punkt.setAttribute('aria-hidden', 'true');
w.append(punkt, el('span', 'zr-wert__text'));
const punkt = el('i', 'bz-punkt'); punkt.setAttribute('aria-hidden', 'true');
w.append(punkt, el('span', 'bz-wert__text'));
werte.append(w);
}
const alt = el('p', 'zr-warte__alt');
const dListe = el('ol', 'zr-draht__liste');
const alt = el('p', 'bz-warte__alt');
const dListe = el('ol', 'bz-draht__liste');
dListe.setAttribute('aria-label', `Nachrichten mit ${g.name}`);
const form = el('form', 'zr-draht__form');
const eingabe = el('input', 'zr-draht__feld');
const form = el('form', 'bz-draht__form');
const eingabe = el('input', 'bz-draht__feld');
eingabe.type = 'text'; eingabe.maxLength = 200; eingabe.autocomplete = 'off';
eingabe.placeholder = `Kurz an ${g.name} …`;
eingabe.setAttribute('aria-label', `Nachricht an ${g.name}`);
@@ -606,7 +606,7 @@
else regieSagen(satz(r.j?.fehler, 'Das ging gerade nicht hinaus.'));
} catch { regieSagen('Das ging gerade nicht hinaus.'); } finally { schick.disabled = false; }
});
const holen = el('button', 'btn btn-klein btn-primaer zr-holen', 'Auf die Bühne');
const holen = el('button', 'btn btn-klein btn-primaer bz-holen', 'Auf die Bühne');
holen.type = 'button';
holen.setAttribute('aria-label', `${g.name} auf die Bühne holen`);
holen.addEventListener('click', async () => {
@@ -624,9 +624,9 @@
}
});
kopf.append(holen);
const zuletzt = el('p', 'zr-warte__zuletzt');
const mehr = el('details', 'zr-warte__mehr');
const sum = el('summary', 'zr-warte__auf', 'Werte & Draht');
const zuletzt = el('p', 'bz-warte__zuletzt');
const mehr = el('details', 'bz-warte__mehr');
const sum = el('summary', 'bz-warte__auf', 'Werte & Draht');
mehr.append(sum, werte, dListe, form);
li.append(kopf, alt, zuletzt, mehr);
return li;
@@ -635,34 +635,34 @@
const c = g.check || {};
const hat = !!g.check;
li.dataset.bereit = g.bereit ? 'ja' : 'nein';
const br = li.querySelector('.zr-warte__bereit');
const br = li.querySelector('.bz-warte__bereit');
br.textContent = g.bereit ? 'bereit ✓' : 'prüft noch';
const b = hat ? bewerten(c) : null;
const worte = [];
for (const i of li.querySelectorAll('.zr-punkte .zr-punkt')) {
for (const i of li.querySelectorAll('.bz-punkte .bz-punkt')) {
const [stufe, text] = b ? b[i.dataset.schritt] : ['offen', 'noch keine Werte'];
i.dataset.stufe = stufe;
worte.push(text.split(' – ')[0]);
}
li.querySelector('.zr-punkte').setAttribute('aria-label', hat ? worte.join(', ') : 'noch keine Werte');
li.querySelector('.zr-punkte').title = hat ? worte.join(' · ') : 'noch keine Werte';
for (const w of li.querySelectorAll('.zr-wert')) {
li.querySelector('.bz-punkte').setAttribute('aria-label', hat ? worte.join(', ') : 'noch keine Werte');
li.querySelector('.bz-punkte').title = hat ? worte.join(' · ') : 'noch keine Werte';
for (const w of li.querySelectorAll('.bz-wert')) {
const [stufe, text] = b ? b[w.dataset.schritt] : ['offen', 'noch keine Werte'];
w.dataset.stufe = stufe;
/* Im Cockpit nur das erste Stück des Satzes – die Regie braucht den
Befund, nicht die Anleitung. */
w.querySelector('.zr-wert__text').textContent = text.split(' – ')[0];
w.querySelector('.bz-wert__text').textContent = text.split(' – ')[0];
w.title = text;
}
const altP = li.querySelector('.zr-warte__alt');
const altP = li.querySelector('.bz-warte__alt');
const seit = c.zeit ? Math.round((Date.now() - Date.parse(c.zeit)) / 1000) : null;
altP.textContent = !hat ? 'Seine Seite hat noch nichts gemessen.'
: seit != null && seit > 45 ? `Werte von vor ${seit < 120 ? `${seit} s` : `${Math.round(seit / 60)} min`} – ist die Seite noch offen?` : '';
drahtZeichnen(li.querySelector('.zr-draht__liste'), g.draht, 'regie', g.name);
drahtZeichnen(li.querySelector('.bz-draht__liste'), g.draht, 'regie', g.name);
/* Der letzte Zuruf des Gastes steht auch zugeklappt da – sonst ginge er
in der eingeklappten Karte unter. */
const vomGast = (g.draht || []).filter((d) => d.von === 'gast').at(-1);
li.querySelector('.zr-warte__zuletzt').textContent = vomGast ? `„${vomGast.text}“` : '';
li.querySelector('.bz-warte__zuletzt').textContent = vomGast ? `„${vomGast.text}“` : '';
}
/* „Nachtfalter ist bereit.“ – einmal, wenn es WECHSELT. Wer schon bereit
war, als die Regie ihn zum ersten Mal sah, wird nicht angesagt: Ein Satz,
@@ -677,11 +677,11 @@
warBereit.clear();
for (const g of warten) warBereit.set(g.id, !!g.bereit);
f.hidden = !warten.length;
const ul = $('zr-warten');
const ul = $('bz-warten');
const da = new Set(warten.map((g) => String(g.id)));
for (const li of [...ul.children]) if (!da.has(li.dataset.id)) li.remove();
for (const g of warten) {
let li = ul.querySelector(`.zr-warte[data-id="${Number(g.id)}"]`);
let li = ul.querySelector(`.bz-warte[data-id="${Number(g.id)}"]`);
if (!li) { li = warteKarte(g); ul.append(li); }
warteFuellen(li, g);
}