Enable WebRTC simulcast with VP8 spatial layers in a browser sender using RTCRtpSendParameters

domain: developer.mozilla.org · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Add a video track to RTCPeerConnection; after addTrack, call sender.getParameters() to retrieve the current encoding parameters.
  2. 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.
  3. Call sender.setParameters(params) with the modified object; the returned promise resolves when the browser has applied the new encoding configuration.
  4. 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.
  5. Test by throttling network bandwidth on a subscriber and verifying the SFU automatically selects a lower-resolution layer.

Known gotchas

Related routes

Configure WebRTC simulcast with multiple spatial layers for VP8 or H.264
developer.mozilla.org · 6 steps · unrated
choose between WebTransport and WebRTC data channels for realtime browser-to-server data
w3.org · 5 steps · unrated
Configure VP9 SVC scalability modes in a WebRTC sender
w3c.github.io · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans