# ChunkIndexProvider

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/extractor/ChunkIndexProvider "View this page in Java")

<br />

```
@UnstableApi
interface ChunkIndexProvider
```

<br />

*** ** * ** ***

An interface for objects that can provide a[ChunkIndex](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ChunkIndex).

This should be implemented by classes, typically a[SeekMap](https://developer.android.com/reference/kotlin/androidx/media3/extractor/SeekMap), that are used in contexts where a[ChunkIndex](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ChunkIndex)is required to access sample-level information. For example, chunk sources for adaptive streaming formats like DASH require a`ChunkIndex`to locate samples within a media segment.

## Summary

|                                         ### Public functions                                         |
|------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ChunkIndex](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ChunkIndex)`?` | [getChunkIndex](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ChunkIndexProvider#getChunkIndex())`()` Returns a[ChunkIndex](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ChunkIndex)for use by chunk-based media sources, or`null`if not applicable. |

## Public functions

### getChunkIndex

```
fun getChunkIndex(): ChunkIndex?
```

Returns a[ChunkIndex](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ChunkIndex)for use by chunk-based media sources, or`null`if not applicable.