Skip to content

App Integration

idadwind edited this page Sep 21, 2026 · 1 revision

Integration and lifecycle

  1. Give the host container a nonzero width and height.
  2. Create the browser player after the DOM exists; avoid creating it during server-side rendering.
  3. Keep playback controls and application state in the host application.
  4. Subscribe to events as needed and unsubscribe when those listeners are no longer used.
  5. Dispose the player on unmount, including if an asynchronous creation finishes after the host has already unmounted.

Store the scene document separately if users need to save or edit it. getFrame() is evaluated render state, not a replacement for the authored document. Track runtime overrides explicitly if they should become persisted application data.

The optional React Stage consumes the older builder API's frames. To render a JSON SceneDocument in React, create the browser player in an effect using a container ref and dispose it during cleanup.


Wiki home · Quick start

Clone this wiki locally