public class

MediaPlayer.DrmResult

extends SessionPlayer.PlayerResult

 java.lang.Object

androidx.media2.SessionPlayer.PlayerResult

↳androidx.media2.MediaPlayer.DrmResult

Overview

Result class of the asynchronous DRM APIs.

Summary

Fields
public static final intRESULT_CODE_PREPARATION_ERROR

The DRM preparation has failed.

public static final intRESULT_CODE_PROVISIONING_NETWORK_ERROR

The device required DRM provisioning but couldn't reach the provisioning server.

public static final intRESULT_CODE_PROVISIONING_SERVER_ERROR

The device required DRM provisioning but the provisioning server denied the request.

public static final intRESULT_CODE_RESOURCE_BUSY

The hardware resources are not available, due to being in use.

public static final intRESULT_CODE_UNSUPPORTED_SCHEME

The crypto scheme UUID that is not supported by the device.

Constructors
publicDrmResult(int resultCode, MediaItem item)

Constructor that uses the current system clock as the completion time.

Methods
public intgetResultCode()

Gets the result code.

from SessionPlayer.PlayerResultgetCompletionTime, getMediaItem
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final int RESULT_CODE_PROVISIONING_NETWORK_ERROR

The device required DRM provisioning but couldn't reach the provisioning server.

public static final int RESULT_CODE_PROVISIONING_SERVER_ERROR

The device required DRM provisioning but the provisioning server denied the request.

public static final int RESULT_CODE_PREPARATION_ERROR

The DRM preparation has failed.

public static final int RESULT_CODE_UNSUPPORTED_SCHEME

The crypto scheme UUID that is not supported by the device.

public static final int RESULT_CODE_RESOURCE_BUSY

The hardware resources are not available, due to being in use.

Constructors

public DrmResult(int resultCode, MediaItem item)

Constructor that uses the current system clock as the completion time.

Parameters:

resultCode: result code. Recommends to use the standard code defined here.
item: media item when the operation is completed

Methods

public int getResultCode()

Gets the result code.

Returns:

result code.