Your Digital Media Has Never Looked So Good

User avatar
Topic Author
Posts: 37
Joined: Wed Feb 15, 2017 7:22 am

(Smooth) PlayReady implementation

Mon Dec 11, 2017 7:19 am

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:<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 = "" + "%%%"
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")
encodedString = bytearray.ToBase64String()

videoContent.encodingType = "PlayReadyLicenseAcquisitionAndChallenge"
videoContent.encodingKey = "" + "%%%" + 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?
Posts: 8
Joined: Sun Feb 12, 2017 11:16 am

Re: (Smooth) PlayReady implementation

Wed Jan 17, 2018 11:23 am

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.
Posts: 3
Joined: Tue Jul 09, 2019 7:41 am

Re: (Smooth) PlayReady implementation

Tue Jul 09, 2019 7:56 am

24i friends:

Please see my post here regarding CENC defaultIV size:

Who is online

Users browsing this forum: No registered users and 5 guests