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:
@@ -213,7 +213,7 @@ await seite.evaluate(() => {
|
||||
window.Untertitel.schicke = (o) => {
|
||||
if (window.__getrennt) return false;
|
||||
window.__gesendet.push(o);
|
||||
if (o.art === "clips") antwort({ art: "clips", ordner: "C:\\Users\\qciga\\Videos\\TikTok-Clips", liste: [{ datei: "20261105-2101-BLUE-MOON-Streife.mp4", groesse: 18400000 }, { datei: "20261105-2044-BLUE-MOON-Verfolgung.mp4", groesse: 21000000 }] });
|
||||
if (o.art === "clips") antwort({ art: "clips", ordner: "C:\\Users\\qciga\\Videos\\TikTok-Clips", liste: [{ datei: "20261105-2101-BLUE-MOON-Streife.mp4", groesse: 18400000, bild: "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAP" }, { datei: "20261105-2044-BLUE-MOON-Verfolgung.mp4", groesse: 21000000 }] });
|
||||
if (o.art === "welle") antwort({ art: "welle", datei: o.datei, ok: true, dauer: 30, werte: Array.from({ length: 120 }, (_, i) => Math.abs(Math.sin(i / 7)) * (i > 40 && i < 70 ? 0.9 : 0.2)) });
|
||||
if (o.art === "schneiden") antwort({ art: "geschnitten", ok: true, datei: `${o.datei.replace(".mp4", "")}-geschnitten-${Math.floor(o.von)}-${Math.floor(o.bis)}.mp4` });
|
||||
return true;
|
||||
@@ -222,6 +222,8 @@ await seite.evaluate(() => {
|
||||
await seite.evaluate(() => window.ClipSchnitt.oeffnen());
|
||||
await warte(400);
|
||||
const l1 = await seite.evaluate(() => ({ offen: !document.getElementById("cs-tafel").hidden, n: document.querySelectorAll("#cs-liste .cs-wahl").length, lage: document.getElementById("cs-lage").textContent }));
|
||||
const bilder = await seite.evaluate(() => document.querySelectorAll("#cs-liste .cs-bild").length);
|
||||
ok(bilder === 1, `ein Clip mit Vorschaubild zeigt es, einer ohne nicht (${bilder})`);
|
||||
ok(l1.offen && l1.n === 2 && /2 Clips/.test(l1.lage), `die Tafel fragt den Dienst nach den Clips und zeigt sie (${JSON.stringify(l1)})`);
|
||||
await seite.click("#cs-liste .cs-wahl");
|
||||
await warte(400);
|
||||
|
||||
@@ -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 } });
|
||||
|
||||
Reference in New Issue
Block a user