DRM Messages

This article describes the valid format for the msg parameter of the sendDrmMessage method.

Widevine

<?xml version="1.0" encoding="utf-8"?>
<WidevineCredentialsInfo xmlns="http://www.smarttv-alliance.org/DRM/widevine/2012/protocols/" >
  <ContentURL>$(ContentURL)</ContentURL>
  <DeviceID>$(DeviceID)</DeviceID>
  <StreamID>$(StreamID)</StreamID>
  <ClientIP>$(Client)</ClientIP>
  <DRMServerURL>$(DRMServerURL)</DRMServerURL>
  <DRMAckServerURL>$(DRMSAckerverURL)</DRMAckServerURL>
  <DRMHeartBeatURL>$( HeartbeatServerURL)</DRMHeartBeatURL>
  <DRMHeartBeatPeriod>$(DRMHeartBeatPeriod)</DRMHeartBeatPeriod>
  <UserData>$(UserData) </UserData>
  <Portal>$(Portal)</Portal>
  <StoreFront>$(Portal)</StoreFront>
  <BandwidthCheckURL>$(BandwidthCheckURL) </BandwidthCheckURL>
  <BandwidthCheckInterval>$(BandwidthCheckInterval)</BandwidthCheckInterval>
</WidevineCredentialsInfo >
ElementSupport by CSP*Description
ContentURLMandatoryContent URL
DRMServerURLMandatoryURL for the Widevine DRM key server
DeviceIDOptionalUnique ID of the device
ClientIPOptionalClient IP address
StreamIDOptionalUnique ID of the stream being requested in the entitlement request
DRMAckServerURLOptionalURL for entitlement delivery acknowledgments
DRMHeartBeatURLOptionalURL of a server that handles a heartbeat request
DRMHeartBeatPeriodOptionalThe duration between consecutive heartbeats (in seconds)
UserDataOptionalUser data (Custom Data). Do not use tag type data for custom data. It is recognized as sub-elements and that makes parsing error.
PortalOptionalPortal URL
StoreFrontOptionalStoreFront URL
BandwidthCheckURLOptionalThe URL for bandwidth check server
BandwidthCheckIntervalOptionalInterval of bandwidth check
*CSP: Content Service Provider
Important: Element values and the order
You should do:
  • Even if you do not use the optional elements, you must specify the elements with an empty value.
  • You should keep the order of XML elements in the Widevine message as above table and example.

PlayReady

Pre-acquisition

<?xml version="1.0" encoding="utf-8"?>
<PlayReadyInitiator xmlns= "http://schemas.microsoft.com/DRM/2007/03/protocols/">
  <LicenseAcquisition>
    <Header>
      <WRMHEADER xmlns= "http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader" version="4.0.0.0">
        <DATA>
          <PROTECTINFO>
            <KEYLEN>16</KEYLEN>
            <ALGID>AESCTR</ALGID>
          </PROTECTINFO>
          <LA_URL>http://rm.contoso.com/rightsmanager.asmx</LA_URL>
          <KID>lFmb2gxg0Cr5bfEnJXgJeA==</KID>
          <CHECKSUM>P7ORpD2IpA==</CHECKSUM>
        </DATA>
      </WRMHEADER>
    </Header>
    <CustomData>AuthZToken XYZ</CustomData>
  </LicenseAcquisition>
</PlayReadyInitiator>
ElementSupport by DeviceInclude by Service
HeaderMandatoryMandatory
CustomDataMandatoryOptional

Authentication with custom data for post-acquisition

License server url overriding for license post-acquisition

<?xml version="1.0" encoding="utf-8"?>
<PlayReadyInitiator xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols/">
  <LicenseServerUriOverride>
    <LA_URL>http://rm.contoso.com/rightsmanager.asmx</LA_URL>
  </LicenseServerUriOverride>
</PlayReadyInitiator>
After this message, all further license post-acquisitions send the license challenge to the specified LA_URL, not to the default LA_URL contained in the WRMHEADER of the content (application persistence). License pre-acquisitions are not affected by this command.
<?xml version="1.0" encoding="utf-8"?>
<PlayReadyInitiator xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols/">
  <LicenseServerUriOverride>
    <LA_URL></LA_URL>
  </LicenseServerUriOverride>
</PlayReadyInitiator>
After this message, all further license post-acquisitions send the license challenge to the default LA_URL contained in the WRMHEADER of the content (URL overriding canceled).

Set challenge customdata for license post-acquisition

<?xml version="1.0" encoding="utf-8"?>
<PlayReadyInitiator xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols/">
  <SetCustomData>
    <CustomData>AuthZToken XYZ</CustomData>
  </SetCustomData>
</PlayReadyInitiator>
After this message, all further license post-acquisitions use the specified value, as the CustomData value of the generated license challenges (application persistence). License pre-acquisitions are not affected by this command.
<?xml version="1.0" encoding="utf-8"?>
<PlayReadyInitiator xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols/">
  <SetCustomData>
    <CustomData></CustomData>
  </SetCustomData>
</PlayReadyInitiator>
After this message, all further license post-acquisitions use no CustomData value in the generated license challenges.

No Headings