# TrackSelectionParameters

Artifact: [androidx.media3:media3-common](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/common/TrackSelectionParameters.java+class:androidx.media3.common.TrackSelectionParameters)

*** ** * ** ***

<br />

```
class TrackSelectionParameters
```

<br />

Known direct subclasses [DefaultTrackSelector.Parameters](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/trackselection/DefaultTrackSelector.Parameters)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/trackselection/DefaultTrackSelector.Parameters` | Extends `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/trackselection/DefaultTrackSelector.Parameters` by adding fields that are specific to `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/trackselection/DefaultTrackSelector`. |

*** ** * ** ***

Parameters for controlling track selection.

Parameters can be queried and set on a `https://developer.android.com/reference/kotlin/androidx/media3/common/Player`. For example the following code modifies the parameters to restrict video track selections to SD, and to select a German audio track if there is one:

```kotlin
// Build on the current parameters.
TrackSelectionParameters currentParameters = player.getTrackSelectionParameters();
// Build the resulting parameters.
TrackSelectionParameters newParameters = currentParameters
    .buildUpon()
    .setMaxVideoSizeSd()
    .setPreferredAudioLanguage("de")
    .build();
// Set the new parameters.
player.setTrackSelectionParameters(newParameters);
```

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi class https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters.AudioOffloadPreferences` Preferences and constraints for enabling audio offload. |
| `@https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) @https://developer.android.com/reference/kotlin/androidx/annotation/IntDef(value = ) annotation https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters.AudioOffloadPreferences.AudioOffloadMode` The preference level for enabling audio offload on the audio sink. |
| `class https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters.AudioOffloadPreferences.Builder` A builder for `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters.AudioOffloadPreferences`. |
| `class https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters.Builder` A builder for `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters`. |

| ### Constants |
|---|---|
| `const https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#DEFAULT()` An instance with default parameters. |
| `const https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#DEFAULT_WITHOUT_CONTEXT()` **This property is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#DEFAULT()` instead. <br /> |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#FIELD_CUSTOM_ID_BASE() = 1000` Defines a minimum field ID value for subclasses to use when implementing `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#toBundle()` and delegating to `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters.Builder#Builder(android.os.Bundle)`. |

| ### Protected constructors |
|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#TrackSelectionParameters(androidx.media3.common.TrackSelectionParameters.Builder)(builder: https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters.Builder!)` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters.Builder!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#buildUpon()()` Creates a new `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters.Builder`, copying the initial values from this instance. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#equals(java.lang.Object)(obj: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#fromBundle(android.os.Bundle)(bundle: https://developer.android.com/reference/android/os/Bundle.html!)` Construct an instance from a `https://developer.android.com/reference/android/os/Bundle.html` produced by `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#toBundle()`. |
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters!` | `[getDefaults](https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#getDefaults(android.content.Context))(context: https://developer.android.com/reference/android/content/Context.html!)` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#DEFAULT()` instead. <br /> |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#hashCode()()` |
| `https://developer.android.com/reference/android/os/Bundle.html!` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#toBundle()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters.AudioOffloadPreferences!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#audioOffloadPreferences()` The preferred offload mode settings for audio playback. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableSet.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#disabledTrackTypes()` The track types that are disabled. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#forceHighestSupportedBitrate()` Whether to force selection of the highest bitrate audio and video tracks that comply with all other constraints. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#forceLowestBitrate()` Whether to force selection of the single lowest bitrate audio and video tracks that comply with all other constraints. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.SelectionFlags https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#ignoredTextSelectionFlags()` Bitmask of selection flags that are ignored for text track selections. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#isPrioritizeImageOverVideoEnabled()` Whether an image track will be selected over a video track if both are available. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#isViewportSizeLimitedByPhysicalDisplaySize()` Whether the viewport size should be assumed to the physical display size if no other specific viewport size constraint is specified. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#maxAudioBitrate()` Maximum allowed audio bitrate in bits per second. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#maxAudioChannelCount()` Maximum allowed audio channel count. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#maxVideoBitrate()` Maximum allowed video bitrate in bits per second. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#maxVideoFrameRate()` Maximum allowed video frame rate in hertz. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#maxVideoHeight()` Maximum allowed video height in pixels. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#maxVideoWidth()` Maximum allowed video width in pixels. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#minVideoBitrate()` Minimum allowed video bitrate in bits per second. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#minVideoFrameRate()` Minimum allowed video frame rate in hertz. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#minVideoHeight()` Minimum allowed video height in pixels. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#minVideoWidth()` Minimum allowed video width in pixels. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableMap.html<https://developer.android.com/reference/kotlin/androidx/media3/common/TrackGroup!, https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionOverride!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#overrides()` Overrides to force selection of specific tracks. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#preferredAudioLabels()` The preferred labels for audio tracks in order of preference, or an empty list for no preference. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#preferredAudioLanguages()` The preferred languages for audio and forced text tracks as IETF BCP 47 conformant tags in order of preference. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#preferredAudioMimeTypes()` The preferred sample MIME types for audio tracks in order of preference, or an empty list for no preference. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.RoleFlags https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#preferredAudioRoleFlags()` The preferred `https://developer.android.com/reference/kotlin/androidx/media3/common/C.RoleFlags` for audio tracks. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#preferredTextLabels()` The preferred labels for text tracks in order of preference, or an empty list for no preference. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#preferredTextLanguages()` The preferred languages for text tracks as IETF BCP 47 conformant tags in order of preference. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.RoleFlags https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#preferredTextRoleFlags()` The preferred `https://developer.android.com/reference/kotlin/androidx/media3/common/C.RoleFlags` for text tracks. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#preferredVideoLabels()` The preferred labels for video tracks in order of preference, or an empty list for no preference. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#preferredVideoLanguages()` The preferred languages for video tracks as IETF BCP 47 conformant tags in order of preference. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#preferredVideoMimeTypes()` The preferred sample MIME types for video tracks in order of preference, or an empty list for no preference. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.RoleFlags https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#preferredVideoRoleFlags()` The preferred `https://developer.android.com/reference/kotlin/androidx/media3/common/C.RoleFlags` for video tracks. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#selectTextByDefault()` Prefer to select any text track by default. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#selectUndeterminedTextLanguage()` Whether a text track with undetermined language should be selected if no track with `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#preferredTextLanguages()` is available, or if `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#preferredTextLanguages()` is unset. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#usePreferredTextLanguagesAndRoleFlagsFromCaptioningManager()` Whether the preferred languages and the preferred role flags for text tracks should be set according the `https://developer.android.com/reference/android/view/accessibility/CaptioningManager.html` preferences, if enabled in the system settings and no other explicit language or role flag preferences are specified. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#viewportHeight()` Viewport height in pixels. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#viewportOrientationMayChange()` Whether the viewport orientation may change during playback. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#viewportWidth()` Viewport width in pixels. |

## Constants

### DEFAULT

```
@UnstableApi
const val DEFAULT: TrackSelectionParameters!
```

An instance with default parameters.

### DEFAULT_WITHOUT_CONTEXT

```
@UnstableApi
const val DEFAULT_WITHOUT_CONTEXT: TrackSelectionParameters!
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#DEFAULT()` instead.

### FIELD_CUSTOM_ID_BASE

```
@UnstableApi
protected const val FIELD_CUSTOM_ID_BASE = 1000: Int
```

Defines a minimum field ID value for subclasses to use when implementing `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#toBundle()` and delegating to `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters.Builder#Builder(android.os.Bundle)`.

Subclasses should obtain keys for their `https://developer.android.com/reference/android/os/Bundle.html` representation by applying a non-negative offset on this constant and passing the result to `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#intToStringMaxRadix(int)`.

## Protected constructors

### TrackSelectionParameters

```
@UnstableApi
protected TrackSelectionParameters(builder: TrackSelectionParameters.Builder!)
```

## Public functions

### buildUpon

```
fun buildUpon(): TrackSelectionParameters.Builder!
```

Creates a new `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters.Builder`, copying the initial values from this instance.

### equals

```
fun equals(obj: Any?): Boolean
```

### fromBundle

```
java-static fun fromBundle(bundle: Bundle!): TrackSelectionParameters!
```

Construct an instance from a `https://developer.android.com/reference/android/os/Bundle.html` produced by `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#toBundle()`.

### getDefaults

```
java-static fun [getDefaults](https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#getDefaults(android.content.Context))(context: Context!): TrackSelectionParameters!
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#DEFAULT()` instead.

### hashCode

```
fun hashCode(): Int
```

### toBundle

```
@CallSuper
fun toBundle(): Bundle!
```

## Public properties

### audioOffloadPreferences

```
@UnstableApi
val audioOffloadPreferences: TrackSelectionParameters.AudioOffloadPreferences!
```

The preferred offload mode settings for audio playback. The default is `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters.AudioOffloadPreferences#DEFAULT()`.

### disabledTrackTypes

```
val disabledTrackTypes: ImmutableSet<Int!>!
```

The track types that are disabled. No track of a disabled type will be selected, thus no track type contained in the set will be played. The default value is that no track type is disabled (empty set).

### forceHighestSupportedBitrate

```
val forceHighestSupportedBitrate: Boolean
```

Whether to force selection of the highest bitrate audio and video tracks that comply with all other constraints. The default value is `false`.

### forceLowestBitrate

```
val forceLowestBitrate: Boolean
```

Whether to force selection of the single lowest bitrate audio and video tracks that comply with all other constraints. The default value is `false`.

### ignoredTextSelectionFlags

```
@C.SelectionFlags
val ignoredTextSelectionFlags: Int
```

Bitmask of selection flags that are ignored for text track selections. See `https://developer.android.com/reference/kotlin/androidx/media3/common/C.SelectionFlags`. The default value is `0` (i.e., no flags are ignored).

### isPrioritizeImageOverVideoEnabled

```
@UnstableApi
val isPrioritizeImageOverVideoEnabled: Boolean
```

Whether an image track will be selected over a video track if both are available. The default value is `false`.

### isViewportSizeLimitedByPhysicalDisplaySize

```
val isViewportSizeLimitedByPhysicalDisplaySize: Boolean
```

Whether the viewport size should be assumed to the physical display size if no other specific viewport size constraint is specified. Constrains video track selections for adaptive content so that only tracks suitable for the viewport are selected. The default value is `true`.

### maxAudioBitrate

```
val maxAudioBitrate: Int
```

Maximum allowed audio bitrate in bits per second. The default value is `https://developer.android.com/reference/java/lang/Integer.html#MAX_VALUE` (i.e. no constraint).

### maxAudioChannelCount

```
val maxAudioChannelCount: Int
```

Maximum allowed audio channel count. The default value is `https://developer.android.com/reference/java/lang/Integer.html#MAX_VALUE` (i.e. no constraint).

### maxVideoBitrate

```
val maxVideoBitrate: Int
```

Maximum allowed video bitrate in bits per second. The default value is `https://developer.android.com/reference/java/lang/Integer.html#MAX_VALUE` (i.e. no constraint).

### maxVideoFrameRate

```
val maxVideoFrameRate: Int
```

Maximum allowed video frame rate in hertz. The default value is `https://developer.android.com/reference/java/lang/Integer.html#MAX_VALUE` (i.e. no constraint).

### maxVideoHeight

```
val maxVideoHeight: Int
```

Maximum allowed video height in pixels. The default value is `https://developer.android.com/reference/java/lang/Integer.html#MAX_VALUE` (i.e. no constraint).

To constrain adaptive video track selections to be suitable for a given viewport (the region of the display within which video will be played), use (`https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#viewportWidth()`, `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#viewportHeight()` and `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#viewportOrientationMayChange()`) instead.

### maxVideoWidth

```
val maxVideoWidth: Int
```

Maximum allowed video width in pixels. The default value is `https://developer.android.com/reference/java/lang/Integer.html#MAX_VALUE` (i.e. no constraint).

To constrain adaptive video track selections to be suitable for a given viewport (the region of the display within which video will be played), use (`https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#viewportWidth()`, `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#viewportHeight()` and `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#viewportOrientationMayChange()`) instead.

### minVideoBitrate

```
val minVideoBitrate: Int
```

Minimum allowed video bitrate in bits per second. The default value is 0 (i.e. no constraint).

### minVideoFrameRate

```
val minVideoFrameRate: Int
```

Minimum allowed video frame rate in hertz. The default value is 0 (i.e. no constraint).

### minVideoHeight

```
val minVideoHeight: Int
```

Minimum allowed video height in pixels. The default value is 0 (i.e. no constraint).

### minVideoWidth

```
val minVideoWidth: Int
```

Minimum allowed video width in pixels. The default value is 0 (i.e. no constraint).

### overrides

```
val overrides: ImmutableMap<TrackGroup!, TrackSelectionOverride!>!
```

Overrides to force selection of specific tracks.

### preferredAudioLabels

```
val preferredAudioLabels: ImmutableList<String!>!
```

The preferred labels for audio tracks in order of preference, or an empty list for no preference. The default is an empty list.

### preferredAudioLanguages

```
val preferredAudioLanguages: ImmutableList<String!>!
```

The preferred languages for audio and forced text tracks as IETF BCP 47 conformant tags in order of preference. An empty list selects the default track, or the first track if there's no default. The default value is an empty list.

### preferredAudioMimeTypes

```
val preferredAudioMimeTypes: ImmutableList<String!>!
```

The preferred sample MIME types for audio tracks in order of preference, or an empty list for no preference. The default is an empty list.

### preferredAudioRoleFlags

```
@C.RoleFlags
val preferredAudioRoleFlags: Int
```

The preferred `https://developer.android.com/reference/kotlin/androidx/media3/common/C.RoleFlags` for audio tracks. `0` selects the default track if there is one, or the first track if there's no default. The default value is `0`.

### preferredTextLabels

```
val preferredTextLabels: ImmutableList<String!>!
```

The preferred labels for text tracks in order of preference, or an empty list for no preference. The default is an empty list.

### preferredTextLanguages

```
val preferredTextLanguages: ImmutableList<String!>!
```

The preferred languages for text tracks as IETF BCP 47 conformant tags in order of preference. An empty list selects the default track if there is one, or no track otherwise. The default value is an empty list.

### preferredTextRoleFlags

```
@C.RoleFlags
val preferredTextRoleFlags: Int
```

The preferred `https://developer.android.com/reference/kotlin/androidx/media3/common/C.RoleFlags` for text tracks. `0` selects the default track if there is one, or no track otherwise. The default value is `0`.

### preferredVideoLabels

```
val preferredVideoLabels: ImmutableList<String!>!
```

The preferred labels for video tracks in order of preference, or an empty list for no preference. The default is an empty list.

### preferredVideoLanguages

```
val preferredVideoLanguages: ImmutableList<String!>!
```

The preferred languages for video tracks as IETF BCP 47 conformant tags in order of preference.

### preferredVideoMimeTypes

```
val preferredVideoMimeTypes: ImmutableList<String!>!
```

The preferred sample MIME types for video tracks in order of preference, or an empty list for no preference. The default is an empty list.

### preferredVideoRoleFlags

```
@C.RoleFlags
val preferredVideoRoleFlags: Int
```

The preferred `https://developer.android.com/reference/kotlin/androidx/media3/common/C.RoleFlags` for video tracks. `0` selects the default track if there is one, or the first track if there's no default. The default value is `0`.

### selectTextByDefault

```
val selectTextByDefault: Boolean
```

Prefer to select any text track by default.

If `false`, text tracks are only selected if they match any of the other preference settings.

The default value is `false`.

### selectUndeterminedTextLanguage

```
val selectUndeterminedTextLanguage: Boolean
```

Whether a text track with undetermined language should be selected if no track with `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#preferredTextLanguages()` is available, or if `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters#preferredTextLanguages()` is unset. The default value is `false`.

### usePreferredTextLanguagesAndRoleFlagsFromCaptioningManager

```
val usePreferredTextLanguagesAndRoleFlagsFromCaptioningManager: Boolean
```

Whether the preferred languages and the preferred role flags for text tracks should be set according the `https://developer.android.com/reference/android/view/accessibility/CaptioningManager.html` preferences, if enabled in the system settings and no other explicit language or role flag preferences are specified. The default value is ` true`.

### viewportHeight

```
val viewportHeight: Int
```

Viewport height in pixels. Constrains video track selections for adaptive content so that only tracks suitable for the viewport are selected. The default value is the physical height of the primary display, in pixels.

### viewportOrientationMayChange

```
val viewportOrientationMayChange: Boolean
```

Whether the viewport orientation may change during playback. Constrains video track selections for adaptive content so that only tracks suitable for the viewport are selected. The default value is `true`.

### viewportWidth

```
val viewportWidth: Int
```

Viewport width in pixels. Constrains video track selections for adaptive content so that only tracks suitable for the viewport are selected. The default value is the physical width of the primary display, in pixels.