Runde 6: Reaction-Clips ohne YouTube-Bild (Video und Stelle an den Dienst), Vorschaubilder in Clips zuschneiden, die vier stärksten Momente als Clip-Vorschlag im Nachbericht

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-05 15:11:03 +01:00
co-authored by Claude Opus 5.5
parent d44be212df
commit 8d93cc24ec
61 changed files with 884 additions and 844 deletions
+15
View File
@@ -328,6 +328,21 @@ const hm = await seite.evaluate(() => ({ breit: document.documentElement.scrollW
ok(hm.breit, `Handy: nichts ragt hinaus (${JSON.stringify(hm)})`);
if (BILDER) await seite.screenshot({ path: `${BILDER}/nachschauen-390.png`, fullPage: false });
/* Die stärksten Momente als Clip-Vorschlag (Runde 6): nur die Regie sieht die
Minuten, also nur dort; der Zuschauer bekommt keinen (Gegenprobe). */
const gastClip = await seite.evaluate(() => document.querySelectorAll('#nb-liste [data-clip="ja"]').length);
const kr = await browser.newContext({ viewport: { width: 1280, height: 900 }, ignoreHTTPSErrors: true });
await kr.addCookies(k.admin.split("; ").filter(Boolean).map((z) => { const [n2, ...r] = z.split("="); return { name: n2, value: r.join("="), domain: CREW, path: "/" }; }));
const rs = await kr.newPage();
await rs.addInitScript(FAKE_YT);
await rs.goto(`${BASIS}/workspace/nachbericht.html?id=${v1.id}`, { waitUntil: "domcontentloaded" });
await rs.waitForFunction(() => window.__nb?.da, null, { timeout: 15000 }).catch(() => {});
await rs.evaluate((id) => { const w = document.getElementById("nb-wahl"); if (w && w.value !== String(id)) { w.value = String(id); w.dispatchEvent(new Event("change", { bubbles: true })); } }, v1.id);
await rs.waitForTimeout(1200);
const regieClip = await rs.evaluate(() => [...document.querySelectorAll('#nb-liste [data-clip="ja"]')].map((x) => x.textContent));
ok(regieClip.length === 1 && /Clip-Vorschlag/.test(regieClip[0]) && gastClip === 0, `der stärkste Moment ist als Clip-Vorschlag markiert – bei der Regie, nicht beim Zuschauer (${regieClip.length} / ${gastClip})`);
await kr.close();
/* ---------- Teil 3: im Saal: Schalter + Hinweis ----------------------- */
await roh("/workspace/api/reaktion", { method: "PUT", keks: k.admin, rumpf: { titel: "Dritter Abend", video: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" } });
for (const st of ["vorbereitung", "live"]) await roh("/workspace/api/reaktion/stand", { method: "POST", keks: k.admin, rumpf: { stand: st } });