> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fastpix.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fastpix.com/docs/_mcp/server.

# Switch video quality

> Let viewers lock a fixed video quality or return to adaptive bitrate (ABR) auto mode in the FastPix Android Player.

Let viewers lock a fixed video quality or return to adaptive bitrate (ABR) auto mode in the FastPix Android Player.

By default, the FastPix Android Player streams adaptively (ABR), choosing a rendition based on network conditions. Use these APIs, which are available on `FastPixPlayer`, to let users pick a fixed quality, such as 1080p, or switch back to auto. Quality switching doesn't recreate the player or reset the playback position.

\


## Before you begin

Make sure you have the following:

* The FastPix Android Player SDK installed, with a player backed by `FastPixPlayer`. See [Install FastPix Android player](/docs/android-player/install-fastpix-android-player) and [Set up the player](/docs/android-player/set-up-the-player).

Get the `FastPixPlayer` instance from your `PlayerView`:

```kotlin
val player = binding.playerView.player as? FastPixPlayer ?: return
```

\


## Get available and current qualities

```kotlin
// All available video quality tracks for current media
val qualities: List<VideoTrack> = player.getVideoQualities()

// Current active quality (in auto mode this reflects currently rendered quality)
val current: VideoTrack? = player.getCurrentVideoQuality()
```

Each `VideoTrack` exposes `id`, `width`, `height`, `bitrate`, `label`, `isSelected`, and `isAuto`. Use `id` when you call `setVideoQuality`.

\


## Lock a fixed quality

Pass a quality `id` from `getVideoQualities()` to lock playback to that rendition.

```kotlin
// Pick a quality id from getVideoQualities()
player.setVideoQuality(trackId)
```

\


## Return to auto (ABR)

```kotlin
player.enableAutoQuality()
```

\


## Listen for quality changes

The `onVideoQualityChanged` callback tells you both the new quality and whether the change came from a user action or the SDK's automatic ABR switching.

```kotlin
player.addPlaybackListener(object : PlaybackListener {
    override fun onVideoQualityChanged(
        quality: VideoTrack?,
        source: PlaybackListener.VideoQualityChangeSource
    ) {
        // source = MANUAL when you call setVideoQuality/enableAutoQuality
        // source = ABR when SDK switches rendition automatically
        updateQualityUi(quality, source)
    }
    override fun onPlay() {}
    override fun onPause() {}
    override fun onPlaybackStateChanged(isPlaying: Boolean) {}
    override fun onError(error: PlaybackException) {}
})
```

\


## Things to know

* Quality switching doesn't recreate the player or reset the playback position.
* If a seek is in progress, the quality change is applied safely after the seek completes.
* Keep an **Auto** option in your quality menu that calls `enableAutoQuality()`, so viewers can return to adaptive bitrate.

\


#### Frequently asked questions

Setting a resolution with `setFastPixMediaItem` (`maxResolution`, `minResolution`, `resolution`) configures playback before it starts. The quality-switching APIs on this page (`getVideoQualities`, `setVideoQuality`, `enableAutoQuality`) let a viewer change quality during playback without reloading the stream.

No. Quality switching doesn't recreate the player or reset the playback position. If a seek is in progress, the change is applied after the seek completes.

The `onVideoQualityChanged` callback includes a `source`. It's `MANUAL` when you call `setVideoQuality` or `enableAutoQuality`, and `ABR` when the SDK switches renditions automatically based on the network.

Include an **Auto** entry in your quality menu that calls `enableAutoQuality()`. This re-enables ABR so the SDK selects the rendition automatically.

\


## What's next

* [Set playback resolution](/docs/android-player/set-playback-resolution) to cap or fix resolution before playback starts.
* [Control rendition order](/docs/android-player/control-rendition-order) to set the adaptive streaming preference order.
* [Listen to playback events](/docs/android-player/listen-to-playback-events) for time, buffering, and error callbacks.