# MediaItem.SubtitleConfiguration

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/MediaItem.java+class:androidx.media3.common.MediaItem.SubtitleConfiguration)

*** ** * ** ***


```
class MediaItem.SubtitleConfiguration
```

<br />

Known direct subclasses [MediaItem.Subtitle](https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.Subtitle)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.Subtitle` | **This class is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration` instead <br /> |

*** ** * ** ***

Properties for a text track.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration` instances. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration.Builder!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration#buildUpon()()` Returns a `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration.Builder` initialized with the values of this instance. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration#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/MediaItem.SubtitleConfiguration!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration#fromBundle(android.os.Bundle)(bundle: https://developer.android.com/reference/android/os/Bundle.html!)` Restores a `SubtitleConfiguration` from a `https://developer.android.com/reference/android/os/Bundle.html`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration#hashCode()()` |
| `https://developer.android.com/reference/android/os/Bundle.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration#toBundle()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration#id()` The ID of the subtitles. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration#label()` The label. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration#language()` The language. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration#mimeType()` The optional MIME type of the subtitle file, or `null` if unspecified. |
| `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/MediaItem.SubtitleConfiguration#roleFlags()` The role flags. |
| `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/MediaItem.SubtitleConfiguration#selectionFlags()` The selection flags. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration#timeOffsetUs()` The offset that is added to the timestamps of the cues in this subtitle track, in microseconds. |
| `https://developer.android.com/reference/android/net/Uri.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration#uri()` The `https://developer.android.com/reference/android/net/Uri.html` to the subtitle file. |

## Public functions

### buildUpon

```
fun buildUpon(): MediaItem.SubtitleConfiguration.Builder!
```

Returns a `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration.Builder` initialized with the values of this instance.

### equals

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

### fromBundle

```
@UnstableApi
java-static fun fromBundle(bundle: Bundle!): MediaItem.SubtitleConfiguration!
```

Restores a `SubtitleConfiguration` from a `https://developer.android.com/reference/android/os/Bundle.html`.

### hashCode

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

### toBundle

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

## Public properties

### id

```
val id: String?
```

The ID of the subtitles. This will be propagated to the `https://developer.android.com/reference/kotlin/androidx/media3/common/Format#id()` of the subtitle track created from this configuration.

### label

```
val label: String?
```

The label.

### language

```
val language: String?
```

The language.

### mimeType

```
val mimeType: String?
```

The optional MIME type of the subtitle file, or `null` if unspecified.

### roleFlags

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

The role flags.

### selectionFlags

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

The selection flags.

### timeOffsetUs

```
@UnstableApi
val timeOffsetUs: Long
```

The offset that is added to the timestamps of the cues in this subtitle track, in microseconds. See `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.SubtitleConfiguration.Builder#setTimeOffsetUs(long)` for details.

### uri

```
val uri: Uri!
```

The `https://developer.android.com/reference/android/net/Uri.html` to the subtitle file.