docs/doc/reference/com/google/android/exoplayer2/drm/DrmInitData.SchemeData.html
Package com.google.android.exoplayer2.drm
All Implemented Interfaces:ParcelableEnclosing class:DrmInitData
public static final classDrmInitData.SchemeDataextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Parcelable](https://developer.android.com/reference/android/os/Parcelable.html "class or interface in android.os")
Scheme initialization data.
-
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static Parcelable.Creator<DrmInitData.SchemeData> | CREATOR | |
| byte[] | data |
The initialization data.
|
| String | licenseServerUrl |
The URL of the server to which license requests should be made.
|
| String | mimeType |
The mimeType of data.
|
| UUID | uuid |
The UUID of the DRM scheme, or C.UUID_NIL if the data is universal (i.e.
|
-
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructors | Constructor | Description |
| --- | --- |
| SchemeData(UUID uuid, String mimeType, byte[] data) | |
| SchemeData(UUID uuid, String licenseServerUrl, String mimeType, byte[] data) | |
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| boolean | canReplace(DrmInitData.SchemeData other) |
Returns whether this DrmInitData.SchemeData can be used to replace other.
|
| DrmInitData.SchemeData | copyWithData(byte[] data) |
Returns a copy of this instance with the specified data.
|
| int | describeContents() | |
| boolean | equals(Object obj) | |
| boolean | hasData() |
Returns whether data is non-null.
|
| int | hashCode() | |
| boolean | matches(UUID schemeUuid) |
Returns whether this initialization data applies to the specified scheme.
|
| void | writeToParcel(Parcel dest, int flags) | |
-
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")uuid
The UUID of the DRM scheme, or C.UUID_NIL if the data is universal (i.e. applies to all schemes).
-
@Nullable
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")licenseServerUrl
The URL of the server to which license requests should be made. May be null if unknown.
-
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")mimeType
The mimeType of data.
-
@Nullable
public final byte[] data
The initialization data. May be null for scheme support checks only.
-
public static final[Parcelable.Creator](https://developer.android.com/reference/android/os/Parcelable.Creator.html "class or interface in android.os")<[DrmInitData.SchemeData](DrmInitData.SchemeData.html "class in com.google.android.exoplayer2.drm")> CREATOR
-
public SchemeData([UUID](https://developer.android.com/reference/java/util/UUID.html "class or interface in java.util")uuid,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")mimeType,
@Nullable
byte[] data)
Parameters:uuid - The UUID of the DRM scheme, or C.UUID_NIL if the data is universal (i.e. applies to all schemes).mimeType - See mimeType.data - See data.
-
public SchemeData([UUID](https://developer.android.com/reference/java/util/UUID.html "class or interface in java.util")uuid,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")licenseServerUrl,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")mimeType,
@Nullable
byte[] data)
Parameters:uuid - The UUID of the DRM scheme, or C.UUID_NIL if the data is universal (i.e. applies to all schemes).licenseServerUrl - See licenseServerUrl.mimeType - See mimeType.data - See data.
-
public boolean matches([UUID](https://developer.android.com/reference/java/util/UUID.html "class or interface in java.util")schemeUuid)
Returns whether this initialization data applies to the specified scheme.
Parameters:schemeUuid - The scheme UUID.Returns:Whether this initialization data applies to the specified scheme.
-
public boolean canReplace([DrmInitData.SchemeData](DrmInitData.SchemeData.html "class in com.google.android.exoplayer2.drm")other)
Returns whether this DrmInitData.SchemeData can be used to replace other.
Parameters:other - A DrmInitData.SchemeData.Returns:Whether this DrmInitData.SchemeData can be used to replace other.
-
public boolean hasData()
Returns whether data is non-null.
-
@CheckResult
public[DrmInitData.SchemeData](DrmInitData.SchemeData.html "class in com.google.android.exoplayer2.drm")copyWithData(@Nullable
byte[] data)
Returns a copy of this instance with the specified data.
Parameters:data - The data to include in the copy.Returns:The new 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 int describeContents()
Specified by:describeContents in interface Parcelable
-
public void writeToParcel([Parcel](https://developer.android.com/reference/android/os/Parcel.html "class or interface in android.os")dest,
int flags)
Specified by:writeToParcel in interface Parcelable