Some Remotion compositions can’t be translated cleanly. The skill should
recognize them upfront and recommend the runtime interop pattern from
PR #214 instead of
producing broken HTML.
Bundles the user’s Remotion code with React + @remotion/player via esbuild.
Mounts a Remotion <Player> inside an HF composition’s HTML.
Pauses the player on mount.
Registers the player on window.__hfRemotion with seekTo(frame),
pause(), durationInFrames, fps.
HF’s render loop seeks the player frame-by-frame via seekTo(frame).
Result: Remotion’s React tree renders at HF’s deterministic frame ticks.
Custom hooks, useState, useEffect, MUI components — all work because
Remotion’s React reconciler is doing the rendering.
When the skill detects a blocker, output something like:
The Remotion source uses useState (and others), which can’t be
translated to HF’s seek-driven HTML model. The recommended path is the
runtime interop pattern: bundle your Remotion code with @remotion/player
and let HF drive it frame-by-frame.
lint_source.py emits a recommendation field per finding. Surface those
verbatim — they’re tuned per blocker rule:
json
{ "rule": "r2hf/use-state", "message": "useState detected — Remotion compositions that drive animation via React state are not deterministic frame-capture targets in HyperFrames", "recommendation": "Use the runtime interop pattern from PR #214 instead of attempting a translation"}
r2hf/lambda-import is a warning — not a blocker — because Lambda
configuration is orthogonal to the rendered composition. Translating an
otherwise-clean Remotion comp shouldn’t fail just because the author also
configured AWS Lambda for distributed rendering. The skill drops the
@remotion/lambda imports and renderMediaOnLambda(...) calls in step 3
(Generate) and writes a TRANSLATION_NOTES.md entry so the user knows to
set up HF rendering separately.
Bow out. The presence of a single blocker means the skill shouldn’t
attempt translation — even if the rest of the composition is clean.
The user should use interop for the whole thing OR refactor the
blocker patterns out of their Remotion source first.