@UnstableApi
class DrmUtil


DRM-related utility methods.

Summary

Nested types

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@Target(value = )
@IntDef(value = )
annotation DrmUtil.ErrorSource

Identifies the operation which caused a DRM-related error.

Constants

const Int

Corresponds to failures caused by an ExoMediaDrm method call.

const Int

Corresponds to failures caused by an operation related to obtaining DRM licenses.

const Int

Corresponds to failures caused by an operation related to provisioning the device.

Public functions

java-static Int

Returns the PlaybackException.ErrorCode that corresponds to the given DRM-related exception.

Constants

ERROR_SOURCE_EXO_MEDIA_DRM

const val ERROR_SOURCE_EXO_MEDIA_DRM = 1: Int

Corresponds to failures caused by an ExoMediaDrm method call.

ERROR_SOURCE_LICENSE_ACQUISITION

const val ERROR_SOURCE_LICENSE_ACQUISITION = 2: Int

Corresponds to failures caused by an operation related to obtaining DRM licenses.

ERROR_SOURCE_PROVISIONING

const val ERROR_SOURCE_PROVISIONING = 3: Int

Corresponds to failures caused by an operation related to provisioning the device.

Public functions

getErrorCodeForMediaDrmException

@PlaybackException.ErrorCode
java-static fun getErrorCodeForMediaDrmException(
    exception: Exception!,
    @DrmUtil.ErrorSource errorSource: Int
): Int

Returns the PlaybackException.ErrorCode that corresponds to the given DRM-related exception.

Parameters
exception: Exception!

The DRM-related exception for which to obtain a corresponding .

@DrmUtil.ErrorSource errorSource: Int

The ErrorSource for the given exception.

Returns
Int

The PlaybackException.ErrorCode that corresponds to the given DRM-related exception.