Dash.js: PlayReady CustomData

Created on 5 Nov 2015  路  10Comments  路  Source: Dash-Industry-Forum/dash.js

I need to set the CustomData for the PlayReady key system, because it is required by my license acquisition server.

In silverlight you can set it with LicenseAcquirer.ChallengeCustomData Property:
https://msdn.microsoft.com/en-us/library/system.windows.media.licenseacquirer.challengecustomdata(v=vs.95).aspx

It is used in the AcquireLicense SOAP message:
customdata

Without it I cannot use my PlayReady contents, because the license server will refuse to provide a valid license for playback.

Is there any way to set it?

0 - Backlog Close Pending Question

All 10 comments

@henkosch Unfortunately, we can't do that right now.

The good news is that it is pretty simple thing to add. We have an [interface[(http://cdn.dashjs.org/latest/jsdocs/MediaPlayer.dependencies.protection.servers.LicenseServer.html) that allows application developers to add functionality that is specific to their license servers (by providing their own implementation of the interface). This interface needs a new method which will take the message provided by the CDM and make changes to it prior to being sent out. Then, we just need to add a call to this interface during key requests in ProtectionController.

The bad news... we are in the middle of a major re-factor which will affect the code in question and especially the Class-Interface implementation (since we are moving to ES6). So, I can't put a fix into the codebase until we are closer to being done with the refactor.

I'll post back here when I have updates.

CustomData must be provided as input for the PlayReady CDM, since the license request is digitally signed and data cannot be added to the license request body after it is generated. Microsoft has implemented an extra cdmData parameter to CreateSession (https://msdn.microsoft.com/en-us/library/dn457361.aspx) but this is not a part of EME (and not likely to become so, as far as I know). It also does not appear to be supported by dash.js.

As far as I can tell, there is no EME-compliant way to provide the CustomData to the CDM. @greg80303 is my interpretation here correct?

@sandersaares Thanks for the explanation. I am starting to remember this now. This situation puts dash.js in a weird position. While I want to ensure that we support any browsers/DRMs, I would really like to keep to the DASH-IF/MSE/EME standards. I'm surprised that this need by PlayReady has not been addressed in the EME spec, since one of the spec editors is the Product Manager for Edge.

Couple this with the fact that IE11 and Edge are both using a 2-year old version of the EME spec, I don't think I want to try to address this yet. After the ES6 refactor is complete, I will take a look at some possible solutions (none of which will be pretty).

I found some additional information on how the customData can be injected in IE11 and Edge which I'll leave here for reference:

Link: https://msdn.microsoft.com/en-us/library/windows/apps/mt429382.aspx
And an example javascript app here: https://code.msdn.microsoft.com/windowsapps/PlayReady-samples-for-124a3738

Unfortunately I have no idea how and where to get the ServerCert so I haven't gotten it to work just yet.

Seems to be inactive can we close?

this is still a pending req I think, there are project base on dash.js implement PlayReady CustomData

https://github.com/Orange-OpenSource/hasplayer.js/blob/5695140aba85b7237744c825e9348902c07adcff/app/js/streaming/protection/drm/KeySystem_PlayReady.js

but this require some work to integrate it into dash.js, and I don't know will it be accepted,

as I remember shaka-player which by google has refused to implement things out EME scope.

We have a lot of fill to the EME spec already. If you are willing to do some work that makes sense and solves the problem then I think we would accept it. As long as it not unreasonable.

@Webjin did you get any way to insert custom data inside the challenge?? i am facing a similar issue.

@greg80303 can you please point me to the code in dash.js which does this. I am facing a similar issue and tried lot of things, but i get 500 probably because i am trying to insert inside the challenge after it has been generated.https://github.com/Dash-Industry-Forum/dash.js/issues/2478

Custom data insertion is already supported in dash.js.
But as far as I know custom data are supported only by MS-prefixed PlayReady CDM, that can be used through ProtectionModel_3Feb2014.
MS-prefixed PlayReady CDM is available on IE11 and Edge, but on Edge since both EME versions (3Feb2014 and 21Jan2015) are available, the ProtectionModel_21Jan2015 is used by default.
However, at application level you can force dash.js selecting ProtectionModel_3Feb2014 on Edge :

if (HTMLVideoElement.prototype.msSetMediaKeys) {
    navigator.requestMediaKeySystemAccess = undefined;
    HTMLVideoElement.prototype.setMediaKeys = undefined;
}

Then, when using MS-prefixed PlayReady CDM and ProtectionModel_3Feb2014, you can set custom data by setting the 'cdmData' field in the input protectionData:

protData['com.microsoft.playready'] = {
    ....
    cdmData: '<CDM_specific_data>',
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

NguyenTungs picture NguyenTungs  路  5Comments

carlanton picture carlanton  路  5Comments

mihaiav picture mihaiav  路  5Comments

sandersaares picture sandersaares  路  5Comments

tony1377 picture tony1377  路  3Comments