Profile cover photo
Profile photo
Nathan Maves
82 followers
82 followers
About
Posts

Post has attachment
I am running into a bit of trouble trying to use a CAF receiver with our Playready DRM content.

I have attached a screenshot of the console. It looks like the license request it successful from both the receiver and our license server.

Here is our current receiver code.

const context = cast.framework.CastReceiverContext.getInstance();
const playerManager = context.getPlayerManager();

// intercept the LOAD request to be able to read in a contentId and get data
playerManager.setMessageInterceptor(
cast.framework.messages.MessageType.LOAD, loadRequestData => {
console.log('load request data', loadRequestData);
// if (loadRequestData.media && loadRequestData.media.contentId) {
// return thirdparty.getMediaById(loadRequestData.media.contentId)
// .then(media => {
// if (media) {
// loadRequestData.media.contentUrl = media.url;
// loadRequestData.media.contentType = media.contentType;
// loadRequestData.media.metadata = media.metadata;
// }
// return loadRequestData;
// });
// }
return loadRequestData;
});

context.getPlayerManager().setMediaPlaybackInfoHandler((loadRequest, playbackConfig) => {

const { authToken, merchant, sessionId, userId } = loadRequest.media.customData.drmtoday
const customData = { merchant, sessionId, userId }
const base64CustomData = btoa(JSON.stringify(customData))

playbackConfig.licenseRequestHandler = requestInfo => {
requestInfo.withCredentials = true
requestInfo.headers['x-dt-auth-token'] = authToken
}

playbackConfig.licenseUrl = `https://lic.drmtoday.com/license-proxy-headerauth/drmtoday/RightsManager.asmx?optData=${base64CustomData}`
// playbackConfig.protectionSystem = cast.framework.ContentProtection.PLAYREADY

console.log('licenseUrl', playbackConfig.licenseUrl)
return playbackConfig;
});

// listen to all Core Events
playerManager.addEventListener(cast.framework.events.category.CORE,
event => {
console.log(event);
});

context.start()

Any help would be great.
Photo

Post has attachment
Wait while more posts are being loaded