# Chapter.Builder

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

*** ** * ** ***


```
class Chapter.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter` instances.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter.Builder#Builder()()` Constructs an instance. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter.Builder#build()()` Builds a `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter` instance with the provided values. |
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter.Builder#setEndTimeMs(long)(endTimeMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the end time of the chapter, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if not known. |
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter.Builder#setHidden(boolean)(isHidden: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets whether the chapter is hidden. |
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter.Builder#setStartTimeMs(long)(startTimeMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the start time of the chapter, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if not known. |
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter.Builder#setTitle(androidx.media3.common.Label)(title: https://developer.android.com/reference/kotlin/androidx/media3/common/Label?)` Sets the title of this chapter, or `null` if not known. |

## Public constructors

### Builder

```
Builder()
```

Constructs an instance.

## Public functions

### build

```
fun build(): Chapter!
```

Builds a `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter` instance with the provided values.

### setEndTimeMs

```
@CanIgnoreReturnValue
fun setEndTimeMs(endTimeMs: Long): Chapter.Builder!
```

Sets the end time of the chapter, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if not known.

Defaults to `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter#getEndTimeMs()` |   |

### setHidden

```
@CanIgnoreReturnValue
fun setHidden(isHidden: Boolean): Chapter.Builder!
```

Sets whether the chapter is hidden.

Defaults to `false`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter#isHidden()` |   |

### setStartTimeMs

```
@CanIgnoreReturnValue
fun setStartTimeMs(startTimeMs: Long): Chapter.Builder!
```

Sets the start time of the chapter, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if not known.

Defaults to `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter#getStartTimeMs()` |   |

### setTitle

```
@CanIgnoreReturnValue
fun setTitle(title: Label?): Chapter.Builder!
```

Sets the title of this chapter, or `null` if not known.

Defaults to `null`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/Chapter#getTitle()` |   |