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,
java.lang.String mediaProvidedLicenseServerUrl)
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.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.forceDefaultLicenseUrl - Whether to use 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 java.io.IOException
MediaDrmCallbackexecuteProvisionRequest in interface MediaDrmCallbackuuid - The UUID of the content protection scheme.request - The request.java.io.IOExceptionpublic byte[] executeKeyRequest(java.util.UUID uuid,
ExoMediaDrm.KeyRequest request,
@Nullable
java.lang.String mediaProvidedLicenseServerUrl)
throws java.lang.Exception
MediaDrmCallbackexecuteKeyRequest in interface MediaDrmCallbackuuid - The UUID of the content protection scheme.request - The request generated by the content decryption module.mediaProvidedLicenseServerUrl - A license server URL provided by the media, or null if the
media does not include any license server URL.java.lang.Exception - If an error occurred executing the request.