Ask
Add (or document) support for @remotion/player
in Fresh. Player is how you embed a Remotion composition in a React/Preact
app and pass runtime inputProps so one composition can render
differently per user/scenario/record. In Fresh + Preact-compat it doesn't
render — the SVG container mounts but stays empty.
Without it, the only path is pre-rendered mp4s. Fine for fixed marketing
assets, kills the runtime-parameterised use case Remotion is best at.
Live evidence
https://skyprospector.com/test-remotion — both delivery options
side-by-side (working static mp4 vs broken Player), with browser-side
diagnostic data printed inline (typeof Player === "object", Player keys
= [$$typeof, render]). Also has the full root-cause writeup, the things
I tried, and possible resolution paths so you don't have to repro
anything to see the shape of the problem.
Root cause (TL;DR)
Player's pre-bundled ESM does var Player = forwardRef(PlayerFn) with
forwardRef from import "react". That import resolves to real
react@19 from npm at runtime, not to the preact/compat alias declared
in deno.json. Real React's forwardRef returns {$$typeof, render}
(an object); Preact's returns a function. Preact silently can't render
the object → empty DOM, no error.
Confirmed in the browser that our island's import "react" correctly
aliases to preact/compat — the aliasing just doesn't propagate to
internal imports of pre-bundled npm packages.
Environment
Fresh 2.3.3, Preact 10.29.1, @remotion/player + remotion
4.0.456, react / react-dom aliased in deno.json to
npm:preact@^10.27.2/compat. Deno (current stable).
Tried (none fixed it): client-only mount via useEffect, Fresh 2.2 →
2.3.3, project-root vite.config.ts with resolve.alias + dedupe +
optimizeDeps.include. Details on the page.
Possible directions
- Fresh's aliasing reaches into pre-bundled npm package internals (likely
helps other React-ecosystem packages too)
- Upstream Vite fix if it's fundamentally Vite's pre-bundling behaviour
- Documented Fresh workaround (e.g. esbuild rebundle of Player with
react → preact/compat at bundle time, served from static/)
- First-class Remotion guidance in the Fresh handbook — even just a
yes/no would help users decide
Happy to open a standalone repro repo, test a patch, or add diagnostics
to the live page if useful.
Ask
Add (or document) support for
@remotion/playerin Fresh. Player is how you embed a Remotion composition in a React/Preact
app and pass runtime
inputPropsso one composition can renderdifferently per user/scenario/record. In Fresh + Preact-compat it doesn't
render — the SVG container mounts but stays empty.
Without it, the only path is pre-rendered mp4s. Fine for fixed marketing
assets, kills the runtime-parameterised use case Remotion is best at.
Live evidence
https://skyprospector.com/test-remotion — both delivery options
side-by-side (working static mp4 vs broken Player), with browser-side
diagnostic data printed inline (
typeof Player === "object", Player keys=
[$$typeof, render]). Also has the full root-cause writeup, the thingsI tried, and possible resolution paths so you don't have to repro
anything to see the shape of the problem.
Root cause (TL;DR)
Player's pre-bundled ESM does
var Player = forwardRef(PlayerFn)withforwardReffromimport "react". That import resolves to realreact@19from npm at runtime, not to thepreact/compatalias declaredin
deno.json. Real React'sforwardRefreturns{$$typeof, render}(an object); Preact's returns a function. Preact silently can't render
the object → empty DOM, no error.
Confirmed in the browser that our island's
import "react"correctlyaliases to preact/compat — the aliasing just doesn't propagate to
internal imports of pre-bundled npm packages.
Environment
Fresh
2.3.3, Preact10.29.1,@remotion/player+remotion4.0.456,react/react-domaliased indeno.jsontonpm:preact@^10.27.2/compat. Deno (current stable).Tried (none fixed it): client-only mount via
useEffect, Fresh 2.2 →2.3.3, project-root
vite.config.tswithresolve.alias+dedupe+optimizeDeps.include. Details on the page.Possible directions
helps other React-ecosystem packages too)
react → preact/compatat bundle time, served fromstatic/)yes/no would help users decide
Happy to open a standalone repro repo, test a patch, or add diagnostics
to the live page if useful.