Dual-stream/simulcast layers, subscription fallback, dynacast, encoding parameters and bandwidth estimation.
Version v1.1.0 · Updated 2026-10-26 · revision 1
On a poor network the most important thing is not "turn the bitrate down" but letting every endpoint choose what to watch according to its own bandwidth. This page covers dual-stream/simulcast, subscription fallback, dynamic subscription and encoder parameters, plus the exact method names they use in your code.
import AgoraRTC from'@nimeet/rtc-web';
const client = AgoraRTC.createClient({ mode: 'rtc' });
await client.join(appId, 'weekly-sync', token, uid);
// 1) Enable dual stream on the publisher (takes effect when set before publishing)
client.setLowStreamParameter({ width: 320, height: 180, framerate: 15, bitrate: 150 });
await client.enableDualStream();
// 2) Subscriber side: degrade to the low stream, then to audio only, when the network is poorawait client.setStreamFallbackOption(remoteUid, 2);
// 3) Or control it manually: subscribe to the low stream onlyawait client.setRemoteVideoStreamType(remoteUid, 1); // 1 = low stream// 4) Global default: newly appearing remote users start on the low stream (raise it per user for large layouts)await client.setRemoteDefaultVideoStreamType(1);
// Set when the camera track is createdconst cameraTrack = await AgoraRTC.createCameraVideoTrack({
encoderConfig: { width: 1280, height: 720, frameRate: 20, bitrateMax: 1500 },
});
// Adjust while running (supported on some platforms)
cameraTrack.setEncoderConfiguration({ width: 640, height: 360, frameRate: 15 });
Parameter
Suggested value
Notes
Resolution
1v1: 720p; small class: 640×360 or 720p; large-class viewers: no video subscription
Resolution has the biggest impact on bandwidth
Frame rate
15–20fps (content) / 24–30fps (people)
Dropping to 15fps usually feels worse than lowering resolution