# DefaultPreloadManager.PreloadStatus

# DefaultPreloadManager.PreloadStatus

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/preload/DefaultPreloadManager.java+class:androidx.media3.exoplayer.source.preload.DefaultPreloadManager.PreloadStatus)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus "View this page in Java")

<br />

```
class DefaultPreloadManager.PreloadStatus
```

<br />

*** ** * ** ***

Defines the preload status for the[DefaultPreloadManager](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager).

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                                             ### Nested types                                                                                                                                                                                                                                                                                                                                                                                                                              |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `@`[Documented](https://developer.android.com/reference/java/lang/annotation/Documented.html) `@`[Retention](https://developer.android.com/reference/java/lang/annotation/Retention.html)`(value = `[RetentionPolicy.SOURCE](https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE)`)` `@`[Target](https://developer.android.com/reference/java/lang/annotation/Target.html)`(value = `[ElementType.TYPE_USE](https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE)`)` `@`[IntDef](https://developer.android.com/reference/kotlin/androidx/annotation/IntDef)`(value = )` `annotation `[DefaultPreloadManager.PreloadStatus.Stage](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus.Stage) Stages for the preload status. |

|                                                                                 ### Constants                                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[DefaultPreloadManager.PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)`!` | [PRELOAD_STATUS_NOT_PRELOADED](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#PRELOAD_STATUS_NOT_PRELOADED()) A[PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)indicating that the media item should not be preloaded.                       |
| `const `[DefaultPreloadManager.PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)`!` | [PRELOAD_STATUS_SOURCE_PREPARED](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#PRELOAD_STATUS_SOURCE_PREPARED()) A[PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)indicating that the source has completed preparation.                     |
| `const `[DefaultPreloadManager.PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)`!` | [PRELOAD_STATUS_TRACKS_SELECTED](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#PRELOAD_STATUS_TRACKS_SELECTED()) A[PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)indicating that the source has tracks selected.                           |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                           | [STAGE_NOT_PRELOADED](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#STAGE_NOT_PRELOADED())` = -2147483648` The media item has not preloaded yet.                                                                                                                                                                                        |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                           | [STAGE_SOURCE_PREPARED](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#STAGE_SOURCE_PREPARED())` = 0` The[PreloadMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/PreloadMediaSource)has completed preparation.                                                                      |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                           | [STAGE_SPECIFIED_RANGE_CACHED](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#STAGE_SPECIFIED_RANGE_CACHED())` = -1` The media item has been cached for a specific range defined by`startPositionMs`and`durationMs`.                                                                                                                     |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                           | [STAGE_SPECIFIED_RANGE_LOADED](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#STAGE_SPECIFIED_RANGE_LOADED())` = 2` The[PreloadMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/PreloadMediaSource)has been loaded for a specific range defined by` startPositionMs`and`durationMs`. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                           | [STAGE_TRACKS_SELECTED](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#STAGE_TRACKS_SELECTED())` = 1` The[PreloadMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/PreloadMediaSource)has tracks selected.                                                                            |

|                                                                                ### Public functions                                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                                                 | [equals](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#equals(java.lang.Object))`(obj: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)`                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                                         | [hashCode](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#hashCode())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `java-static `[DefaultPreloadManager.PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)`!` | [specifiedRangeCached](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#specifiedRangeCached(long))`(durationMs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Returns a[PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)indicating to cache the media item from the default start position and for the specified duration (in milliseconds).                                                                                                                            |
| `java-static `[DefaultPreloadManager.PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)`!` | [specifiedRangeCached](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#specifiedRangeCached(long,long))`(startPositionMs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`, durationMs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Returns a[PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)indicating to cache the media item from the specified start position (in milliseconds) and for the specified duration (in milliseconds). |
| `java-static `[DefaultPreloadManager.PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)`!` | [specifiedRangeLoaded](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#specifiedRangeLoaded(long))`(durationMs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Returns a[PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)indicating to load the source from the default start position and for the specified duration (in milliseconds).                                                                                                                                 |
| `java-static `[DefaultPreloadManager.PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)`!` | [specifiedRangeLoaded](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#specifiedRangeLoaded(long,long))`(startPositionMs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`, durationMs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Returns a[PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)indicating to load the source from the specified start position (in milliseconds) and for the specified duration (in milliseconds).      |

|                             ### Public properties                             |
|-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | [durationMs](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#durationMs()) The duration in milliseconds for which the source should be loaded from the` startPositionMs`, or[TIME_UNSET](https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET())to indicate that the source should be loaded to end of source. |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)   | `@`[DefaultPreloadManager.PreloadStatus.Stage](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus.Stage) [stage](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#stage()) The stage for the preload status.                                                         |
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | [startPositionMs](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus#startPositionMs()) The start position in milliseconds from which the source should be loaded, or[TIME_UNSET](https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET())to indicate the default start position.                                  |

## Constants

### PRELOAD_STATUS_NOT_PRELOADED

```
const val PRELOAD_STATUS_NOT_PRELOADED: DefaultPreloadManager.PreloadStatus!
```

A[PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)indicating that the media item should not be preloaded.  

### PRELOAD_STATUS_SOURCE_PREPARED

```
const val PRELOAD_STATUS_SOURCE_PREPARED: DefaultPreloadManager.PreloadStatus!
```

A[PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)indicating that the source has completed preparation.  

### PRELOAD_STATUS_TRACKS_SELECTED

```
const val PRELOAD_STATUS_TRACKS_SELECTED: DefaultPreloadManager.PreloadStatus!
```

A[PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)indicating that the source has tracks selected.  

### STAGE_NOT_PRELOADED

```
const val STAGE_NOT_PRELOADED = -2147483648: Int
```

The media item has not preloaded yet.  

### STAGE_SOURCE_PREPARED

```
const val STAGE_SOURCE_PREPARED = 0: Int
```

The[PreloadMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/PreloadMediaSource)has completed preparation.  

### STAGE_SPECIFIED_RANGE_CACHED

```
const val STAGE_SPECIFIED_RANGE_CACHED = -1: Int
```

The media item has been cached for a specific range defined by`startPositionMs`and`durationMs`.  

### STAGE_SPECIFIED_RANGE_LOADED

```
const val STAGE_SPECIFIED_RANGE_LOADED = 2: Int
```

The[PreloadMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/PreloadMediaSource)has been loaded for a specific range defined by`
startPositionMs`and`durationMs`.  

### STAGE_TRACKS_SELECTED

```
const val STAGE_TRACKS_SELECTED = 1: Int
```

The[PreloadMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/PreloadMediaSource)has tracks selected.  

## Public functions

### equals

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

### hashCode

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

### specifiedRangeCached

```
java-static fun specifiedRangeCached(durationMs: Long): DefaultPreloadManager.PreloadStatus!
```

Returns a[PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)indicating to cache the media item from the default start position and for the specified duration (in milliseconds).  

### specifiedRangeCached

```
java-static fun specifiedRangeCached(startPositionMs: Long, durationMs: Long): DefaultPreloadManager.PreloadStatus!
```

Returns a[PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)indicating to cache the media item from the specified start position (in milliseconds) and for the specified duration (in milliseconds).  

### specifiedRangeLoaded

```
java-static fun specifiedRangeLoaded(durationMs: Long): DefaultPreloadManager.PreloadStatus!
```

Returns a[PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)indicating to load the source from the default start position and for the specified duration (in milliseconds).  

### specifiedRangeLoaded

```
java-static fun specifiedRangeLoaded(startPositionMs: Long, durationMs: Long): DefaultPreloadManager.PreloadStatus!
```

Returns a[PreloadStatus](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.PreloadStatus)indicating to load the source from the specified start position (in milliseconds) and for the specified duration (in milliseconds).  

## Public properties

### durationMs

```
val durationMs: Long
```

The duration in milliseconds for which the source should be loaded from the`
startPositionMs`, or[TIME_UNSET](https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET())to indicate that the source should be loaded to end of source.  

### stage

```
@DefaultPreloadManager.PreloadStatus.Stage
val stage: Int
```

The stage for the preload status.  

### startPositionMs

```
val startPositionMs: Long
```

The start position in milliseconds from which the source should be loaded, or[TIME_UNSET](https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET())to indicate the default start position.