Routed Media (SFU)
A room can opt out of peer-to-peer mesh and route its live-call media through the platform's media server. Mesh stays peer-to-peer; SFU forwards media between participants, suited to larger calls. Two policy fields choose the topology, and a per-room call to getSfuToken(roomId) hands you the credentials your SFU client uses to connect.
Per-room policy
mediaMode: 'MESH' | 'SFU'— transport. Default'MESH'.mediaEncryption: 'E2EE' | 'SFU'— default'E2EE'. With'E2EE'the media server forwards traffic it cannot decrypt, so the platform stays a blind relay even in routed mode.'SFU'lets the server terminate media (enables server-side recording). Ignored whenmediaModeis'MESH'.
const room = await client.createRoom({
name: 'All hands',
policy: { mediaMode: 'SFU', mediaEncryption: 'E2EE' },
});
const sfu = await client.getSfuToken(room.roomId);
// { url, token, room, mediaEncryption, expiresAt }
// hand sfu.url + sfu.token to your SFU client to connect Mesh remains the default and is fine for small calls; switch to SFU only when the participant count outgrows mesh or you specifically need server-side recording. getSfuToken returns 409 for mesh-mode rooms and 503 if the media server is not available.
The platform mints the token; the SFU client itself is yours to bring (any standard SFU client works, and the DropOnAir SDK deliberately stays out of the media path so the app owns the wire). Verify support via GET /api/info, the features array includes "sfu". Requires SDK 0.17.0+ on JavaScript, Android, and iOS.
To record an SFU-mode room server-side, see SFU Recording.