> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daily.co/llms.txt
> Use this file to discover all available pages before exploring further.

# setBandwidth()

> Sets a cap on upstream camera video bandwidth.

`setBandwidth({ kbs, trackConstraints? })`

✗ Prebuilt✓ Custom

> [!WARNING]
>
> 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](https://www.daily.co/contact/support) 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()`](https://docs.daily.co/reference/daily-js/instance-methods/update-input-settings) instead.

## Return value

Returns `this` for chaining.

## Example

```javascript theme={null}
// Cap at 20kbps with small frame dimensions
call.setBandwidth({ kbs: 20 });

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

## See also

> [card] Methods
>
> * [updateSendSettings()](https://docs.daily.co/reference/daily-js/instance-methods/update-send-settings.md)
> * [updateInputSettings()](https://docs.daily.co/reference/daily-js/instance-methods/update-input-settings.md)
> * [getNetworkStats()](https://docs.daily.co/reference/daily-js/instance-methods/get-network-stats.md)

> [card] Guides
>
> * [Call quality](https://docs.daily.co/docs/daily-js/guides/network-quality.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.