Skip to main content
The player package provides a <hyperframes-player> custom element that embeds a HyperFrames composition in plain HTML or a framework application.
Use Player when an application needs to play and seek an HTML composition. Use Studio to edit it or the CLI and Producer to render a video file.

Embed a composition

Via CDN

index.html
With a package manager:
index.html
Set 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:
Direct DOM access works only when the composition and the host page are same-origin. Cross-origin embeds must use the Player API and events. @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 through postMessage.