# LoadEventInfo.Builder

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.Builder)

*** ** * ** ***


```
class LoadEventInfo.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder#Builder(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)` Creates a builder. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder#build()()` Builds the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder#setBytesLoaded(long)(bytesLoaded: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#bytesLoaded()`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder#setDataSpec(androidx.media3.datasource.DataSpec)(dataSpec: https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec!)` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#dataSpec()`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder#setElapsedRealtimeMs(long)(elapsedRealtimeMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#elapsedRealtimeMs()`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder#setLoadDurationMs(long)(loadDurationMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#loadDurationMs()`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder#setLoadTaskId(long)(loadTaskId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#loadTaskId()`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder#setResponseHeaders(java.util.Map<java.lang.String,java.util.List<java.lang.String>>)( 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!>!>! )` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#responseHeaders()`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder#setSteeredPathwayId(java.lang.String)(steeredPathwayId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#steeredPathwayId()`, the default is `null`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder#setUri(android.net.Uri)(uri: https://developer.android.com/reference/android/net/Uri.html!)` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#uri()`. |

## Public constructors

### Builder

```
Builder(loadTaskId: Long, dataSpec: DataSpec!, elapsedRealtimeMs: Long)
```

Creates a builder.

| Parameters |
|---|---|
| `loadTaskId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#loadTaskId()`. |
| `dataSpec: https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec!` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#dataSpec()`. |
| `elapsedRealtimeMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#elapsedRealtimeMs()`. |

## Public functions

### build

```
fun build(): LoadEventInfo!
```

Builds the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo`.

### setBytesLoaded

```
@CanIgnoreReturnValue
fun setBytesLoaded(bytesLoaded: Long): LoadEventInfo.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#bytesLoaded()`.

| Parameters |
|---|---|
| `bytesLoaded: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#bytesLoaded()`. The default is 0. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | This builder. |

### setDataSpec

```
@CanIgnoreReturnValue
fun setDataSpec(dataSpec: DataSpec!): LoadEventInfo.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#dataSpec()`.

This also sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#uri()` to the `https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec#uri()` of the given `https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec`. If you need to set the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#uri()` to a different value, call `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder#setUri(android.net.Uri)` to override it.

| Parameters |
|---|---|
| `dataSpec: https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec!` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#dataSpec()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | This builder. |

### setElapsedRealtimeMs

```
@CanIgnoreReturnValue
fun setElapsedRealtimeMs(elapsedRealtimeMs: Long): LoadEventInfo.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#elapsedRealtimeMs()`.

| Parameters |
|---|---|
| `elapsedRealtimeMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#elapsedRealtimeMs()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | This builder. |

### setLoadDurationMs

```
@CanIgnoreReturnValue
fun setLoadDurationMs(loadDurationMs: Long): LoadEventInfo.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#loadDurationMs()`.

| Parameters |
|---|---|
| `loadDurationMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#loadDurationMs()`. The default is 0. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | This builder. |

### setLoadTaskId

```
@CanIgnoreReturnValue
fun setLoadTaskId(loadTaskId: Long): LoadEventInfo.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#loadTaskId()`.

| Parameters |
|---|---|
| `loadTaskId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#loadTaskId()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | This builder. |

### setResponseHeaders

```
@CanIgnoreReturnValue
fun setResponseHeaders(
    responseHeaders: (Mutable)Map<String!, (Mutable)List<String!>!>!
): LoadEventInfo.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#responseHeaders()`.

| Parameters |
|---|---|
| `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!>!>!` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#responseHeaders()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | This builder. |

### setSteeredPathwayId

```
@CanIgnoreReturnValue
fun setSteeredPathwayId(steeredPathwayId: String?): LoadEventInfo.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#steeredPathwayId()`, the default is `null`.

| Parameters |
|---|---|
| `steeredPathwayId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#steeredPathwayId()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | This builder. |

### setUri

```
@CanIgnoreReturnValue
fun setUri(uri: Uri!): LoadEventInfo.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#uri()`.

| Parameters |
|---|---|
| `uri: https://developer.android.com/reference/android/net/Uri.html!` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo#uri()`. The default is `dataSpec.uri`, where `https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec` is the one passed to the builder constructor or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder#setDataSpec(androidx.media3.datasource.DataSpec)`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/LoadEventInfo.Builder!` | This builder. |