Package com.google.android.exoplayer2.drm

## Class LocalMediaDrmCallback

- java.lang.Object
- - com.google.android.exoplayer2.drm.LocalMediaDrmCallback

- All Implemented Interfaces:
    `MediaDrmCallback`

      public final class LocalMediaDrmCallback
      extends Object
      implements MediaDrmCallback

  A `MediaDrmCallback` that provides a fixed response to key requests. Provisioning is not supported. This implementation is primarily useful for providing locally stored keys to decrypt ClearKey protected content. It is not suitable for use with Widevine or PlayReady protected content.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `LocalMediaDrmCallback​(byte[] keyResponse)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `byte[]` | `executeKeyRequest​(UUID uuid, ExoMediaDrm.KeyRequest request)` | Executes a key request.
    `byte[]` | `executeProvisionRequest​(UUID uuid, ExoMediaDrm.ProvisionRequest request)` | Executes a provisioning request.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LocalMediaDrmCallback

          public LocalMediaDrmCallback​(byte[] keyResponse)

      Parameters:
        `keyResponse` - The fixed response for all key requests.

  - ### Method Detail

    - #### executeProvisionRequest

          public byte[] executeProvisionRequest​(UUID uuid,
                                                ExoMediaDrm.ProvisionRequest request)

      Description copied from interface: `MediaDrmCallback`
      Executes a provisioning request.
      Specified by:
        `executeProvisionRequest` in interface `MediaDrmCallback`
      Parameters:
        `uuid` - The UUID of the content protection scheme.
        `request` - The request.
      Returns:
        The response data.

    - #### executeKeyRequest

          public byte[] executeKeyRequest​(UUID uuid,
                                          ExoMediaDrm.KeyRequest request)

      Description copied from interface: `MediaDrmCallback`
      Executes a key request.
      Specified by:
        `executeKeyRequest` in interface `MediaDrmCallback`
      Parameters:
        `uuid` - The UUID of the content protection scheme.
        `request` - The request.
      Returns:
        The response data.