openharmony 鸿蒙 arkts-apis-drm-e

2026-08-25 浏览 (1)

Enums

NOTE

The initial APIs of this module are supported since API version 11. Newly added APIs will be marked with a superscript to indicate their earliest API version.

DrmErrorCode

Enumerates the DRM error codes.

Atomic service API: This API can be used in atomic services since API version 14.

System capability: SystemCapability.Multimedia.Drm.Core

NameValueDescription
ERROR_UNKNOWN24700101Unknown error.
MAX_SYSTEM_NUM_REACHED24700103Maximum number of MediaKeySystem instances (64) reached.
MAX_SESSION_NUM_REACHED24700104Maximum number of MediaKeySession instances (64) reached.
SERVICE_FATAL_ERROR24700201DRM service fatal error.

PreDefinedConfigName

Enumerates the predefined configuration properties.

Atomic service API: This API can be used in atomic services since API version 14.

System capability: SystemCapability.Multimedia.Drm.Core

NameValueDescription
CONFIG_DEVICE_VENDOR'vendor'Plugin vendor name, which corresponds to the value of vendor in the return value of getConfigurationString.
CONFIG_DEVICE_VERSION'version'Plugin version number, which corresponds to the value of version in the return value of getConfigurationString.
CONFIG_DEVICE_DESCRIPTION'description'Device description, which corresponds to the value of description in the return value of getConfigurationString.
CONFIG_DEVICE_ALGORITHMS'algorithms'Supported algorithms, which correspond to the value of algorithms in the return value of getConfigurationString.
CONFIG_DEVICE_UNIQUE_ID'deviceUniqueId'Unique device ID, which corresponds to the value of deviceUniqueId in the return value of getConfigurationByteArray.
CONFIG_SESSION_MAX'maxSessionNum'Maximum number of supported sessions, which corresponds to the value of maxSessionNum in the return value of getConfigurationString.
CONFIG_SESSION_CURRENT'currentSessionNum'Number of active sessions, which corresponds to the value of currentSessionNum in the return value of getConfigurationString.

MediaKeyType

Enumerates the types of media keys.

Atomic service API: This API can be used in atomic services since API version 14.

System capability: SystemCapability.Multimedia.Drm.Core

NameValueDescription
MEDIA_KEY_TYPE_OFFLINE0Offline media key.
MEDIA_KEY_TYPE_ONLINE1Online media key.

OfflineMediaKeyStatus

Enumerates the statuses of offline media keys.

Atomic service API: This API can be used in atomic services since API version 14.

System capability: SystemCapability.Multimedia.Drm.Core

NameValueDescription
OFFLINE_MEDIA_KEY_STATUS_UNKNOWN0Unknown status.
OFFLINE_MEDIA_KEY_STATUS_USABLE1The media key is available.
OFFLINE_MEDIA_KEY_STATUS_INACTIVE2The media key is inactive.

CertificateStatus

Enumerates the statuses of device certificates.

Atomic service API: This API can be used in atomic services since API version 14.

System capability: SystemCapability.Multimedia.Drm.Core

NameValueDescription
CERT_STATUS_PROVISIONED0A device certificate is provisioned.
CERT_STATUS_NOT_PROVISIONED1A device certificate is not provisioned.
CERT_STATUS_EXPIRED2The device certificate has expired.
CERT_STATUS_INVALID3The device certificate is invalid.
CERT_STATUS_UNAVAILABLE4The device certificate is unavailable.

MediaKeyRequestType

Enumerates the types of media key requests.

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.Multimedia.Drm.Core

NameValueDescription
MEDIA_KEY_REQUEST_TYPE_UNKNOWN0Unknown type.
MEDIA_KEY_REQUEST_TYPE_INITIAL1Initial request.
MEDIA_KEY_REQUEST_TYPE_RENEWAL2Renewal request.
MEDIA_KEY_REQUEST_TYPE_RELEASE3Release request.
MEDIA_KEY_REQUEST_TYPE_NONE4No request.
MEDIA_KEY_REQUEST_TYPE_UPDATE5Update request.

ContentProtectionLevel

Enumerates the content protection levels.

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.Multimedia.Drm.Core

NameValueDescription
CONTENT_PROTECTION_LEVEL_UNKNOWN0Unknown content protection level.
CONTENT_PROTECTION_LEVEL_SW_CRYPTO1Software-based content protection.
CONTENT_PROTECTION_LEVEL_HW_CRYPTO2Hardware-based content protection.
CONTENT_PROTECTION_LEVEL_ENHANCED_HW3Enhanced hardware-based content protection.
CONTENT_PROTECTION_LEVEL_MAX4Maximum content protection level.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 capi-drm-drm-mediakeysystemdescription

openharmony 鸿蒙 capi-drm-drm-offlinemediakeyidarray

openharmony 鸿蒙 capi-drm

openharmony 鸿蒙 arkts-apis-drm-MediaKeySession

openharmony 鸿蒙 capi-drm-drm-keysinfo

openharmony 鸿蒙 capi-native-mediakeysystem-h

openharmony 鸿蒙 capi-drm-drm-mediakeyrequest

openharmony 鸿蒙 capi-native-mediakeysession-h

openharmony 鸿蒙 capi-drm-drm-mediakeyrequestinfo

openharmony 鸿蒙 arkts-apis-drm-MediaKeySystem

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/SZx296BK