Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
24i
Streaming Star

(Smooth) PlayReady implementation

Hi all,

For a customer we have to implement PlayReady DRM on their Smooth streams, but for some reason I cannot get it to work. The customer themselves have it working through web, Android and iOS using the following url: 
https://green.playready.entitlement.theplatform.eu/playready/rightsmanager.asmx?account=<account>&auth=<auth_token>&releasePid=<pid>&schema=1.0


And I'm not sure how this should be implemented on Roku. I tried the following:
videoContent.encodingType = "PlayReadyLicenseAcquisitionAndChallenge"
videoContent.encodingKey = "https://green.playready.entitlement.theplatform.eu/playready/rightsmanager.asmx" + "%%%"
videoContent.encodingKey += "account=" + getConfig().data.appconfig.api.mpx_config.account_id
videoContent.encodingKey += "&auth=" + getConfig().data.appconfig.api.mpx_token
videoContent.encodingKey += "&releasePid=" + pid
videoContent.encodingKey += "&scheme=1.0"

and a base64 encoded version:
testString = "account=" + getConfig().data.appconfig.api.mpx_config.account_id
testString += "&auth=" + getConfig().data.appconfig.api.mpx_token
testString += "&releasePid=" + pid
testString += "&scheme=1.0"

bytearray = CreateObject("roByteArray")
bytearray.FromAsciiString(testString)
encodedString = bytearray.ToBase64String()

videoContent.encodingType = "PlayReadyLicenseAcquisitionAndChallenge"
videoContent.encodingKey = "https://green.playready.entitlement.theplatform.eu/playready/rightsmanager.asmx" + "%%%" + encodedString

I also tried to add the params to an AssociativeArray and base64 encode it by doing "bytearray.FromAsciiString(FormatJSON(assocarray))"
But so far no luck....

The only message we get from the player is:
LOG - VideoView - ERROR - Code -3, Message: An unexpected problem (but not server timeout or HTTP error) has been detected.
Which is not really helpful... Is there any way to get more debug info from the player?

Anyone can help me out?
0 Kudos
2 REPLIES 2
arielsfr
Visitor

Re: (Smooth) PlayReady implementation

Have you had any success with this? Between the docs and my experimentation, it seems that you have to provide the LA_URL and challenge data (ie, play token), not the request to obtain a token. The solution I'm working on is to have the channel make an API request to my site (or whatever backend), which returns the LA_URL and token. These are entered in the encoding key. Hope that helps and makes sense.
0 Kudos
jasonjustman
Visitor

Re: (Smooth) PlayReady implementation

24i friends:

Please see my post here regarding CENC defaultIV size:  

https://forums.roku.com/viewtopic.php?f=34&t=116388&p=649340#p649340
0 Kudos