Core Concepts for Multiparty Video + Archiving

Sessions, tokens, and archives are the building blocks of everything you'll implement in this path. Here's how they fit together.

Sessions, tokens, and archives

  • A session is the room where participants join and exchange media.
  • A token is the per-user credential that allows join behavior with specific permissions.
  • An archive is the recording output for that session, controlled by backend routes.

In this path, the backend owns creation and control (sessions, tokens, archives), while the frontend uses those values to connect and render participant media.

Session types: relayed vs routed

Session type affects quality, scalability behavior, and recording support. This path uses routed sessions on purpose.

Use a relayed instead of a routed session, if you have only two participants (or maybe even three) and you are not using archiving.

Using relayed sessions reduces the latency between participants, reduces the points of failure and you can get better quality video and audio in most cases.

Routed sessions are required if you want to archive your session.

They are recommended if you have more than two or three participants in the session.

For more information, see The Media Router and media modes.

Token roles

Tokens carry a role that defines what a participant can do in the session.

Use this practical model while implementing:

  • subscriber: receives streams only,
  • publisher: publishes a local stream and subscribes to remote streams,
  • moderator: can control advanced session actions (useful when archive controls are involved).

You will apply these roles directly when validating backend responses and client behavior in Course 2.
If you want the full role model and token parameters, see Create token.

Recording lifecycle

  1. Frontend sends a start recording request to the backend.
  2. Backend starts the archive and returns its status; UI updates recording state accordingly.
  3. Frontend sends a stop recording request to the backend.
  4. Backend exposes a playback route once the archive is available.

Checkpoint

  • You understand the session/token/archive relationship.
  • You know why routed mode is used in this path.
  • You know which token role is needed for each participant behavior.