Widevine license format expected by Chromecast receiver

578 Views Asked by At

For video assets protected with Widevine DRM, my CDN's license server returns a base64-encoded license in this form:

{
    "getWidevineLicenseResponse": {
        "license": "CAIS6AQ/KNAoQYNEgAOoX [snip] +0UWAE="
    }
}

But my custom cast receiver for Chromecast doesn't seem to like that format. I've tried returning only the license string itself, and I've tried converting it to ascii and returning the characters in a byte buffer, but so far the video won't play (fires off a Shaka 6008 error saying it can't update the media keys).

Does anyone know the format of a license key expected by the Chromecast player's CDM when playing Widevine-protected DASH titles?

I've built a custom CAF receiver, and I'm able to play most titles served by my CDN, but DRM-protected titles are not able to negotiate the license received back from my license server.

1

There are 1 best solutions below

0
hrgui On

I believe the response returned is a wrapped DRM license. Take the getWidevineLicenseResponse.license value and transform it into a UInt8Array, which should be usable by Cast Application Framework.

Just recently, the Web Receiver has new handler variable that can be assigned to for this situation, called licenseHandler when creating the PlaybackConfig. This will need to be implemented if the server cannot return a non-JSON response.

For an idea on what transformations have to be done, visit https://shaka-player-demo.appspot.com/docs/api/tutorial-license-wrapping.html under Wrapping License Response as it talks about the 6008 error.