music-video-gen/flow-state
Dejvino 8a94a3f3a5 Phase 6: preview UI and export
Full preview surface plus WebCodecs export, both driving the same Show —
the exporter has no render path of its own, which is what makes parity
structural rather than something to keep in sync.

Preview: transport with section jumping and looping, drag-scrub, timeline
strip showing sections coloured by kind with bar ticks and lock state,
generated param controls, reroll (whole track or one section), lock,
draft/full quality, debug HUD, click-track download, and a 20s test render
at full export quality.

Export: probes for a supported H.264 config, warms up before a mid-track
range so the first frame carries the feedback state continuous playback
would have given it, and encodes audio from the decoded PCM.

One real bug found by the gate: AAC is absent from Chromium builds without
proprietary codecs, which still ship H.264 encoding — so video succeeded
and audio killed the whole export with "Cannot call 'encode' on a closed
codec". The exporter now probes AAC then Opus, and a failure mid-encode
degrades to video-only rather than losing a long render. Fallbacks are
surfaced in the UI; a video that quietly lost its audio is worse than one
that says so.

Also adds a dev-only window.__flowState handle. The render loop is
rAF-driven and rAF does not fire in headless/automated contexts, so this
provides a way to step the app by hand.

Gate 10/10 (one manual: upload a test render to the real platform once
before trusting a full export). Real mp4s verified — ftyp box, honoured
frame ranges, resolution restored, cancellation clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 18:20:36 +02:00
..
src Phase 6: preview UI and export 2026-08-05 18:20:36 +02:00
test Phase 1: offline audio pipeline 2026-08-05 11:10:01 +02:00
tools Phase 5: compositing depth ("C" complete) 2026-08-05 11:38:26 +02:00
.gitignore Phase 0: determinism spine 2026-08-05 10:59:30 +02:00
checks.html Phase 0: determinism spine 2026-08-05 10:59:30 +02:00
index.html Phase 6 WIP refactor: migrate track analysis UI from overlay to sidebar header 2026-08-05 12:39:44 +02:00
package-lock.json Phase 6 WIP 2026-08-05 11:56:52 +02:00
package.json Phase 6 WIP working 2026-08-05 12:20:55 +02:00
PLAN.md Phase 4: arc driver ("C" brain) 2026-08-05 11:30:50 +02:00
vite.config.js Phase 0: determinism spine 2026-08-05 10:59:30 +02:00