Package com.google.android.exoplayer2

## Class MediaItem.DrmConfiguration

- java.lang.Object
- - com.google.android.exoplayer2.MediaItem.DrmConfiguration

- Enclosing class:
    MediaItem

      public static final class MediaItem.DrmConfiguration
      extends Object

  DRM configuration for a media item.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `MediaItem.DrmConfiguration.Builder` | Builder for `MediaItem.DrmConfiguration`.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `boolean` | `forceDefaultLicenseUri` | Whether to force use of `licenseUri` even if the media specifies its own DRM license server URI.
    `ImmutableList<@TrackType Integer>` | `forcedSessionTrackTypes` | The types of tracks for which to always use a DRM session even if the content is unencrypted.
    `ImmutableMap<String,​String>` | `licenseRequestHeaders` | The headers to attach to requests sent to the DRM license server.
    `Uri` | `licenseUri` | Optional default DRM license server `Uri`.
    `boolean` | `multiSession` | Whether the DRM configuration is multi session enabled.
    `boolean` | `playClearContentWithoutKey` | Whether clear samples within protected content should be played when keys for the encrypted part of the content have yet to be loaded.
    `ImmutableMap<String,​String>` | `requestHeaders` | Deprecated. Use `licenseRequestHeaders` instead.
    `UUID` | `scheme` | The UUID of the protection scheme.
    `ImmutableList<@TrackType Integer>` | `sessionForClearTypes` | Deprecated. Use `forcedSessionTrackTypes`.
    `UUID` | `uuid` | Deprecated. Use `scheme` instead.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `MediaItem.DrmConfiguration.Builder` | `buildUpon()` | Returns a `MediaItem.DrmConfiguration.Builder` initialized with the values of this instance.
    `boolean` | `equals​(Object obj)` |
    `byte[]` | `getKeySetId()` | Returns the key set ID of the offline license.
    `int` | `hashCode()` |

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

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

- - ### Field Detail

    - #### scheme

          public final UUID scheme

      The UUID of the protection scheme.

    - #### uuid

          @Deprecated
          public final UUID uuid

      Deprecated.
      Use `scheme` instead.

    - #### licenseUri

          @Nullable
          public final Uri licenseUri

      Optional default DRM license server `Uri`. If `null` then the DRM license server must be specified by the media.

    - #### requestHeaders

          @Deprecated
          public final ImmutableMap<String,​String> requestHeaders

      Deprecated.
      Use `licenseRequestHeaders` instead.

    - #### licenseRequestHeaders

          public final ImmutableMap<String,​String> licenseRequestHeaders

      The headers to attach to requests sent to the DRM license server.

    - #### multiSession

          public final boolean multiSession

      Whether the DRM configuration is multi session enabled.

    - #### playClearContentWithoutKey

          public final boolean playClearContentWithoutKey

      Whether clear samples within protected content should be played when keys for the encrypted part of the content have yet to be loaded.

    - #### forceDefaultLicenseUri

          public final boolean forceDefaultLicenseUri

      Whether to force use of `licenseUri` even if the media specifies its own DRM license server URI.

    - #### sessionForClearTypes

          @Deprecated
          public final ImmutableList<@TrackType Integer> sessionForClearTypes

      Deprecated.
      Use `forcedSessionTrackTypes`.

    - #### forcedSessionTrackTypes

          public final ImmutableList<@TrackType Integer> forcedSessionTrackTypes

      The types of tracks for which to always use a DRM session even if the content is unencrypted.

  - ### Method Detail

    - #### getKeySetId

          @Nullable
          public byte[] getKeySetId()

      Returns the key set ID of the offline license.

    - #### buildUpon

          public MediaItem.DrmConfiguration.Builder buildUpon()

      Returns a `MediaItem.DrmConfiguration.Builder` initialized with the values of this instance.

    - #### equals

          public boolean equals​(@Nullable
                                Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`