HeliosState
TheHeliosState interface represents the complete runtime state of a Helios composition. It combines configuration, playback status, and computed values.
Type parameters
Record<string, any>
default:"Record<string, any>"
The type of input properties for the composition.
Composition dimensions
number
Canvas width in pixels.
number
Canvas height in pixels.
Time and frames
number
Total duration of the composition in seconds.
number
Frame rate in frames per second.
number
Current playback position in frames.
number
Current playback position in seconds. Computed as
currentFrame / fps.Playback status
boolean
Whether the composition is currently playing.
boolean
Whether playback loops at the end.
number
Playback speed multiplier.
[number, number] | null
Active playback range as
[startFrame, endFrame], or null for full duration.Input properties
TInputProps
User-defined input properties for the composition.
Audio state
number
Master volume from 0.0 to 1.0.
boolean
Whether all audio is muted.
Record<string, AudioTrackState>
Per-track audio state. Keys are track IDs, values contain volume and mute state.
AudioTrackMetadata[]
List of available audio tracks with metadata.
Captions
CaptionCue[]
All caption cues for the composition.
CaptionCue[]
Caption cues active at the current time.
Timeline
HeliosClip[]
Clips currently active based on the timeline and current time.
Marker[]
Timeline markers for navigation.
HeliosSubscriber
Callback type for subscribing to state changes.Related types
CaptionCue
Represents a single caption cue.string
Unique identifier for the cue.
number
Start time in milliseconds.
number
End time in milliseconds.
string
Caption text content.
Marker
Represents a timeline marker.string
Unique identifier for the marker. Required and must be non-empty.
number
Marker position in seconds. Must be non-negative.
string
Optional human-readable label.
string
Optional hex color code for visual representation.
Record<string, any>
Optional custom metadata.
HeliosClip
Represents a clip in a timeline.string
Unique clip identifier.
string
Source identifier or path.
number
Start time in seconds.
number
Clip duration in seconds.
number
Optional track index.
Record<string, any>
Optional clip properties.
AudioTrackMetadata
Metadata for an audio track.string
Unique track identifier.
string
Audio source URL or path.
number
Track start time in composition.
number
Track duration in seconds.
number
Optional fade-in duration in seconds.
number
Optional fade-out duration in seconds.
string
Optional easing function for fades.
Usage example
Related types
- HeliosConfig - Configuration interface
- TimeDriver - Driver interfaces