# MediaDrmCallbackException

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

*** ** * ** ***


```
@UnstableApi
class MediaDrmCallbackException : IOException
```

<br />

|---|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) ||||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) |||
|   |   | ↳ | [java.io.IOException](https://developer.android.com/reference/java/io/IOException.html) ||
|   |   |   | ↳ | [androidx.media3.exoplayer.drm.MediaDrmCallbackException](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/MediaDrmCallbackException) |

*** ** * ** ***

Thrown when an error occurs while executing a DRM `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/MediaDrmCallback#executeKeyRequest(java.util.UUID,androidx.media3.exoplayer.drm.ExoMediaDrm.KeyRequest)` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/MediaDrmCallback#executeProvisionRequest(java.util.UUID,androidx.media3.exoplayer.drm.ExoMediaDrm.ProvisionRequest)` request.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/MediaDrmCallbackException#MediaDrmCallbackException(androidx.media3.datasource.DataSpec,android.net.Uri,java.util.Map<java.lang.String,java.util.List<java.lang.String>>,long,java.lang.Throwable)( dataSpec: https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec!, uriAfterRedirects: 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!>!>!, bytesLoaded: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html! )` Creates a new instance with the given values. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/MediaDrmCallbackException#bytesLoaded()` The number of bytes obtained from the server. |
| `https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/MediaDrmCallbackException#dataSpec()` The `https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec` associated with the request. |
| `(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/drm/MediaDrmCallbackException#responseHeaders()` The HTTP request headers included in the response. |
| `https://developer.android.com/reference/android/net/Uri.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/MediaDrmCallbackException#uriAfterRedirects()` The `https://developer.android.com/reference/android/net/Uri.html` after redirections, or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/MediaDrmCallbackException#dataSpec()` if no redirection occurred. |

| ### Inherited functions |
|---|
| From [java.lang.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |---|---| | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/add-suppressed.html(exception: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!)` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/fill-in-stack-trace.html()` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-cause.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-localized-message.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-message.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html!>!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-stack-trace.html()` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!>!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-suppressed.html()` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/init-cause.html(cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!)` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/set-stack-trace.html(stackTrace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html!>!)` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/to-string.html()` | |

## Public constructors

### MediaDrmCallbackException

```
MediaDrmCallbackException(
    dataSpec: DataSpec!,
    uriAfterRedirects: Uri!,
    responseHeaders: (Mutable)Map<String!, (Mutable)List<String!>!>!,
    bytesLoaded: Long,
    cause: Throwable!
)
```

Creates a new instance with the given values.

| Parameters |
|---|---|
| `dataSpec: https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec!` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/MediaDrmCallbackException#dataSpec()`. |
| `uriAfterRedirects: https://developer.android.com/reference/android/net/Uri.html!` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/MediaDrmCallbackException#uriAfterRedirects()`. |
| `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/drm/MediaDrmCallbackException#responseHeaders()`. |
| `bytesLoaded: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/MediaDrmCallbackException#bytesLoaded()`. |
| `cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | The cause of the exception. |

## Public properties

### bytesLoaded

```
val bytesLoaded: Long
```

The number of bytes obtained from the server.

### dataSpec

```
val dataSpec: DataSpec!
```

The `https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSpec` associated with the request.

### responseHeaders

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

The HTTP request headers included in the response.

### uriAfterRedirects

```
val uriAfterRedirects: Uri!
```

The `https://developer.android.com/reference/android/net/Uri.html` after redirections, or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/MediaDrmCallbackException#dataSpec()` if no redirection occurred.