Freigeben über


Content Decryption Module Data (CDMData)

The format of Content Decryption Module Data is specific to a particular content protection system. The format of PlayReady CDM data is XML in a Unicode string and must be cast to a byte array for MediaKeys.CreateSession. PlayReady CDM data uses the following schema:

<PlayReadyCDMData type="LicenseAcquisition">
  <LicenseAcquisition version="1.0" Proactive="true">
    <KeyIDs>
      <KeyID>B64 encoded KID</KeyID>
      ...
    </KeyIDs>
    <CustomData encoding="base64encoded">B64 encoded custom data</CustomData>
  </LicenseAcquisition>
</PlayReadyCDMData>
  

CDM data is the third parameter in the MediaKeys.CreateSession( type, initData, cdmData) method. CDM data is not part of the W3C draft, but is expected to go in the final specification. Internet Explorer accepts the cdmData parameter, which can be set to null.

The proactive attribute, key identifiers (KeyIDs), and custom data are all optional.

The proactive attribute allows your Web page to indicate that license acquisition should be started immediately when a CDM session is created. Proactive license acquisition can only be used to acquire a persistent license since a non-persistent license has to be processed in the same license acquisition content enabler passed from the Input Trust Authority in the Protected Media Path. The value of proactive flag is true or false (case insensitive).

Note

The proactive flag should only be used for proactive license acquisition. When performing proactive license acquisition, the MediaKeys should never be used for HTMLMediaElement (that is, don’t call HTMLMediaElement->SetMediaKeys( mediaKeys) when mediaKeys is used for proactive license acquisition).

The CDM data key identifier is primarily used for proactive license acquisition. If the key identifier is specified in CDM data then initialization data should not be used. If initialization data is used then the key identifier should not be specified in CDM data.

Custom data allows your Web page to supply additional information embedded in the PlayReady license acquisition challenge. Custom data should be base64-encoded before being included in the CDM data.

Note

Currently only a single key identifier is supported under <KeyId>.