# 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
public final class LoadEventInfo
```

<br />

*** ** * ** ***

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

## Summary

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

| ### Public fields |
|---|---|
| `final long` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/LoadEventInfo#bytesLoaded()` The number of bytes that were loaded up to the event time. |
| `final https://developer.android.com/reference/androidx/media3/datasource/DataSpec` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/LoadEventInfo#dataSpec()` Defines the requested data. |
| `final long` | `https://developer.android.com/reference/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. |
| `final long` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/LoadEventInfo#loadDurationMs()` The duration of the load up to the event time. |
| `final long` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/LoadEventInfo#loadTaskId()` Identifies the load task to which this event corresponds. |
| `final https://developer.android.com/reference/java/util/Map.html<https://developer.android.com/reference/java/lang/String.html, https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/lang/String.html>>` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/LoadEventInfo#responseHeaders()` The response headers associated with the load, or an empty map if unavailable. |
| `final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/LoadEventInfo#steeredPathwayId()` The ID of the steered pathway from which data is being loaded, or `null` if not applicable. |
| `final https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/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](https://developer.android.com/reference/androidx/media3/exoplayer/source/LoadEventInfo#LoadEventInfo(long,androidx.media3.datasource.DataSpec,long))( long loadTaskId, https://developer.android.com/reference/androidx/media3/datasource/DataSpec dataSpec, long elapsedRealtimeMs )` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/media3/exoplayer/source/LoadEventInfo.Builder` instead. <br /> |
| `[LoadEventInfo](https://developer.android.com/reference/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))( long loadTaskId, https://developer.android.com/reference/androidx/media3/datasource/DataSpec dataSpec, https://developer.android.com/reference/android/net/Uri.html uri, https://developer.android.com/reference/java/util/Map.html<https://developer.android.com/reference/java/lang/String.html, https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/lang/String.html>> responseHeaders, long elapsedRealtimeMs, long loadDurationMs, long bytesLoaded )` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/media3/exoplayer/source/LoadEventInfo.Builder` instead. <br /> |

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

## Public fields

### bytesLoaded

```
public final long bytesLoaded
```

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

### dataSpec

```
public final DataSpec dataSpec
```

Defines the requested data.

### elapsedRealtimeMs

```
public final long elapsedRealtimeMs
```

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

### loadDurationMs

```
public final long loadDurationMs
```

The duration of the load up to the event time.

### loadTaskId

```
public final long loadTaskId
```

Identifies the load task to which this event corresponds.

### responseHeaders

```
public final Map<String, List<String>> responseHeaders
```

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

### steeredPathwayId

```
public final @Nullable String steeredPathwayId
```

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

### uri

```
public final 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/androidx/media3/exoplayer/source/LoadEventInfo#dataSpec()`.uri unless redirection has occurred. If redirection has occurred, this is the uri after redirection.

## Public constructors

### LoadEventInfo

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

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

### LoadEventInfo

```
public [LoadEventInfo](https://developer.android.com/reference/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))(
    long loadTaskId,
    DataSpec dataSpec,
    Uri uri,
    Map<String, List<String>> responseHeaders,
    long elapsedRealtimeMs,
    long loadDurationMs,
    long bytesLoaded
)
```

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

## Public methods

### buildUpon

```
public LoadEventInfo.Builder buildUpon()
```

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

### copyWithTaskIdAndDurationMs

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

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

### getNewId

```
public static long getNewId()
```

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