# LoadEventInfo

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

*** ** * ** ***


```
@UnstableApi
class LoadEventInfo
```

<br />

*** ** * ** ***

`https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/MediaSource` load event information.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo`. |

| ### Public constructors |
|---|
| `[LoadEventInfo](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#LoadEventInfo(long,androidx.media3.datasource.DataSpec,long))( loadTaskId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, dataSpec: https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec!, elapsedRealtimeMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder` instead. <br /> |
| `[LoadEventInfo](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#LoadEventInfo(long,androidx.media3.datasource.DataSpec,android.net.Uri,java.util.Map<java.lang.String,java.util.List<java.lang.String>>,long,long,long))( loadTaskId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, dataSpec: https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec!, uri: https://developer.android.com/reference/android/net/Uri.html!, responseHeaders: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!>!, elapsedRealtimeMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, loadDurationMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, bytesLoaded: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder` instead. <br /> |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#buildUpon()()` Initializes a new `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder` with the values from this instance. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo!` | `[copyWithTaskIdAndDurationMs](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#copyWithTaskIdAndDurationMs(long,long))(loadTaskId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, loadDurationMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#buildUpon()` instead. <br /> |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#getNewId()()` Returns an non-negative identifier which is unique to the JVM instance. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#bytesLoaded()` The number of bytes that were loaded up to the event time. |
| `https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#dataSpec()` Defines the requested data. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#elapsedRealtimeMs()` The value of `https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtime()` at the time of the load event. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#loadDurationMs()` The duration of the load up to the event time. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#loadTaskId()` Identifies the load task to which this event corresponds. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#responseHeaders()` The response headers associated with the load, or an empty map if unavailable. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#steeredPathwayId()` The ID of the steered pathway from which data is being loaded, or `null` if not applicable. |
| `https://developer.android.com/reference/android/net/Uri.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#uri()` The `https://developer.android.com/reference/android/net/Uri.html` from which data is being read. |

## Public constructors

### LoadEventInfo

```
[LoadEventInfo](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#LoadEventInfo(long,androidx.media3.datasource.DataSpec,long))(
    loadTaskId: Long,
    dataSpec: DataSpec!,
    elapsedRealtimeMs: Long
)
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder` instead.

### LoadEventInfo

```
[LoadEventInfo](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#LoadEventInfo(long,androidx.media3.datasource.DataSpec,android.net.Uri,java.util.Map<java.lang.String,java.util.List<java.lang.String>>,long,long,long))(
    loadTaskId: Long,
    dataSpec: DataSpec!,
    uri: Uri!,
    responseHeaders: (Mutable)Map<String!, (Mutable)List<String!>!>!,
    elapsedRealtimeMs: Long,
    loadDurationMs: Long,
    bytesLoaded: Long
)
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder` instead.

## Public functions

### buildUpon

```
fun buildUpon(): LoadEventInfo.Builder!
```

Initializes a new `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder` with the values from this instance.

### copyWithTaskIdAndDurationMs

```
fun [copyWithTaskIdAndDurationMs](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#copyWithTaskIdAndDurationMs(long,long))(loadTaskId: Long, loadDurationMs: Long): LoadEventInfo!
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#buildUpon()` instead.

### getNewId

```
java-static fun getNewId(): Long
```

Returns an non-negative identifier which is unique to the JVM instance.

## Public properties

### bytesLoaded

```
val bytesLoaded: Long
```

The number of bytes that were loaded up to the event time.

### dataSpec

```
val dataSpec: DataSpec!
```

Defines the requested data.

### elapsedRealtimeMs

```
val elapsedRealtimeMs: Long
```

The value of `https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtime()` at the time of the load event.

### loadDurationMs

```
val loadDurationMs: Long
```

The duration of the load up to the event time.

### loadTaskId

```
val loadTaskId: Long
```

Identifies the load task to which this event corresponds.

### responseHeaders

```
val responseHeaders: (Mutable)Map<String!, (Mutable)List<String!>!>!
```

The response headers associated with the load, or an empty map if unavailable.

### steeredPathwayId

```
val steeredPathwayId: String?
```

The ID of the steered pathway from which data is being loaded, or `null` if not applicable.

### uri

```
val uri: Uri!
```

The `https://developer.android.com/reference/android/net/Uri.html` from which data is being read. The uri will be identical to the one in `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#dataSpec()`.uri unless redirection has occurred. If redirection has occurred, this is the uri after redirection.