Interface IMediaKeys
interface IMediaKeys
Extends com.amazon.apmf.IStandard
The MediaKeys object represents a set of keys that an associated
HtmlMediaElement can use for decryption of media data during playback.
It also represents a CDM instance.
For more details see
https://www.w3.org/TR/encrypted-media/#mediakeys-interface
Methods
isCDMProvisioningNeeded()
bool isCDMProvisioningNeeded()
Check if valid CDM provisioning is present
Returns
bool
true if CDM needs provisioning. false otherwise
getCDMVersion()
string getCDMVersion()
Gets the CDM version corresponding to this Access
Returns
string
Null terminated string with CDM version
getProvisioningRequest()
u8[] getProvisioningRequest()
Gets the CDM Provisioning request
Returns
u8[]
the generated Provisioning request
processProvisioningResponse()
Sends Provisioning Response from server to CDM implementation for processing. This is ONLY intended for WidevinevoidprocessProvisioningResponse(u8[]provisioningResponse)
Parameters
provisioningResponse
u8[] — Required
Full provisioning response
message as sent by server (headers and content).
removeProvisioning()
void removeProvisioning()
Removes existing CDM provisioning. All further CDM operations will fail until provisioned again.
makeSession()
Creates MediaKeySession objects For further details see https://www.w3.org/TR/encrypted-media/#dom-mediakeys-createsessionIMediaKeySession*makeSession(MediaKeySessionTypesessionType)
Parameters
sessionType
MediaKeySessionType — Required
MediaKeySession Determines the
type of licenses requested for this session
Returns
IMediaKeySession*
the IMediaKeySession instance created by
makeMediaKeySession()
setServerCertificate()
Sets the Server Certificate used for all communications with DRM server in case privacy mode is used (distinctiveIdentifier fromcom.amazon.apmf.ISubscription*setServerCertificate(u8[]serverCertificate,IServerCertificateSetListener*serverCertificateSetListener)
KeySystemConfiguration is REQUIRED).
If privacy mode is enabled, this has to be called as soon as this
object is created.
For further details see
https://www.w3.org/TR/encrypted-media/#dom-mediakeys-setservercertificate
Parameters
serverCertificate
u8[] — Required
ServerCertificate data
serverCertificateSetListener
IServerCertificateSetListener* — Required
IServerCertificateSetListener instance for callback when server certificate is set.
Returns
com.amazon.apmf.ISubscription*
ISubscription object instance.
getCdmMetrics()
u8[] getCdmMetrics()
Gets the Cdm metrics which are DRM Scheme specific. These are used by Streaming
providers to monitor usage for, and only for, the CDM instance they own.
The format of the metrics are DRM Scheme implementation dependent and Client
applications are expected have the proper tools to parse the format whether on device
or in their backend.
This is not part of EME Spec. Required for Certification purposes of some applications.
Returns
u8[]
the CDM metrics data
getStoreHash()
u8[] getStoreHash()
Gets the hash value of the Drm License store.
This is not part of EME Spec. Required for Certification purposes.
Returns
u8[]
the hash data
removeStore()
void removeStore()
Removes the license store specific to the calling application.
This is not part of EME Spec. Required for Certification purposes.
setCustomCdmParameter()
Sets the value of the Drm scheme specific parameter corresponding to paramName. This is not part of EME Spec. Required for Certification purposes.voidsetCustomCdmParameter(stringparamName,u8[]paramValue)
Parameters
paramName
string — Required
The name string or the desired param.
paramValue
u8[] — Required
value corresponding to paramName
getCustomCdmParameter()
Gets the value of the Drm scheme specific parameter corresponding to paramName. This is not part of EME Spec. Required for Certification purposes.u8[]getCustomCdmParameter(stringparamName)
Parameters
paramName
string — Required
The name string or the desired param.
Returns
u8[]
the value corresponding to paramName

