What is a track?
A track is a named media stream between your app and the model. Tracks carry video, audio, or
any other data the model expects or produces. Every track has a name that both sides use to identify
it.
Your app declares which tracks to receive or send by name. These names must exactly match the track
attributes defined in the model’s Python class.
Output tracks (model to app)
Most models stream a single video output named main_video. Your app receives it by default.
// Receives main_video automatically
<ReactorProvider modelName="your-model-name" jwtToken={token}>
<ReactorView className="w-full aspect-video" />
</ReactorProvider>
Some models expose multiple output tracks. To receive them, list the track names in the receive array using the video() and audio() helpers:
const reactor = new Reactor({
modelName: "your-model-name",
receive: [video("main_video"), video("depth_map"), audio("main_audio")],
});
Some models can accept input from your app. Declare what you want to send in the send array:
const reactor = new Reactor({
modelName: "your-model-name",
receive: [video("main_video")],
send: [video("webcam")],
});
Naming convention
Here’s how track names map between the model and your app:
A mismatch means the track will not connect. There is no error — the stream simply does not arrive.
If a track is not working, check that the track name in your receive array exactly matches the model’s Python attribute name.
Check the model’s page under Models to see what tracks it exposes.