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.
Available in
@reactor-team/js-sdk 2.10 and above. The Python SDK does not expose recordings yet.What is a clip?
Once a model has recording enabled, your app can ask Reactor for two types of clip from a live session:- Snap clip: the last
Nseconds of the session. - Full recording: everything from the start of the session up to now.
Clip object you can hand to the SDK’s player to
preview, or to its download helpers to save as a single MP4. The same object works either way.
Reactor holds clips for 24 hours and then deletes them. None of this data is used for training.
Capturing a clip
Recording lives on theReactor instance. Inside a ReactorProvider, reach it via useReactor().
requestClip takes a duration in seconds and grabs the
live session up to that point in the past. It is capped server-side at 5 minutes by default.
requestRecording takes no arguments and grabs the
full session from the start of recording up to now. Both resolve with the same Clip object.
Both methods can only be called when the connection status is
"ready". They throw a
RecordingError with code DISCONNECTED otherwise, and a
request still in flight when the session disconnects is rejected with the same code.Previewing a clip
Play a captured clip in place. In React, drop aClipPlayer
into your UI and pass the clip; it renders a native <video controls> element. Imperatively, assemble
the clip into an MP4 with downloadClipAsFile() and
point a <video> at the blob.
ClipPlayer does not require a ReactorProvider in the tree, so it keeps working after the session
has ended.
ClipPlayer streams the clip as HTTP Live Streaming (HLS),
a protocol that breaks video into small chunks served over HTTP. Safari plays it natively, while
Chrome, Firefox, and Edge need hls.js installed as an optional peer dependency. The imperative
downloadClipAsFile route above returns a plain MP4 and needs no extra dependency.ClipPlayer for the full prop list.
Downloading a clip
ClipDownloadButton renders a plain <button>
that reflects download state and triggers a browser save dialog when clicked. Pass the same token you
use to connect as getJwt so the component can authenticate the download.
React
Blob, call
reactor.downloadClipAsFile() directly.
JavaScript
Putting it together
A small React app that displays a live model, captures a 10-second snap, and previews it alongside a download button.React
Error handling
Any recording-specific failure throws aRecordingError. The
React components surface it inline already, so you only need to catch it when you call requestClip
or requestRecording directly.
JavaScript
RecordingError for the full list of codes.