<ReactorProvider>
Context provider that manages the Reactor connection for your React tree. Must wrap all other Reactor components and hooks.
Example
Token for authentication, or a resolver the SDK calls before each request the session makes. See Authentication.
The API URL. Overrides the default URL, including when
local is true.If
true, uses http://localhost:8080 as the default API URL.
Set apiUrl to use a different host or port.When
true, the model’s output tracks start streaming as soon as the connection is established. Set to false to leave them paused on connect. See connect().Adopt an existing session instead of creating one. See
Sessions.
Join the session using a pre-registered WebRTC connection id. See
connect().The provider’s
connectOptions act as defaults. Any options you pass to a later connect() call
override the matching defaults for that connection.<ReactorView>
Displays the video stream from the model. Automatically binds to the video output and manages the video element lifecycle.
Example
The name of the video track to display. Most models expose a single video output called
main_video, which is used by default. Only set this if the model exposes multiple video tracks.CSS
object-fit value for the video element.<WebcamStream>
Captures webcam video and automatically publishes it to the model when the connection is ready. Handles camera permissions, lifecycle, and cleanup.
Example
The name of the send track to publish to. Must match a
sendonly track name declared by the model.CSS
object-fit value for the webcam preview.If
true, also captures and publishes microphone audio alongside the webcam video.The name of the audio track to publish to. Must match a
sendonly audio track name declared by the model."ready", and unpublishes when the connection closes or the component unmounts.
<ClipPlayer>
Plays a Clip inline. Renders a native <video controls> element and handles fetching and attaching the clip on Safari, Chrome, Firefox, and Edge.
Example
ClipPlayer works without a ReactorProvider in the tree, so it keeps rendering a clip after the session has ended.
Resolver for the auth token used to fetch the clip. Required when running against
https://api.reactor.inc. Called before every poll of the clip’s metadata, with { sessionId } for the clip’s session. A token refresh or a new getJwt reaches the next poll. See Authentication.Grace period in milliseconds before the SDK gives up waiting for the clip to be finalised. Bump for long recordings where the final segment can take longer to finalise.
Whether the video starts muted. Browsers block autoplay-with-audio without a user gesture.
Safari can play clips natively. Other browsers need
hls.js installed alongside the SDK as an optional peer dependency:Install hls.js
<ClipDownloadButton>
Drop-in button that downloads a Clip as an MP4. The default label reflects download progress; override it with children to show your own.
Example
Resolver for the auth token used to fetch the clip. Required against
https://api.reactor.inc. Called before every poll of the clip’s metadata, with { sessionId } for the clip’s session. See Authentication.Static label, or a render function that receives the current
ClipDownloadState. Omit for the default progress-aware label.Disables the button. Always disabled while a download is in flight, regardless of this prop.
useClipDownload.