Documentation Index
Fetch the complete documentation index at: https://docs.reactor.inc/llms.txt
Use this file to discover all available pages before exploring further.
Event types
Definition
reactor.on(event, handler) and remove them with reactor.off(event, handler).
statusChanged
Fired when the connection status changes.
Payload: ReactorStatus
Example
message
Fired when the model sends an application-level message.
Payload: any. Shape depends on the model.
Example
trackReceived
Fired when a named media track is received from the model.
Payload: (name: string, track: MediaStreamTrack, stream: MediaStream)
| Argument | Type | Description |
|---|---|---|
name | string | Track name as declared on the model |
track | MediaStreamTrack | The raw media track |
stream | MediaStream | A MediaStream containing the track |
Example
For React apps, use
ReactorView instead. It handles this event automatically.error
Fired when an error occurs.
Payload: ReactorError
Example
ReactorError for all fields and error codes.
sessionIdChanged
Fired when the session ID changes, typically on connect or disconnect.
Payload: string | undefined
sessionExpirationChanged
Fired when the session expiration time is updated by the server.
Payload: number | undefined. Unix timestamp of expiration, or undefined if not set.
statsUpdate
Fired every 2 seconds with WebRTC connection statistics while connected.
Payload: ConnectionStats
Example
ConnectionStats for all fields.
capabilitiesReceived
Fired when the model’s capabilities are received after session creation. Contains track definitions, available commands, and other model metadata.
Payload: Capabilities
Example
Capabilities for the full type.
runtimeMessage
Fired when the platform sends an internal runtime message. Used by ReactorController to receive the model’s command schema. Not needed for most applications.
Payload: any