Add a video track to RTCPeerConnection; after addTrack, call sender.getParameters() to retrieve the current encoding parameters.
Modify the encodings array to include multiple entries — one per simulcast layer — each with a distinct rid (e.g. 'q', 'h', 'f'), a scaleResolutionDownBy factor (e.g. 4.0, 2.0, 1.0 for quarter, half, and full resolution), and optionally a maxBitrate.
Call sender.setParameters(params) with the modified object; the returned promise resolves when the browser has applied the new encoding configuration.
In your SFU (LiveKit, mediasoup, Janus, etc.), configure the router to consume specific RID layers and forward the appropriate simulcast layer to each downstream subscriber based on their bandwidth.
Test by throttling network bandwidth on a subscriber and verifying the SFU automatically selects a lower-resolution layer.
Known gotchas
VP8 only supports temporal scalability (L1T2, L1T3) — not spatial scalability (S-modes); simulcast over VP8 requires separate SSRCs per layer, not a single RTP stream with spatial scalability modes.
Safari has limited simulcast and SVC support compared to Chrome and Firefox — test across all target browsers and implement SFU-side fallback for single-track clients.
setParameters must be called with an encodings array derived from getParameters — creating a new parameters object from scratch is rejected by most browsers.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp