HttpMediaDrmCallback
@UnstableApi
class HttpMediaDrmCallback : MediaDrmCallback
A MediaDrmCallback that makes requests using DataSource instances.
Summary
Public constructors |
|---|
HttpMediaDrmCallback(Constructs an instance. |
HttpMediaDrmCallback(Constructs an instance. |
Public functions |
|
|---|---|
Unit |
Clears all headers for key requests made by the callback. |
Unit |
clearKeyRequestProperty(name: String!)Clears a header for key requests made by the callback. |
MediaDrmCallback.Response! |
executeKeyRequest(uuid: UUID!, request: ExoMediaDrm.KeyRequest!)Executes a key request. |
MediaDrmCallback.Response! |
executeProvisionRequest(Executes a provisioning request. |
Unit |
setKeyRequestProperty(name: String!, value: String!)Sets a header for key requests made by the callback. |
Public constructors
HttpMediaDrmCallback
HttpMediaDrmCallback(
defaultLicenseUrl: String?,
dataSourceFactory: DataSource.Factory!
)
Constructs an instance.
| Parameters | |
|---|---|
defaultLicenseUrl: String? |
The default license URL. Used for key requests that do not specify their own license URL. May be |
dataSourceFactory: DataSource.Factory! |
A factory from which to obtain |
HttpMediaDrmCallback
HttpMediaDrmCallback(
defaultLicenseUrl: String?,
forceDefaultLicenseUrl: Boolean,
dataSourceFactory: DataSource.Factory!
)
Constructs an instance.
| Parameters | |
|---|---|
defaultLicenseUrl: String? |
The default license URL. Used for key requests that do not specify their own license URL, or for all key requests if |
forceDefaultLicenseUrl: Boolean |
Whether to force use of |
dataSourceFactory: DataSource.Factory! |
A factory from which to obtain |
Public functions
clearAllKeyRequestProperties
fun clearAllKeyRequestProperties(): Unit
Clears all headers for key requests made by the callback.
clearKeyRequestProperty
fun clearKeyRequestProperty(name: String!): Unit
Clears a header for key requests made by the callback.
| Parameters | |
|---|---|
name: String! |
The name of the header field. |
executeKeyRequest
fun executeKeyRequest(uuid: UUID!, request: ExoMediaDrm.KeyRequest!): MediaDrmCallback.Response!
Executes a key request.
The LoadEventInfo returned inside the Response will have the following fields unset, and they must be updated by caller before the LoadEventInfo is used elsewhere:
| Parameters | |
|---|---|
uuid: UUID! |
The UUID of the content protection scheme. |
request: ExoMediaDrm.KeyRequest! |
The request. |
| Returns | |
|---|---|
MediaDrmCallback.Response! |
The response data. |
| Throws | |
|---|---|
androidx.media3.exoplayer.drm.MediaDrmCallbackException |
If an error occurred executing the request. |
executeProvisionRequest
fun executeProvisionRequest(
uuid: UUID!,
request: ExoMediaDrm.ProvisionRequest!
): MediaDrmCallback.Response!
Executes a provisioning request.
The LoadEventInfo returned inside the Response will have the following fields unset, and they must be updated by caller before the LoadEventInfo is used elsewhere:
| Parameters | |
|---|---|
uuid: UUID! |
The UUID of the content protection scheme. |
request: ExoMediaDrm.ProvisionRequest! |
The request. |
| Returns | |
|---|---|
MediaDrmCallback.Response! |
The response data. |
| Throws | |
|---|---|
androidx.media3.exoplayer.drm.MediaDrmCallbackException |
If an error occurred executing the request. |