Back to Exoplayer

HttpMediaDrmCallback (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/drm/HttpMediaDrmCallback.html

latest7.3 KB
Original Source

Package com.google.android.exoplayer2.drm

Class HttpMediaDrmCallback

  • java.lang.Object

    • com.google.android.exoplayer2.drm.HttpMediaDrmCallback
  • All Implemented Interfaces:MediaDrmCallback


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classHttpMediaDrmCallbackextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[MediaDrmCallback](MediaDrmCallback.html "interface in com.google.android.exoplayer2.drm")

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.

A MediaDrmCallback that makes requests using DataSource 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. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

HttpMediaDrmCallback

public HttpMediaDrmCallback​(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")defaultLicenseUrl,[DataSource.Factory](../upstream/DataSource.Factory.html "interface in com.google.android.exoplayer2.upstream")dataSourceFactory)

Deprecated.

Constructs an instance. Parameters: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 DataSource instances. This will usually be an HTTP-based DataSource.

- 

HttpMediaDrmCallback

public HttpMediaDrmCallback​(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")defaultLicenseUrl,
                            boolean forceDefaultLicenseUrl,[DataSource.Factory](../upstream/DataSource.Factory.html "interface in com.google.android.exoplayer2.upstream")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 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 DataSource instances. This will * usually be an HTTP-based DataSource.

Method Detail

- 

setKeyRequestProperty

public void setKeyRequestProperty​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")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](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")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](https://developer.android.com/reference/java/util/UUID.html "class or interface in java.util")uuid,[ExoMediaDrm.ProvisionRequest](ExoMediaDrm.ProvisionRequest.html "class in com.google.android.exoplayer2.drm")request)
                               throws[MediaDrmCallbackException](MediaDrmCallbackException.html "class in com.google.android.exoplayer2.drm")

Deprecated.

Description copied from interface: MediaDrmCallback

Executes a provisioning request. Specified by:executeProvisionRequest in interface MediaDrmCallbackParameters: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](https://developer.android.com/reference/java/util/UUID.html "class or interface in java.util")uuid,[ExoMediaDrm.KeyRequest](ExoMediaDrm.KeyRequest.html "class in com.google.android.exoplayer2.drm")request)
                         throws[MediaDrmCallbackException](MediaDrmCallbackException.html "class in com.google.android.exoplayer2.drm")

Deprecated.

Description copied from interface: MediaDrmCallback

Executes a key request. Specified by:executeKeyRequest in interface MediaDrmCallbackParameters:uuid - The UUID of the content protection scheme.request - The request.Returns:The response data.Throws:MediaDrmCallbackException - If an error occurred executing the request.