docs/doc/reference/com/google/android/exoplayer2/MediaItem.DrmConfiguration.html
Package com.google.android.exoplayer2
All Implemented Interfaces:BundleableEnclosing class:MediaItem
public static final classMediaItem.DrmConfigurationextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Bundleable](Bundleable.html "interface in com.google.android.exoplayer2")
DRM configuration for a media item.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static class | MediaItem.DrmConfiguration.Builder |
Builder for MediaItem.DrmConfiguration.
|
-
Bundleable.Creator<T extends Bundleable>
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static Bundleable.Creator<MediaItem.DrmConfiguration> | CREATOR |
An object that can restore MediaItem.DrmConfiguration from a Bundle.
|
| 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.
|
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() | |
| Bundle | toBundle() |
Returns a Bundle representing the information stored in this object.
|
-
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
public final[UUID](https://developer.android.com/reference/java/util/UUID.html "class or interface in java.util")scheme
The UUID of the protection scheme.
-
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final[UUID](https://developer.android.com/reference/java/util/UUID.html "class or interface in java.util")uuid
Deprecated.
Use scheme instead.
-
@Nullable
public final[Uri](https://developer.android.com/reference/android/net/Uri.html "class or interface in android.net")licenseUri
Optional default DRM license server Uri. If null then the DRM license server must be specified by the media.
-
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final[ImmutableMap](https://guava.dev/releases/31.1-android/api/docs/com/google/common/collect/ImmutableMap.html?is-external=true "class or interface in com.google.common.collect")<[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang"),[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> requestHeaders
Deprecated.
Use licenseRequestHeaders instead.
-
public final[ImmutableMap](https://guava.dev/releases/31.1-android/api/docs/com/google/common/collect/ImmutableMap.html?is-external=true "class or interface in com.google.common.collect")<[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang"),[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> licenseRequestHeaders
The headers to attach to requests sent to the DRM license server.
-
public final boolean multiSession
Whether the DRM configuration is multi session enabled.
-
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.
-
public final boolean forceDefaultLicenseUri
Whether to force use of licenseUri even if the media specifies its own DRM license server URI.
-
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final[ImmutableList](https://guava.dev/releases/31.1-android/api/docs/com/google/common/collect/ImmutableList.html?is-external=true "class or interface in com.google.common.collect")<[@TrackType](C.TrackType.html "annotation in com.google.android.exoplayer2")[Integer](https://developer.android.com/reference/java/lang/Integer.html "class or interface in java.lang")> sessionForClearTypes
Deprecated.
Use forcedSessionTrackTypes.
-
public final[ImmutableList](https://guava.dev/releases/31.1-android/api/docs/com/google/common/collect/ImmutableList.html?is-external=true "class or interface in com.google.common.collect")<[@TrackType](C.TrackType.html "annotation in com.google.android.exoplayer2")[Integer](https://developer.android.com/reference/java/lang/Integer.html "class or interface in java.lang")> forcedSessionTrackTypes
The types of tracks for which to always use a DRM session even if the content is unencrypted.
-
public static final[Bundleable.Creator](Bundleable.Creator.html "interface in com.google.android.exoplayer2")<[MediaItem.DrmConfiguration](MediaItem.DrmConfiguration.html "class in com.google.android.exoplayer2")> CREATOR
An object that can restore MediaItem.DrmConfiguration from a Bundle.
-
@Nullable
public byte[] getKeySetId()
Returns the key set ID of the offline license.
-
public[MediaItem.DrmConfiguration.Builder](MediaItem.DrmConfiguration.Builder.html "class in com.google.android.exoplayer2")buildUpon()
Returns a MediaItem.DrmConfiguration.Builder initialized with the values of this instance.
-
public boolean equals(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")obj)
Overrides:equals in class Object
-
public int hashCode()
Overrides:hashCode in class Object
-
public[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")toBundle()
Description copied from interface: Bundleable
Returns a Bundle representing the information stored in this object.
Specified by:toBundle in interface Bundleable