# How to programmatically select a video track quality on Web

This article describes how you can use the VideoTrack API, a sub-API of the MediaTrack API, to select a video track quality. If you select a specific quality, you overrule the ABR algorithm.

Implementing this functionality is a common use-case for developers who want to build their own UI to toggle a specific video quality.

## Usage

Set the [`targetQuality`](https://optiview.dolby.com/docs/theoplayer/v11/api-reference/web/interfaces/MediaTrack#targetquality) property of a [`MediaTrack`](https://optiview.dolby.com/docs/theoplayer/v11/api-reference/web/interfaces/MediaTrack) to a single quality, to an array of qualities, or to `null`.

```js
const videoTrack = player.videoTracks[0];

// enable a specific video track quality
videoTrack.targetQuality = videoTrack.qualities[indexOfRequestedVideoTrackQuality];

// do ABR on a set of qualities
videoTrack.targetQuality = [videoTrack.qualities[indexOfRequestedVideoTrackQuality1], videoTrack.qualities[indexOfRequestedVideoTrackQuality2]];

// set to default ABR algorithm
videoTrack.targetQuality = null;
```

## Related articles

* [How to programmatically detect video track qualities](https://optiview.dolby.com/docs/theoplayer/how-to-guides/web/media-tracks/detect-video-track-qualities.md)
* [How to programmatically detect video track quality changes](https://optiview.dolby.com/docs/theoplayer/how-to-guides/web/media-tracks/detect-video-track-quality-changes.md)
* [How to reduce data usage on mobile devices](https://optiview.dolby.com/docs/theoplayer/how-to-guides/web/media-tracks/reduce-data-usage.md)
* [How to build a chromeless UI](https://optiview.dolby.com/docs/theoplayer/how-to-guides/web/ui/build-chromeless-ui.md)
