# ExoTrackSelection.Definition

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

*** ** * ** ***


```
public final class ExoTrackSelection.Definition
```

<br />

*** ** * ** ***

Contains of a subset of selected tracks belonging to a `https://developer.android.com/reference/androidx/media3/common/TrackGroup`.

## Summary

| ### Public fields |
|---|---|
| `final https://developer.android.com/reference/androidx/media3/common/TrackGroup` | `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/ExoTrackSelection.Definition#group()` The `https://developer.android.com/reference/androidx/media3/common/TrackGroup` which tracks belong to. |
| `final int[]` | `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/ExoTrackSelection.Definition#tracks()` The indices of the selected tracks in `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/ExoTrackSelection.Definition#group()`. |
| `final int` | `@https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelection.Type https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/ExoTrackSelection.Definition#type()` The type that will be returned from `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelection#getType()`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/ExoTrackSelection.Definition#Definition(androidx.media3.common.TrackGroup,int...)(https://developer.android.com/reference/androidx/media3/common/TrackGroup group, int[] tracks)` |
| `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/ExoTrackSelection.Definition#Definition(androidx.media3.common.TrackGroup,int[],int)(https://developer.android.com/reference/androidx/media3/common/TrackGroup group, int[] tracks, @https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelection.Type int type)` |

## Public fields

### group

```
public final TrackGroup group
```

The `https://developer.android.com/reference/androidx/media3/common/TrackGroup` which tracks belong to.

### tracks

```
public final int[] tracks
```

The indices of the selected tracks in `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/ExoTrackSelection.Definition#group()`.

### type

```
@TrackSelection.Type
public final int type
```

The type that will be returned from `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelection#getType()`.

## Public constructors

### Definition

```
public Definition(TrackGroup group, int[] tracks)
```

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/TrackGroup group` | The `https://developer.android.com/reference/androidx/media3/common/TrackGroup`. Must not be null. |
| `int[] tracks` | The indices of the selected tracks within the `https://developer.android.com/reference/androidx/media3/common/TrackGroup`. Must not be null or empty. May be in any order. |

### Definition

```
public Definition(TrackGroup group, int[] tracks, @TrackSelection.Type int type)
```

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/TrackGroup group` | The `https://developer.android.com/reference/androidx/media3/common/TrackGroup`. Must not be null. |
| `int[] tracks` | The indices of the selected tracks within the `https://developer.android.com/reference/androidx/media3/common/TrackGroup`. Must not be null or empty. May be in any order. |
| `@https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelection.Type int type` | The type that will be returned from `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelection#getType()`. |