dragonflight/services/playout
Zac ca71e47035 fix(playout): repair failover, authenticate scheduler self-calls, fix playlist walk + CasparCG consumer syntax
Post-review fixes for the 8-commit playout-mcr drop:

- Scheduler self-calls (callSelf -> /recorders, /playout) carried no auth, so
  under AUTH_ENABLED=true requireUiHeader 403'd every mutating POST. This broke
  playout failover AND scheduled recordings. Add a per-boot in-process service
  token (x-internal-token) the scheduler attaches; requireAuth/requireUiHeader
  treat it as the seeded admin. No env/compose config needed.

- Failover deadlocked: restartChannel set status='starting' then the scheduler
  called the guarded /start route, which 409s on 'starting'. Extract the spawn
  body into spawnChannelSidecar() shared by /start and restartChannel; failover
  now spawns directly with no self-call.

- Phase A playlist stalled after 2 clips: _scheduleAdvance cued the next clip
  via LOADBG AUTO but never advanced the pointer. Pass asset_duration_ms in the
  /play payload and arm a duration-based timer that advances currentIndex and
  cues subsequent clips, keeping as-run in sync for arbitrary-length playlists.

- CasparCG consumer syntax was invalid: "ADD <ch> FFMPEG" is the producer name,
  not a consumer keyword, and old -vcodec/-acodec short args are rejected. Use
  STREAM/FILE with -codec:v / -codec:a / -preset:v / -tune:v and a format=yuv420p
  filter ahead of libx264 (channel output is RGBA).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 14:51:35 +00:00
..
src fix(playout): repair failover, authenticate scheduler self-calls, fix playlist walk + CasparCG consumer syntax 2026-05-30 14:51:35 +00:00
casparcg.config feat(playout): CasparCG sidecar image + Node AMCP shim 2026-05-30 14:02:25 +00:00
Dockerfile feat(playout): CasparCG sidecar image + Node AMCP shim 2026-05-30 14:02:25 +00:00
entrypoint.sh feat(playout): CasparCG sidecar image + Node AMCP shim 2026-05-30 14:02:25 +00:00
package.json feat(playout): CasparCG sidecar image + Node AMCP shim 2026-05-30 14:02:25 +00:00