fix(stream-test): restore audio after ads, enforce subtitle rule broadcast-wide, commit the 60fps MV path

Addresses review of the ad/subtitle work (the ad-skip.mjs -> broadcast-helper.mjs
rename's other half; the prior commit only recorded the deletion):

- ad mute leak: the ad-skipper muted during an ad but never un-muted, so the
  main video stayed silent after the first ad. Save the pre-ad muted/playbackRate
  and restore them when the ad ends (verified: muted false -> true -> false).
- captions were only applied once when scenario.mjs ran, not for the whole
  broadcast. The persistent helper now applies the rule (OFF by default, Korean
  ON if offered) per video and ENFORCES it every tick - one-shot did not hold
  because YouTube silently re-enabled captions (verified it stays off across 8s).
- ad-skip + captions merged into broadcast-helper.mjs (one CDP process).
- the 60fps MV test now lives in the repo: scenario.mjs gains MV_QUERY (search +
  auto-pick the first >=60fps result) and WATCH_SECONDS, plus the
  fullscreen-toolbar-hide fix. The broadcast runs via the committed
  stream-hold.ts (audio + keepalive), not an out-of-repo copy.
- document the test env vars (CDP_PORT, HOLD_MS, TEST_*, MV_QUERY, WATCH_SECONDS).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-06-10 16:09:31 +09:00
parent 0241628fed
commit f93b241575
4 changed files with 187 additions and 48 deletions

View File

@@ -91,6 +91,20 @@ NOVNC_URL=
# --- screenshot backend ---
SCREENSHOT_INTERVAL_SEC=5
# --- stream-test scripts (manual broadcast verification) ---
# Chrome remote-debugging port the scenario/helper attach to.
CDP_PORT=9222
# How long stream-hold.ts keeps the Go-Live up before auto-stopping (ms, 2h).
HOLD_MS=7200000
# scenario.mjs inputs: fixed concert clip + search queries.
TEST_VIDEO_ID=X_am71G6Vy4
TEST_YT_QUERY=내손을잡아
TEST_NAVER_QUERY=아이유
# Set MV_QUERY to auto-pick the first >=60fps search result instead of the clip.
MV_QUERY=
# Windowed/fullscreen watch duration per step (seconds).
WATCH_SECONDS=20
# ---------------------------------------------------------------------------
# Voice behaviour
# ---------------------------------------------------------------------------