Skip to main content
setBandwidth({ kbs, trackConstraints? }) Prebuilt Custom
Daily’s built-in bandwidth management handles most use cases automatically. Only use setBandwidth() if you have a specific need — and if you do, reach out to us so we can better support your use case.
Sets a soft cap on the upstream camera video bandwidth. In SFU mode (the default for all calls), kbs caps the total upstream bandwidth across all simulcast layers — Daily sends as many layers as fit within the cap, starting from the lowest. In peer-to-peer mode, kbs is a per-peer bitrate target.

Parameters

kbs
number | 'NO_CAP'
Upstream camera bandwidth cap in kilobits per second. Pass 'NO_CAP' to remove a previously set cap. Does not include audio or screenshare bandwidth.
trackConstraints
MediaTrackConstraints
deprecated
Deprecated in 0.75.0. Use updateInputSettings() instead.

Return value

Returns this for chaining.

Example

// Cap at 20kbps with small frame dimensions
call.setBandwidth({ kbs: 20 });

// Remove the cap
call.setBandwidth({ kbs: 'NO_CAP' });

See also