Files
pokerfreak/sicht/sendung/einblendung.html
T
mmintel 1bc282e585 Twitch-Lehr-Sendung aufs main: fertige, baubare Schicht (Python + Swift), ohne Engine-niveau-WIP
Die Sendung aus dem Cockpit (Plan 2026-11-06 twitch-sendung): Buehnenbild, Namensschilder, OBS-Szenen
als Plan, Chat (Gruss, Moderation nach Entscheid, Pokerfragen), Twitch-Anmeldung, Cockpit-Bereich.
- Python: sendung/ (twitch, obs, moderator, chat, einblendung, fragen, gruss, schilder, wsklient),
  betrieb/ (lehrer, sprecher, sprachmodell, anbieter, rueckblick, umschreiber), sicht/ (sendung_knoepfe,
  anbieter_knoepfe, aufsicht, sendung_seiten, server, ws). Alle 17 Sendung-Specs + die zwei Knopf-Specs gruen.
- Swift: Cockpit-Modelle Anbieter/Sendung, Editoren, SendungSpec. Mac baut, 152 Pruefung-Tests gruen.
- Ohne die Engine-niveau-Arbeit (src/*.rs, benchmarks) - die bleibt auf ablage.

Offen (Owner): OBS installieren, Twitch-Geraetecode-Anmeldung, Feinmessung der Namensstellen am Streambild.
Bekannt (vorbestehend, nicht aus dieser Arbeit): tests/cfr_multi.rs Frozen-Chart-Test rot seit dem
Abnahme-Stand - die eingefrorene src/preflop/generated_charts_multi.rs weicht vom Generator ab.
2026-11-06 15:32:18 +01:00

108 lines
4.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>Sendung – Einblendung</title>
<!-- Einblendung der Sendung (plans/2026-11-06_00-20_twitch-sendung): durchsichtig ueber den Tischfenstern.
Holt alle halbe Sekunde /api/sendung (sicht/sendung_seiten.py) - Rahmen je Tisch, Namensschilder ueber
den echten Namen, Hinweis "Programm · Spielgeld", Untertitel des Lehrers. Kein echter Name kommt hier an;
Texte nur als Text, nie als Markup. -->
<style>
:root { --tinte: #eef6f4; --tuerkis: #2fc6ad; --nacht: rgba(5, 15, 17, 0.78); }
html, body { margin: 0; width: 1920px; height: 1080px; overflow: hidden; background: transparent; }
body { font-family: -apple-system, "SF Pro Display", "Helvetica Neue", sans-serif; color: var(--tinte); }
.hinweis {
position: absolute; right: 32px; top: 18px; height: 40px; padding: 0 18px; display: flex; align-items: center; gap: 10px;
border-radius: 20px; background: var(--nacht); border: 1px solid rgba(47, 198, 173, 0.35);
font-weight: 600; font-size: 19px; letter-spacing: 0.01em;
}
.hinweis::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--tuerkis); box-shadow: 0 0 12px var(--tuerkis); }
.rahmen {
position: absolute; border-radius: 12px; pointer-events: none;
box-shadow: 0 0 0 2px rgba(120, 220, 200, 0.22), 0 0 0 7px rgba(4, 12, 14, 0.55), 0 22px 70px rgba(0, 0, 0, 0.6);
}
.schild {
position: absolute; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
border-radius: 999px; white-space: nowrap; font-weight: 650; letter-spacing: 0.02em;
background: linear-gradient(180deg, #17292c, #0c1719); border: 1px solid rgba(255, 255, 255, 0.10);
box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);
}
.schild.lehrer { background: linear-gradient(180deg, #1d9683, #126a5d); border-color: rgba(160, 255, 235, 0.35); }
.abdeckung {
position: absolute; box-sizing: border-box; display: grid; place-items: center; border-radius: 12px;
background: radial-gradient(ellipse at 50% 45%, #10403b, #061214 75%); font-weight: 600; font-size: 28px; color: #bfe0d9;
}
.untertitel {
position: absolute; left: 140px; right: 140px; bottom: 36px; text-align: center;
font-weight: 600; font-size: 34px; line-height: 1.38; transition: opacity 0.45s ease;
}
.untertitel span {
background: var(--nacht); padding: 6px 20px; border-radius: 14px;
-webkit-box-decoration-break: clone; box-decoration-break: clone; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
.still { opacity: 0; }
</style>
</head>
<body>
<div class="hinweis" id="hinweis"></div>
<div id="tische"></div>
<div class="untertitel still" id="untertitel"><span></span></div>
<script>
const TAKT_MS = 500;
const tischeEl = document.getElementById("tische");
const hinweisEl = document.getElementById("hinweis");
const untertitelEl = document.getElementById("untertitel");
let zuletzt = "";
function kasten(klasse, x, y, breite, hoehe) {
const el = document.createElement("div");
el.className = klasse;
Object.assign(el.style, { left: `${x}px`, top: `${y}px`, width: `${breite}px`, height: `${hoehe}px` });
return el;
}
function schild(s) {
if (s.art === "abdeckung") {
const el = kasten("abdeckung", s.x, s.y, s.breite, s.hoehe);
el.textContent = "Dieser Tisch wird gerade eingerichtet";
return el;
}
const el = kasten(s.text === "Lehrer" ? "schild lehrer" : "schild", s.x, s.y, s.breite, s.hoehe);
el.style.fontSize = `${Math.max(12, s.hoehe * 0.56)}px`;
el.textContent = s.text;
return el;
}
function zeichnen(d) {
hinweisEl.textContent = d.hinweis || "";
const stand = JSON.stringify(d.tische || []);
if (stand !== zuletzt) {
zuletzt = stand;
const neu = document.createDocumentFragment();
for (const t of d.tische || []) {
const [x, y, breite, hoehe] = t.platz;
neu.appendChild(kasten("rahmen", x, y, breite, hoehe));
for (const s of t.schilder || []) neu.appendChild(schild(s));
}
tischeEl.replaceChildren(neu);
}
const text = d.untertitel || "";
untertitelEl.firstElementChild.textContent = text;
untertitelEl.classList.toggle("still", !text);
}
async function holen() {
try {
const antwort = await fetch("/api/sendung", { cache: "no-store" });
if (antwort.ok) zeichnen(await antwort.json());
} catch (_) {
// Server gerade weg: das letzte Bild bleibt stehen
} finally {
setTimeout(holen, TAKT_MS);
}
}
holen();
</script>
</body>
</html>