mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-16 06:19:21 +00:00
Rounds 1 (621523c6f) and 2 (6e05901c9) each tried to enumerate, per track, whether it was safe to re-stream after a sidecar disconnect/reconnect, and each left a real gap on review (round 2's unsafeAfterDisconnectRef missed tracks whose local AudioContext/AudioWorkletNode wiring was still in flight when the disconnect fired). The sidecar's own trackIndex-assignment rule can reassign colliding indices on any reload, and a WS disconnect doesn't reliably tell the client whether the same stateful process answered the reconnect or a fresh one did (server-side protocol flaw, out of scope here) — so no client-side per-track tracking has proven complete. Replace all of it with one suspendedRef in useVstPreview: the first disconnect this hook instance ever observes permanently stops it from loading ANY track — previously-loaded, previously-attempted, or never-seen — for the rest of its mounted lifetime. Delete unsafeAfterDisconnectRef entirely. Also fix the "Load chains" effect's cancellation branch to fully teardownTrack() a load that resolves after a disconnect (unmuting the element) instead of only closing its AudioContext, which previously left a mid-flight track muted forever with no audio ever routed to it. useVstHost's trackIndexRef mirror-clearing behavior is left unchanged: it's still needed for the FX property panel's independent, direct loadChain calls on the shared connection, which aren't gated by useVstPreview's suspension. Tradeoff, stated plainly: a single transient WS blip now permanently disables VST preview for the rest of the studio session (recoverable only by reloading the page) — accepted because two narrower recovery attempts have each shipped with a real correctness gap, and a wrong/misrouted track is worse than an honest, visible fallback to dry audio. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@hyperframes/studio
Browser-based composition editor UI for Hyperframes. Provides a visual timeline, code editor, and live preview for building video compositions.
Install
npm install @hyperframes/studio
What it does
The studio is a React application with:
- Visual timeline — drag, resize, and arrange elements on tracks
- Code editor — edit HTML and GSAP scripts with CodeMirror (syntax highlighting, autocomplete)
- Live preview — see changes in real time as you edit
- Composition inspector — view and modify element properties
Development
The studio is embedded in the hyperframes preview command. To develop the studio UI itself:
cd packages/studio
bun run dev # Start Vite dev server
bun run build # Build for production
bun run typecheck # Type-check
Tech stack
- React 18/19, Zustand (state management)
- CodeMirror 6 (editor)
- Tailwind CSS (styling)
- Vite (bundler)
- Phosphor Icons
Documentation
Full documentation: hyperframes.heygen.com/packages/studio
Related packages
@hyperframes/core— types and parsers used by the editorhyperframes— CLI that serves the studio viahyperframes preview