# FrameworkCryptoConfig

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

*** ** * ** ***

<br />

```
@UnstableApi
class FrameworkCryptoConfig : CryptoConfig
```

<br />

*** ** * ** ***

A `https://developer.android.com/reference/kotlin/androidx/media3/decoder/CryptoConfig` for `https://developer.android.com/reference/kotlin/androidx/media3/common/C#CRYPTO_TYPE_FRAMEWORK()`. Contains the necessary information to build or update a framework `https://developer.android.com/reference/android/media/MediaCrypto.html` that can be used to configure a `https://developer.android.com/reference/android/media/MediaCodec.html`.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/FrameworkCryptoConfig#WORKAROUND_DEVICE_NEEDS_KEYS_TO_CONFIGURE_CODEC()` Whether the device needs keys to have been loaded into the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSession` before codec configuration. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/FrameworkCryptoConfig#FrameworkCryptoConfig(java.util.UUID,byte[])(uuid: https://developer.android.com/reference/java/util/UUID.html!, sessionId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!)` Constructs an instance. |
| `[FrameworkCryptoConfig](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/FrameworkCryptoConfig#FrameworkCryptoConfig(java.util.UUID,byte[],boolean))( uuid: https://developer.android.com/reference/java/util/UUID.html!, sessionId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!, forceAllowInsecureDecoderComponents: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/FrameworkCryptoConfig#FrameworkCryptoConfig(java.util.UUID,byte[])` instead, and `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/ExoMediaDrm#requiresSecureDecoder(byte[],java.lang.String)` for the secure decoder handling logic. <br /> |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/FrameworkCryptoConfig#forceAllowInsecureDecoderComponents()` **This property is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/ExoMediaDrm#requiresSecureDecoder(byte[],java.lang.String)` instead, which incorporates this logic. <br /> |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/FrameworkCryptoConfig#sessionId()` The DRM session id. |
| `https://developer.android.com/reference/java/util/UUID.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/FrameworkCryptoConfig#uuid()` The DRM scheme UUID. |

## Constants

### WORKAROUND_DEVICE_NEEDS_KEYS_TO_CONFIGURE_CODEC

```
const val WORKAROUND_DEVICE_NEEDS_KEYS_TO_CONFIGURE_CODEC: Boolean
```

Whether the device needs keys to have been loaded into the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSession` before codec configuration.

## Public constructors

### FrameworkCryptoConfig

```
FrameworkCryptoConfig(uuid: UUID!, sessionId: ByteArray<Byte>!)
```

Constructs an instance.

| Parameters |
|---|---|
| `uuid: https://developer.android.com/reference/java/util/UUID.html!` | The DRM scheme UUID. |
| `sessionId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | The DRM session id. |

### FrameworkCryptoConfig

```
[FrameworkCryptoConfig](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/FrameworkCryptoConfig#FrameworkCryptoConfig(java.util.UUID,byte[],boolean))(
    uuid: UUID!,
    sessionId: ByteArray<Byte>!,
    forceAllowInsecureDecoderComponents: Boolean
)
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/FrameworkCryptoConfig#FrameworkCryptoConfig(java.util.UUID,byte[])` instead, and `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/ExoMediaDrm#requiresSecureDecoder(byte[],java.lang.String)` for the secure decoder handling logic.

## Public properties

### forceAllowInsecureDecoderComponents

```
val forceAllowInsecureDecoderComponents: Boolean
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/ExoMediaDrm#requiresSecureDecoder(byte[],java.lang.String)` instead, which incorporates this logic.

### sessionId

```
val sessionId: Array<Byte>!
```

The DRM session id.

### uuid

```
val uuid: UUID!
```

The DRM scheme UUID.