# CompositeSequenceableLoader

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

*** ** * ** ***


```
@UnstableApi
public final class CompositeSequenceableLoader implements SequenceableLoader
```

<br />

*** ** * ** ***

A `https://developer.android.com/reference/androidx/media3/exoplayer/source/SequenceableLoader` that encapsulates multiple other `https://developer.android.com/reference/androidx/media3/exoplayer/source/SequenceableLoader`s.

## Summary

| ### Public constructors |
|---|
| `[CompositeSequenceableLoader](https://developer.android.com/reference/androidx/media3/exoplayer/source/CompositeSequenceableLoader#CompositeSequenceableLoader(androidx.media3.exoplayer.source.SequenceableLoader[]))(SequenceableLoader[] loaders)` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/media3/exoplayer/source/CompositeSequenceableLoader#CompositeSequenceableLoader(java.util.List<? extends androidx.media3.exoplayer.source.SequenceableLoader>,java.util.List<java.util.List<java.lang.Integer>>)` instead. <br /> |
| `https://developer.android.com/reference/androidx/media3/exoplayer/source/CompositeSequenceableLoader#CompositeSequenceableLoader(java.util.List<? extends androidx.media3.exoplayer.source.SequenceableLoader>,java.util.List<java.util.List<java.lang.Integer>>)( https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/source/SequenceableLoader> loaders, https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/media3/common/C.TrackType https://developer.android.com/reference/java/lang/Integer.html>> loaderTrackTypes )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/CompositeSequenceableLoader#continueLoading(androidx.media3.exoplayer.LoadingInfo)(https://developer.android.com/reference/androidx/media3/exoplayer/LoadingInfo loadingInfo)` Attempts to continue loading. |
| `long` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/CompositeSequenceableLoader#getBufferedPositionUs()()` Returns an estimate of the position up to which data is buffered. |
| `long` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/CompositeSequenceableLoader#getNextLoadPositionUs()()` Returns the next load time, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_END_OF_SOURCE()` if loading has finished. |
| `boolean` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/CompositeSequenceableLoader#isLoading()()` Returns whether the loader is currently loading. |
| `void` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/CompositeSequenceableLoader#reevaluateBuffer(long)(long positionUs)` Re-evaluates the buffer given the playback position. |

## Public constructors

### CompositeSequenceableLoader

```
public [CompositeSequenceableLoader](https://developer.android.com/reference/androidx/media3/exoplayer/source/CompositeSequenceableLoader#CompositeSequenceableLoader(androidx.media3.exoplayer.source.SequenceableLoader[]))(SequenceableLoader[] loaders)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/media3/exoplayer/source/CompositeSequenceableLoader#CompositeSequenceableLoader(java.util.List<? extends androidx.media3.exoplayer.source.SequenceableLoader>,java.util.List<java.util.List<java.lang.Integer>>)` instead.

### CompositeSequenceableLoader

```
public CompositeSequenceableLoader(
    List<SequenceableLoader> loaders,
    List<List<@C.TrackType Integer>> loaderTrackTypes
)
```

## Public methods

### continueLoading

```
public boolean continueLoading(LoadingInfo loadingInfo)
```

Attempts to continue loading.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/LoadingInfo loadingInfo` | The `https://developer.android.com/reference/androidx/media3/exoplayer/LoadingInfo` when attempting to continue loading. |

| Returns |
|---|---|
| `boolean` | True if progress was made, meaning that `https://developer.android.com/reference/androidx/media3/exoplayer/source/SequenceableLoader#getNextLoadPositionUs()` will return a different value than prior to the call. False otherwise. |

### getBufferedPositionUs

```
public long getBufferedPositionUs()
```

Returns an estimate of the position up to which data is buffered.

| Returns |
|---|---|
| `long` | An estimate of the absolute position in microseconds up to which data is buffered, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_END_OF_SOURCE()` if the data is fully buffered. |

### getNextLoadPositionUs

```
public long getNextLoadPositionUs()
```

Returns the next load time, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_END_OF_SOURCE()` if loading has finished.

### isLoading

```
public boolean isLoading()
```

Returns whether the loader is currently loading.

### reevaluateBuffer

```
public void reevaluateBuffer(long positionUs)
```

Re-evaluates the buffer given the playback position.

Re-evaluation may discard buffered media or cancel ongoing loads so that media can be re-buffered in a different quality.

| Parameters |
|---|---|
| `long positionUs` | The current playback position in microseconds. If playback of this period has not yet started, the value will be the starting position in this period minus the duration of any media in previous periods still to be played. |