Support in-manifest LAURL for ClearKey playback
Created by: wilaw
A large CDN is planing to release a ClearKey Service for DASH, in which the segments would be encrypted dynamically as they leave the edge and the license acquisition URL would be inserted in to the manifest. This solution will not be as secure as full DRM, however it will provide more security than simply using access tokens to control clear segment access.
An example manifest is here [Note - this is not publicly accessible. Will update tomorrow with an accessible link]
https://sjc-lp3od.santaclara.corp.akamai.com/ME/DASH/ClearKey_2160p/Manifest_ClearKey.mpd
The relevant elements are
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="9eb4050d-e44b-4802-932e-27d75083e266" />
<ContentProtection value="ClearKey1.0" schemeIdUri="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e">
<clearkey:laurl Lic_type="EME-1.0">https://sjc-lp3od.santaclara.corp.akamai.com/AcquireLicense</clearkey:laurl>
</ContentProtection>
The player should remove the - from the the KID, convert the Hex to base64, strip out any == padding and then call the License server specified in the MPD laurl with the POST-based JSON request document specified in the https://www.w3.org/TR/encrypted-media/#clear-key-request-format 9.1.3 License Request Format:
{"kids":["nrQFDeRLSAKTLifXUIPiZg"],"type":"temporary"}
The server will respond with the JSON response specified in https://www.w3.org/TR/encrypted-media/#clear-key-license-format 9.1.4 License Format:
{"keys":[{"kty":"oct","k":"FmY0xnWCPCNaSpRG-tUuTQ","kid":"nrQFDeRLSAKTLifXUIPiZg"}],"type":"temporary"}
which the player can then use to proceed with EME decryption.