# ChapterFrame

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/id3/ChapterFrame.java+class:androidx.media3.extractor.metadata.id3.ChapterFrame)

*** ** * ** ***

<br />

```
@UnstableApi
class ChapterFrame : Id3Frame, Chapter
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.media3.extractor.metadata.id3.Id3Frame](https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/Id3Frame) ||
|   | ↳ | [androidx.media3.extractor.metadata.id3.ChapterFrame](https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/ChapterFrame) |

*** ** * ** ***

Chapter information ID3 frame.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/ChapterFrame#ID() = "CHAP"` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/ChapterFrame#ChapterFrame(java.lang.String,int,int,long,long,androidx.media3.extractor.metadata.id3.Id3Frame[])( chapterId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, startTimeMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, endTimeMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, startOffset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, endOffset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, subFrames: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/Id3Frame!>! )` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/ChapterFrame#equals(java.lang.Object)(obj: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/ChapterFrame#getEndTimeMs()()` Returns the end time of the chapter in milliseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if unknown. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/ChapterFrame#getStartTimeMs()()` Returns the start time of the chapter in milliseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if unknown. |
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/Id3Frame!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/ChapterFrame#getSubFrame(int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the sub-frame at `index`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/ChapterFrame#getSubFrameCount()()` Returns the number of sub-frames. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/ChapterFrame#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/ChapterFrame#isHidden()()` Returns whether the chapter is hidden. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/ChapterFrame#chapterId()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/ChapterFrame#endOffset()` The byte offset of the end of the chapter, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if not set. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/ChapterFrame#endTimeMs()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/ChapterFrame#startOffset()` The byte offset of the start of the chapter, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if not set. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/ChapterFrame#startTimeMs()` |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/Label?` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/ChapterFrame#title()` |

### Inherited functions

From [androidx.media3.extractor.metadata.id3.Id3Frame](https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/Id3Frame) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/Id3Frame#toString()()` From [androidx.media3.common.Metadata.Entry](https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>?` `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry#getWrappedMetadataBytes()()`

Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain wrapped metadata.
`https://developer.android.com/reference/kotlin/androidx/media3/common/Format?` `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry#getWrappedMetadataFormat()()`

Returns the `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` that can be used to decode the wrapped metadata in `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry#getWrappedMetadataBytes()`, or null if this Entry doesn't contain wrapped metadata.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry#populateMediaMetadata(androidx.media3.common.MediaMetadata.Builder)(builder: https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata.Builder!)`

Updates the `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata.Builder` with the type-specific values stored in this ` Entry`.

### Inherited properties

From [androidx.media3.extractor.metadata.id3.Id3Frame](https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/Id3Frame) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/Id3Frame#id()`

The frame ID.

## Constants

### ID

```
const val ID = "CHAP": String!
```

## Public constructors

### ChapterFrame

```
ChapterFrame(
    chapterId: String!,
    startTimeMs: Int,
    endTimeMs: Int,
    startOffset: Long,
    endOffset: Long,
    subFrames: Array<Id3Frame!>!
)
```

## Public functions

### equals

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

### getEndTimeMs

```
fun getEndTimeMs(): Long
```

Returns the end time of the chapter in milliseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if unknown.

### getStartTimeMs

```
fun getStartTimeMs(): Long
```

Returns the start time of the chapter in milliseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if unknown.

### getSubFrame

```
fun getSubFrame(index: Int): Id3Frame!
```

Returns the sub-frame at `index`.

### getSubFrameCount

```
fun getSubFrameCount(): Int
```

Returns the number of sub-frames.

### hashCode

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

### isHidden

```
fun isHidden(): Boolean
```

Returns whether the chapter is hidden.

A hidden chapter should not be shown in a table of contents UI, but should not affect playback.

## Public properties

### chapterId

```
val chapterId: String!
```

### endOffset

```
val endOffset: Long
```

The byte offset of the end of the chapter, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if not set.

### endTimeMs

```
val endTimeMs: Int
```

### startOffset

```
val startOffset: Long
```

The byte offset of the start of the chapter, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if not set.

### startTimeMs

```
val startTimeMs: Int
```

### title

```
val title: Label?
```