docs/doc/reference/com/google/android/exoplayer2/source/chunk/MediaChunkIterator.html
Package com.google.android.exoplayer2.source.chunk
BaseMediaChunkIterator, DefaultDashChunkSource.RepresentationSegmentIterator, FakeAdaptiveDataSet.Iterator, FakeMediaChunkIterator[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public interfaceMediaChunkIterator
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Iterator for media chunk sequences.
The iterator initially points in front of the first available element. The first call to next() moves the iterator to the first element. Check the return value of next() or isEnded() to determine whether the iterator reached the end of the available data.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static MediaChunkIterator | EMPTY |
Deprecated.
An empty media chunk iterator without available data. |
All Methods Instance Methods Abstract Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| long | getChunkEndTimeUs() |
Deprecated.
Returns the media end time of the chunk, in microseconds.
|
| long | getChunkStartTimeUs() |
Deprecated.
Returns the media start time of the chunk, in microseconds.
|
| DataSpec | getDataSpec() |
Deprecated.
Returns the DataSpec used to load the media chunk.
|
| boolean | isEnded() |
Deprecated.
Returns whether the iteration has reached the end of the available data.
|
| boolean | next() |
Deprecated.
Moves the iterator to the next media chunk.
|
| void | reset() |
Deprecated.
Resets the iterator to the initial position. |
-
static final[MediaChunkIterator](MediaChunkIterator.html "interface in com.google.android.exoplayer2.source.chunk")EMPTY
Deprecated.
An empty media chunk iterator without available data.
-
boolean isEnded()
Deprecated.
Returns whether the iteration has reached the end of the available data.
-
boolean next()
Deprecated.
Moves the iterator to the next media chunk.
Check the return value or isEnded() to determine whether the iterator reached the end of the available data.
Returns:Whether the iterator points to a media chunk with available data.
-
[DataSpec](../../upstream/DataSpec.html "class in com.google.android.exoplayer2.upstream")getDataSpec()
Deprecated.
Returns the DataSpec used to load the media chunk.
Throws:NoSuchElementException - If the method is called before the first call to next() or when isEnded() is true.
-
long getChunkStartTimeUs()
Deprecated.
Returns the media start time of the chunk, in microseconds.
Throws:NoSuchElementException - If the method is called before the first call to next() or when isEnded() is true.
-
long getChunkEndTimeUs()
Deprecated.
Returns the media end time of the chunk, in microseconds.
Throws:NoSuchElementException - If the method is called before the first call to next() or when isEnded() is true.
-
void reset()
Deprecated.
Resets the iterator to the initial position.