public static final class ExoMediaDrm.KeyRequest
extends java.lang.Object
MediaDrm.KeyRequest| Modifier and Type | Class and Description |
|---|---|
static interface |
ExoMediaDrm.KeyRequest.RequestType
Key request types.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
REQUEST_TYPE_INITIAL
Key request type for an initial license request.
|
static int |
REQUEST_TYPE_NONE
Key request type if keys are already loaded and available for use.
|
static int |
REQUEST_TYPE_RELEASE
Key request type for license release.
|
static int |
REQUEST_TYPE_RENEWAL
Key request type for license renewal.
|
static int |
REQUEST_TYPE_UNKNOWN
Value returned from
getRequestType() if the underlying key request does not specify
a type. |
static int |
REQUEST_TYPE_UPDATE
Key request type if keys have been loaded, but an additional license request is needed to
update their values.
|
| Constructor and Description |
|---|
KeyRequest(byte[] data,
java.lang.String licenseServerUrl)
Creates an instance with
REQUEST_TYPE_UNKNOWN. |
KeyRequest(byte[] data,
java.lang.String licenseServerUrl,
int requestType)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getData()
Returns the opaque key request data.
|
java.lang.String |
getLicenseServerUrl()
Returns the URL of the license server to which the request should be made.
|
int |
getRequestType()
Returns the type of the request, or
REQUEST_TYPE_UNKNOWN if the underlying key
request does not specify a type. |
public static final int REQUEST_TYPE_UNKNOWN
getRequestType() if the underlying key request does not specify
a type.public static final int REQUEST_TYPE_INITIAL
public static final int REQUEST_TYPE_RENEWAL
public static final int REQUEST_TYPE_RELEASE
public static final int REQUEST_TYPE_NONE
public static final int REQUEST_TYPE_UPDATE
public KeyRequest(byte[] data,
java.lang.String licenseServerUrl)
REQUEST_TYPE_UNKNOWN.data - The opaque key request data.licenseServerUrl - The license server URL to which the request should be made.public KeyRequest(byte[] data,
java.lang.String licenseServerUrl,
@ExoMediaDrm.KeyRequest.RequestType
int requestType)
data - The opaque key request data.licenseServerUrl - The license server URL to which the request should be made.requestType - The type of the request, or REQUEST_TYPE_UNKNOWN.public byte[] getData()
public java.lang.String getLicenseServerUrl()
@ExoMediaDrm.KeyRequest.RequestType public int getRequestType()
REQUEST_TYPE_UNKNOWN if the underlying key
request does not specify a type. Note that when using a platform MediaDrm instance,
key requests only specify a type on API levels 23 and above.