feat(phase 2.4): pin restart_on_activate=true on ffmpeg_source (S2 kill switch) #25

Merged
deco merged 2 commits from feat/phase-2.4-restart-when-active into main 2026-05-21 22:45:38 +03:00
Owner

Summary

Phase 2.4 of the Stream-a-Thon plan. Pins restart_on_activate: true on the ffmpeg_source Media Source path so OBS retries within ~2 s of the next activation when the upstream Streamlink-fed URL stalls (pre-mortem scenario S2 — Twitch ad break / HLS reset / network blip).

Plan-text drift fixed

The plan referenced lib/obsClient.js:406,425,498 with setting name restart_when_active. Phase 1.1's refactor moved the ffmpeg_source settings into lib/streamInputConfig.js as the single source of truth (also consumed by scripts/convertBrowserToMedia/transform.ts). The OBS property name for ffmpeg_source is restart_on_activate (not restart_when_active — that's a browser_source property).

Browser-source sites in obsClient.js are intentionally left at false: V1 is on the deprecation path (Phase 1.3), and restart_when_active=true on browser sources causes URL reload + visible flicker on scene activation, which we do not want during the live event.

Files

  • lib/streamInputConfig.js:18restart_on_activate: false → true with an inline comment explaining why browser_source stays false
  • lib/__tests__/obsClient.test.js — flip the Phase 2.4 pin test from `toBe(false)` to `toBe(true)` and drop the "will flip it" TODO

Test plan

  • 184/184 jest tests pass
  • tsc --noEmit clean
  • next build clean
  • npm run audit:sqlite-opens clean
  • Phase 4.1 dress rehearsal exercises this in the wild (kill a Streamlink process for an active stream; visual recovery ≤ 2 s)
## Summary Phase 2.4 of the Stream-a-Thon plan. Pins `restart_on_activate: true` on the `ffmpeg_source` Media Source path so OBS retries within ~2 s of the next activation when the upstream Streamlink-fed URL stalls (pre-mortem scenario **S2** — Twitch ad break / HLS reset / network blip). ## Plan-text drift fixed The plan referenced `lib/obsClient.js:406,425,498` with setting name `restart_when_active`. Phase 1.1's refactor moved the ffmpeg_source settings into `lib/streamInputConfig.js` as the single source of truth (also consumed by `scripts/convertBrowserToMedia/transform.ts`). The OBS property name for `ffmpeg_source` is `restart_on_activate` (not `restart_when_active` — that's a `browser_source` property). Browser-source sites in `obsClient.js` are intentionally **left at false**: V1 is on the deprecation path (Phase 1.3), and `restart_when_active=true` on browser sources causes URL reload + visible flicker on scene activation, which we do not want during the live event. ## Files - `lib/streamInputConfig.js:18` — `restart_on_activate: false → true` with an inline comment explaining why browser_source stays false - `lib/__tests__/obsClient.test.js` — flip the Phase 2.4 pin test from \`toBe(false)\` to \`toBe(true)\` and drop the \"will flip it\" TODO ## Test plan - [x] 184/184 jest tests pass - [x] `tsc --noEmit` clean - [x] `next build` clean - [x] `npm run audit:sqlite-opens` clean - [ ] Phase 4.1 dress rehearsal exercises this in the wild (kill a Streamlink process for an active stream; visual recovery ≤ 2 s)
feat(phase 2.4): pin restart_on_activate=true on ffmpeg_source — S2 kill switch
All checks were successful
Lint and Build / build (pull_request) Successful in 4m43s
6fbf97c3fc
When the upstream Streamlink process dies mid-event (Twitch ad break /
HLS reset / network blip — pre-mortem scenario S2), OBS now retries the
Media Source within ~2s of the next activation instead of holding a
frozen tile. This closes the S2 kill switch from the plan.

The plan referenced lib/obsClient.js:406,425,498 with setting name
'restart_when_active', but Phase 1.1's createStreamGroupV2 moved the
ffmpeg_source settings into lib/streamInputConfig.js as the single
source of truth (also consumed by scripts/convertBrowserToMedia/
transform.ts). The real OBS property name for ffmpeg_source is
'restart_on_activate' (not restart_when_active — that's a browser_source
property). Browser_source sites in obsClient.js are intentionally left
at false: V1 is on the deprecation path, and restart_when_active=true
on browser sources causes URL reload + visible flicker on scene
activation, which we do not want during the live event.

- lib/streamInputConfig.js: restart_on_activate false → true, with an
  inline comment explaining why browser_source stays false.
- lib/__tests__/obsClient.test.js: update the Phase 2.4 pin test to
  expect true and remove the "will flip it" TODO comment.

184/184 jest tests pass; type-check, lint, audit:sqlite-opens, and
next build all clean.
Merge branch 'main' into feat/phase-2.4-restart-when-active
All checks were successful
Lint and Build / build (pull_request) Successful in 2m53s
2baefc574c
deco merged commit a17f3f882b into main 2026-05-21 22:45:38 +03:00
deco deleted branch feat/phase-2.4-restart-when-active 2026-05-21 22:45:38 +03:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deco/cuesheet!25
No description provided.