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.AMediaDrmCallbackthat makes requests usingDataSourceinstances.
-
-
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 voidclearAllKeyRequestProperties()Deprecated.Clears all headers for key requests made by the callback.voidclearKeyRequestProperty(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.voidsetKeyRequestProperty(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 benullif it's known that all key requests will specify their own URLs.dataSourceFactory- A factory from which to obtainDataSourceinstances. 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 ifforceDefaultLicenseUrlis set to true. May benullifforceDefaultLicenseUrlisfalseand if it's known that all key requests will specify their own URLs.forceDefaultLicenseUrl- Whether to force use ofdefaultLicenseUrlfor key requests that include their own license URL.dataSourceFactory- A factory from which to obtainDataSourceinstances. 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:MediaDrmCallbackExecutes a provisioning request.- Specified by:
executeProvisionRequestin 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:MediaDrmCallbackExecutes a key request.- Specified by:
executeKeyRequestin 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.
-
-