I'm developing my own Custom Receiver Application and the stream I want to play is protected with widevine, I need to obtain my license from my own server and I need to pass content_id and payload. This my code:
playbackConfig.protectionSystem = cast.framework.ContentProtection.WIDEVINE;
playbackConfig.licenseRequestHandler = requestInfo => {
requestInfo.headers["Authorization"] = token;
requestInfo.headers["Content-Type"] = "application/json";
requestInfo.content = JSON.stringify({
type: "widevine",
type_request: "license",
content_id: content_id,
payload: <<missing_data>>
});
return requestInfo
};
I have it implemented on Android implmementing my own MediaDrmCallback and the class KeyRequest contains the needed information but the param content from object requestInfo doesn't provide that information