FileRef
A reference to an uploaded file, returned by
uploadFile(). Pass into sendCommand() to attach files
to a command.
Definition
ReactorStatus
The connection state of a Reactor instance.
Definition
ReactorState
Definition
ConnectOptions
Options passed to connect(),
reconnect(), and the React provider’s
connectOptions prop.
Definition
maxAttemptscaps how many times the SDK polls the server for its SDP answer (its reply in the WebRTC connection handshake) before the connect fails.autoResumeTracks(defaulttrue) subscribes to every output (recvonly) track as soon as the connection is established, so output reaches your client on connect. The model emits frames the whole time the session runs; this only controls whether your client receives them. Set it tofalseto start unsubscribed and subscribe per track withresumeTrack().sessionIdattaches to a session that already exists, for example one created by your backend, instead of creating a new one. The token passed toconnect()must be valid for the account that owns the session. Only the session’s creator can terminate it. A client that adopts the session leaves it running when it disconnects. See Sessions.connectionIdjoins the session using a specific WebRTC connection id already registered for it, for example one your backend created and handed to this client. When omitted, the SDK registers a fresh connection and the server mints the id.connect()rejects if the id is unknown or already closed.
ReactorError
Definition
Error codes
| Code | Component | Recoverable | Description |
|---|---|---|---|
CONNECTION_FAILED | api | Yes | Failed to establish a connection |
GPU_CONNECTION_ERROR | gpu | Yes | Connection to GPU dropped |
MESSAGE_SEND_FAILED | gpu | Yes | Failed to send a message |
TRACK_PUBLISH_FAILED | gpu | Yes | Failed to publish a media track |
RECONNECTION_FAILED | gpu | Yes | Failed to reconnect to existing session |
TrackCapability
Describes a media track declared in the model’s capabilities. Track capabilities are provided by the
server after session creation. You do not need to declare tracks on the client.
Definition
Capabilities
The model’s capabilities, received after session creation.
Definition
reactor.getCapabilities() or the capabilitiesReceived event.
Clip
A captured clip returned by requestClip() and
requestRecording(). Pass it to
ClipPlayer,
ClipDownloadButton, or
useClipDownload to play or save it.
Definition
Clip is temporary. The URL it carries expires after 24 hours, so save the bytes locally if you
need them later. See Recordings for usage.
RecordingError
Thrown by the recording APIs when a clip request, playback, or download fails.
Definition
Error codes
| Code | Description |
|---|---|
RECORDER_DISABLED | The model does not have recording enabled, or recording crashed on the server. |
INVALID_DURATION | requestClip was called with a non-positive or non-finite duration. |
DISCONNECTED | The session disconnected before the server answered, or the request was issued while disconnected. |
REQUEST_TIMEOUT | The server did not acknowledge the request in time. |
CLIP_GONE | The clip is no longer available (it has aged out, or the session is unknown). |
CLIP_NOT_READY | The clip was still being finalised past the expected grace window. |
PLAYLIST_FETCH_FAILED | Network error while fetching the clip. |
CHUNK_FETCH_FAILED | One of the clip’s segments failed to download. |
INVALID_PLAYLIST | The clip metadata was malformed. |
DOWNLOAD_UNSUPPORTED | downloadClipAsFile() was called outside a browser with a non-null filename. Pass filename: null to receive the Blob instead. |
INTERNAL_ERROR | Catch-all for unexpected SDK or server failures. |
ClipDownloadState
State of an in-progress download, returned by
useClipDownload.
Definition
total is 0 until the SDK knows how many segments to fetch. message is suitable for inline
display.
ConnectionStats
WebRTC connection statistics returned by useStats() and the statsUpdate event.
Definition