Class HttpMediaDrmCallback
- java.lang.Object
-
- com.google.android.exoplayer2.drm.HttpMediaDrmCallback
-
- All Implemented Interfaces:
MediaDrmCallback
@Deprecated public final class HttpMediaDrmCallback extends Object implements MediaDrmCallback
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.AMediaDrmCallback
that makes requests usingDataSource
instances.
-
-
Constructor Summary
Constructors Constructor Description HttpMediaDrmCallback(String defaultLicenseUrl, boolean forceDefaultLicenseUrl, DataSource.Factory dataSourceFactory)
Deprecated.Constructs an instance.HttpMediaDrmCallback(String defaultLicenseUrl, DataSource.Factory dataSourceFactory)
Deprecated.Constructs an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clearAllKeyRequestProperties()
Deprecated.Clears all headers for key requests made by the callback.void
clearKeyRequestProperty(String name)
Deprecated.Clears a header for key requests made by the callback.byte[]
executeKeyRequest(UUID uuid, ExoMediaDrm.KeyRequest request)
Deprecated.Executes a key request.byte[]
executeProvisionRequest(UUID uuid, ExoMediaDrm.ProvisionRequest request)
Deprecated.Executes a provisioning request.void
setKeyRequestProperty(String name, String value)
Deprecated.Sets a header for key requests made by the callback.
-
-
-
Constructor Detail
-
HttpMediaDrmCallback
public HttpMediaDrmCallback(@Nullable String defaultLicenseUrl, DataSource.Factory dataSourceFactory)
Deprecated.Constructs an instance.- Parameters:
defaultLicenseUrl
- The default license URL. Used for key requests that do not specify their own license URL. May benull
if it's known that all key requests will specify their own URLs.dataSourceFactory
- A factory from which to obtainDataSource
instances. This will usually be an HTTP-basedDataSource
.
-
HttpMediaDrmCallback
public HttpMediaDrmCallback(@Nullable String defaultLicenseUrl, boolean forceDefaultLicenseUrl, DataSource.Factory dataSourceFactory)
Deprecated.Constructs an instance.- Parameters:
defaultLicenseUrl
- The default license URL. Used for key requests that do not specify their own license URL, or for all key requests ifforceDefaultLicenseUrl
is set to true. May benull
ifforceDefaultLicenseUrl
isfalse
and if it's known that all key requests will specify their own URLs.forceDefaultLicenseUrl
- Whether to force use ofdefaultLicenseUrl
for key requests that include their own license URL.dataSourceFactory
- A factory from which to obtainDataSource
instances. This will * usually be an HTTP-basedDataSource
.
-
-
Method Detail
-
setKeyRequestProperty
public void setKeyRequestProperty(String name, String value)
Deprecated.Sets a header for key requests made by the callback.- Parameters:
name
- The name of the header field.value
- The value of the field.
-
clearKeyRequestProperty
public void clearKeyRequestProperty(String name)
Deprecated.Clears a header for key requests made by the callback.- Parameters:
name
- The name of the header field.
-
clearAllKeyRequestProperties
public void clearAllKeyRequestProperties()
Deprecated.Clears all headers for key requests made by the callback.
-
executeProvisionRequest
public byte[] executeProvisionRequest(UUID uuid, ExoMediaDrm.ProvisionRequest request) throws MediaDrmCallbackException
Deprecated.Description copied from interface:MediaDrmCallback
Executes a provisioning request.- Specified by:
executeProvisionRequest
in interfaceMediaDrmCallback
- Parameters:
uuid
- The UUID of the content protection scheme.request
- The request.- Returns:
- The response data.
- Throws:
MediaDrmCallbackException
- If an error occurred executing the request.
-
executeKeyRequest
public byte[] executeKeyRequest(UUID uuid, ExoMediaDrm.KeyRequest request) throws MediaDrmCallbackException
Deprecated.Description copied from interface:MediaDrmCallback
Executes a key request.- Specified by:
executeKeyRequest
in interfaceMediaDrmCallback
- Parameters:
uuid
- The UUID of the content protection scheme.request
- The request.- Returns:
- The response data.
- Throws:
MediaDrmCallbackException
- If an error occurred executing the request.
-
-