Skip to main content

HeliosConfig

The HeliosConfig 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

Record<string, any>
default:"Record<string, any>"
The type of input properties passed to the composition. Can be customized for type safety.

Required fields

number
required
Duration of the composition in seconds. Must be non-negative.
number
required
Frame rate of the composition in frames per second. Must be greater than 0.

Dimensions

number
default:"1920"
Canvas width in pixels. Must be positive.
number
default:"1080"
Canvas height in pixels. Must be positive.

Playback control

number
default:"0"
The starting frame when the composition is initialized. Will be clamped to valid range.
boolean
default:"false"
Whether playback should loop when reaching the end.
[number, number]
Optional range of frames to play. Specified as [startFrame, endFrame]. Start must be >= 0 and end must be > start.
number
default:"1"
Playback speed multiplier. 1.0 is normal speed, 2.0 is double speed, 0.5 is half speed.

Input properties and schema

TInputProps
Custom properties passed to the composition. These will be validated against the schema if provided.
HeliosSchema
Schema definition for validating and describing input properties. Enables type checking and default values.

Animation synchronization

boolean
default:"false"
When true, automatically synchronizes WAAPI animations with Helios playback using a DomDriver.

Audio control

number
default:"1"
Master volume level from 0.0 (muted) to 1.0 (full volume).
boolean
default:"false"
Whether all audio should be muted.
Record<string, AudioTrackState>
Per-track audio state configuration. Keys are track IDs.
AudioTrackMetadata[]
Metadata for available audio tracks. Can be used in headless environments where tracks cannot be auto-discovered.

Captions and markers

string | CaptionCue[]
Captions for the composition. Can be an SRT/WebVTT string or an array of CaptionCue objects.
Marker[]
Timeline markers for navigation and annotation.

HeliosOptions

Extends HeliosConfig with additional runtime options for the Helios engine.

Additional fields

unknown
default:"document"
The scope for WAAPI animations. Defaults to document in browser environments.
TimeDriver
Custom time driver for managing media synchronization. If not provided, selects automatically based on autoSyncAnimations.
Ticker
Custom ticker for the playback loop. Defaults to RafTicker in browser or TimeoutTicker in Node.js.
HeliosTimeline
Timeline definition with tracks and clips for multi-layer compositions.

AudioTrackState

Represents the playback state of an individual audio track.
number
Volume level for this track from 0.0 to 1.0.
boolean
Whether this specific track is muted.

Usage example