Channel
A channel is an audio and video space; users in the same channel can send and receive audio and video with each other. You define the channel name and channel info yourself.Opening and destruction
- When the first user joins, the channel opens automatically if it isn’t open yet
- You can also open it manually in advance—useful when you need to set channel properties beforehand
- If no one joins within 2 hours of the channel opening, or 2 hours after the last user leaves, the channel is destroyed automatically
User
SRTC has no user system of its own. You define all user information; SRTC only trusts theuid issued in the token.
Two rules govern how a uid relates to channels:
- One uid can join multiple different channels at the same time
- When the same uid joins the same channel again, the later join replaces the earlier one
Track
Each audio stream and each video stream is a track. A user can:- Publish multiple local tracks (camera, screen sharing, microphone, and more)
- Subscribe to multiple remote tracks
desc field to mark whether a track is the camera or screen sharing, and the receiver decides how to render it accordingly.
Subscription is explicit
Joining a channel doesn’t mean you automatically receive all video. You need to subscribe to the tracks you want, or turn on auto-subscribe. This design lets you control bandwidth as needed—for example, a 3×3 grid subscribes only to the nine tracks on the current page and switches when the user pages.Messaging
Besides audio and video, SRTC provides two messaging paths. They differ in only one way: whether the user is in the channel when sending and receiving messages.
Requiring sends to go through your backend is intentional: because messages pass through your server first, you get the chance to apply business rules such as sensitive-word filtering, rate limiting, and permission checks.
The same uid can connect to IM on multiple devices at once, and each connection has its own
sid—so “send to a person” and “send to a device” are two different things.
- Client usage: Web channel messages (Chinese)
- Server API: Server API · IM messages