# UnsupportedDrmException

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

*** ** * ** ***


```
@UnstableApi
class UnsupportedDrmException : Exception
```

<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) ||
|   |   | ↳ | [androidx.media3.exoplayer.drm.UnsupportedDrmException](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException) |

*** ** * ** ***

Thrown when the requested DRM scheme is not supported.

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/java/lang/annotation/Target.html(value = ) @https://developer.android.com/reference/kotlin/androidx/annotation/IntDef(value = ) annotation https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException.Reason` The reason for the exception. |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException#REASON_INSTANTIATION_ERROR() = 2` There device advertises support for the requested DRM scheme, but there was an error instantiating it. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException#REASON_UNSUPPORTED_SCHEME() = 1` The requested DRM scheme is unsupported by the device. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException#UnsupportedDrmException(int)(@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException.Reason reason: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException#UnsupportedDrmException(int,java.lang.Exception)( @https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException.Reason reason: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, cause: https://developer.android.com/reference/java/lang/Exception.html! )` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException.Reason https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException#reason()` Either `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException#REASON_UNSUPPORTED_SCHEME()` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException#REASON_INSTANTIATION_ERROR()`. |

| ### 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()` | |

## Constants

### REASON_INSTANTIATION_ERROR

```
const val REASON_INSTANTIATION_ERROR = 2: Int
```

There device advertises support for the requested DRM scheme, but there was an error instantiating it. The cause can be retrieved using `https://developer.android.com/reference/java/lang/Throwable.html#getCause()`.

### REASON_UNSUPPORTED_SCHEME

```
const val REASON_UNSUPPORTED_SCHEME = 1: Int
```

The requested DRM scheme is unsupported by the device.

## Public constructors

### UnsupportedDrmException

```
UnsupportedDrmException(@UnsupportedDrmException.Reason reason: Int)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException.Reason reason: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException#REASON_UNSUPPORTED_SCHEME()` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException#REASON_INSTANTIATION_ERROR()`. |

### UnsupportedDrmException

```
UnsupportedDrmException(
    @UnsupportedDrmException.Reason reason: Int,
    cause: Exception!
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException.Reason reason: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException#REASON_UNSUPPORTED_SCHEME()` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException#REASON_INSTANTIATION_ERROR()`. |
| `cause: https://developer.android.com/reference/java/lang/Exception.html!` | The cause of this exception. |

## Public properties

### reason

```
@UnsupportedDrmException.Reason
val reason: Int
```

Either `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException#REASON_UNSUPPORTED_SCHEME()` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/UnsupportedDrmException#REASON_INSTANTIATION_ERROR()`.