# TrackSelectionOption

Artifact: [androidx.media3:media3-ui-compose](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/ui/compose/state/TrackSelectionState.kt+class:androidx.media3.ui.compose.state.TrackSelectionOption)


```
@UnstableApi
class TrackSelectionOption
```

<br />

*** ** * ** ***

Represents a unique track configuration available for selection, based on the active `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/TrackFilter`s.

This configuration encapsulates specific track properties (like language or resolution) and indicates whether it is currently supported and selected by the player.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/TrackSelectionOption#TrackSelectionOption(kotlin.Boolean,kotlin.Boolean,kotlin.String,kotlin.Int,kotlin.Int,kotlin.String,kotlin.Int)( isSupported: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, isSelected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, language: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html?, height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html?, sampleMimeType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, onOffState: @https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/OnOffState https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/TrackSelectionOption#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/TrackSelectionOption#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/TrackSelectionOption#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/TrackSelectionOption#height()` The video height associated with this option, or `null`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/TrackSelectionOption#isSelected()` Whether the option is currently selected. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/TrackSelectionOption#isSupported()` Whether the option is supported by the device. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/TrackSelectionOption#language()` The language associated with this option, or `null`. |
| `@https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/OnOffState https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/TrackSelectionOption#onOffState()` The `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/OnOffState` representing this option. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/TrackSelectionOption#sampleMimeType()` The sample MIME type associated with this option, or `null`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/TrackSelectionOption#width()` The video width associated with this option, or `null`. |

## Public constructors

### TrackSelectionOption

```
TrackSelectionOption(
    isSupported: Boolean,
    isSelected: Boolean,
    language: String? = null,
    width: Int? = null,
    height: Int? = null,
    sampleMimeType: String? = null,
    onOffState: @OnOffState Int = TRACK_SELECTION_ON
)
```

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

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

### toString

```
open fun toString(): String
```

## Public properties

### height

```
val height: Int?
```

The video height associated with this option, or `null`.

### isSelected

```
val isSelected: Boolean
```

Whether the option is currently selected.

### isSupported

```
val isSupported: Boolean
```

Whether the option is supported by the device.

### language

```
val language: String?
```

The language associated with this option, or `null`.

### onOffState

```
val onOffState: @OnOffState Int
```

The `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/OnOffState` representing this option.

### sampleMimeType

```
val sampleMimeType: String?
```

The sample MIME type associated with this option, or `null`.

### width

```
val width: Int?
```

The video width associated with this option, or `null`.