HeliosConfig
TheHeliosConfig interface defines the configuration options for initializing a Helios composition. This is the base configuration used by both the core Helios class and the HeliosComposition interface.
Type parameters
The type of input properties passed to the composition. Can be customized for type safety.
Required fields
Duration of the composition in seconds. Must be non-negative.
Frame rate of the composition in frames per second. Must be greater than 0.
Dimensions
Canvas width in pixels. Must be positive.
Canvas height in pixels. Must be positive.
Playback control
The starting frame when the composition is initialized. Will be clamped to valid range.
Whether playback should loop when reaching the end.
Optional range of frames to play. Specified as
[startFrame, endFrame]. Start must be >= 0 and end must be > start.Playback speed multiplier. 1.0 is normal speed, 2.0 is double speed, 0.5 is half speed.
Input properties and schema
Custom properties passed to the composition. These will be validated against the schema if provided.
Schema definition for validating and describing input properties. Enables type checking and default values.
Animation synchronization
When true, automatically synchronizes WAAPI animations with Helios playback using a DomDriver.
Audio control
Master volume level from 0.0 (muted) to 1.0 (full volume).
Whether all audio should be muted.
Per-track audio state configuration. Keys are track IDs.
Metadata for available audio tracks. Can be used in headless environments where tracks cannot be auto-discovered.
Captions and markers
Captions for the composition. Can be an SRT/WebVTT string or an array of
CaptionCue objects.Timeline markers for navigation and annotation.
HeliosOptions
ExtendsHeliosConfig with additional runtime options for the Helios engine.
Additional fields
The scope for WAAPI animations. Defaults to
document in browser environments.Custom time driver for managing media synchronization. If not provided, selects automatically based on
autoSyncAnimations.Custom ticker for the playback loop. Defaults to
RafTicker in browser or TimeoutTicker in Node.js.Timeline definition with tracks and clips for multi-layer compositions.
AudioTrackState
Represents the playback state of an individual audio track.Volume level for this track from 0.0 to 1.0.
Whether this specific track is muted.
Usage example
Related types
- HeliosState - Runtime state interface
- RenderOptions - Rendering configuration
- TimeDriver - Time synchronization interface