public final class HttpMediaDrmCallback extends java.lang.Object implements MediaDrmCallback
MediaDrmCallback that makes requests using HttpDataSource instances.| Constructor and Description |
|---|
HttpMediaDrmCallback(java.lang.String defaultLicenseUrl,
boolean forceDefaultLicenseUrl,
HttpDataSource.Factory dataSourceFactory) |
HttpMediaDrmCallback(java.lang.String defaultLicenseUrl,
HttpDataSource.Factory dataSourceFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAllKeyRequestProperties()
Clears all headers for key requests made by the callback.
|
void |
clearKeyRequestProperty(java.lang.String name)
Clears a header for key requests made by the callback.
|
byte[] |
executeKeyRequest(java.util.UUID uuid,
ExoMediaDrm.KeyRequest request)
Executes a key request.
|
byte[] |
executeProvisionRequest(java.util.UUID uuid,
ExoMediaDrm.ProvisionRequest request)
Executes a provisioning request.
|
void |
setKeyRequestProperty(java.lang.String name,
java.lang.String value)
Sets a header for key requests made by the callback.
|
public HttpMediaDrmCallback(java.lang.String defaultLicenseUrl,
HttpDataSource.Factory dataSourceFactory)
defaultLicenseUrl - The default license URL. Used for key requests that do not specify
their own license URL. May be null if it's known that all key requests will specify
their own URLs.dataSourceFactory - A factory from which to obtain HttpDataSource instances.public HttpMediaDrmCallback(java.lang.String defaultLicenseUrl,
boolean forceDefaultLicenseUrl,
HttpDataSource.Factory dataSourceFactory)
defaultLicenseUrl - The default license URL. Used for key requests that do not specify
their own license URL, or for all key requests if forceDefaultLicenseUrl is set to
true. May be null if forceDefaultLicenseUrl is false and if it's
known that all key requests will specify their own URLs.forceDefaultLicenseUrl - Whether to force use of defaultLicenseUrl for key
requests that include their own license URL.dataSourceFactory - A factory from which to obtain HttpDataSource instances.public void setKeyRequestProperty(java.lang.String name,
java.lang.String value)
name - The name of the header field.value - The value of the field.public void clearKeyRequestProperty(java.lang.String name)
name - The name of the header field.public void clearAllKeyRequestProperties()
public byte[] executeProvisionRequest(java.util.UUID uuid,
ExoMediaDrm.ProvisionRequest request)
throws MediaDrmCallbackException
MediaDrmCallbackexecuteProvisionRequest in interface MediaDrmCallbackuuid - The UUID of the content protection scheme.request - The request.MediaDrmCallbackException - If an error occurred executing the request.public byte[] executeKeyRequest(java.util.UUID uuid,
ExoMediaDrm.KeyRequest request)
throws MediaDrmCallbackException
MediaDrmCallbackexecuteKeyRequest in interface MediaDrmCallbackuuid - The UUID of the content protection scheme.request - The request.MediaDrmCallbackException - If an error occurred executing the request.