<hyperframes-player> custom element that embeds a
HyperFrames composition in plain HTML or a framework application.
Embed a composition
Via CDN
index.html
index.html
autoplay muted only when playback should start without a user gesture.
Attributes
Player also accepts
shader-capture-scale and shader-loading for previewing
projects that use shader transitions. These are preview controls, not composition
authoring attributes.
JavaScript API
The main API follows familiar media-player behavior:Events
Advanced: iframe access
The composition runs inside an<iframe> in the player’s Shadow DOM. For most
uses, the JavaScript API and events above are enough. The iframeElement getter
exists for same-origin tools that must inspect the composition DOM or connect a
custom editing surface:
@hyperframes/studio exports resolveIframe for consumers
that need to pass the inner iframe to Studio’s timeline hooks:
How it works
The composition runs in a sandboxed iframe inside the player’s Shadow DOM. This isolates its styles, scales it to the player container, and lets the player communicate with the HyperFrames runtime throughpostMessage.