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: 
johnmarsden
Visitor

How to use PlayReady DRM on the older SDK (not SceneGraph)?

I will be doing a SceneGraph application soon, but I need to implement PlayReady into something soon on my current app. I was looking at the documentation but it seems to show a SceneGraph example:


contentNode = createObject("roSGNode", "contentNode")
contentNode.streamFormat = "smooth"
contentNode.url = "wwww.myvideo.com/content.ism"
contentNode.drmParams = drmParams

m.video.content = contentNode



Is there an example out there for how I implement the same thing but for non-SceneGraph applications? Something that uses the standard (soon-to-be deprecated) video player?

Thanks!
0 Kudos
7 REPLIES 7
RokuNB
Roku Guru

Re: How to use PlayReady DRM on the older SDK (not SceneGraph)?

You are referring to https://sdkdocs.roku.com/display/sdkdoc ... Protection, i presume.

Should be able to do this for SDK1 using https://sdkdocs.roku.com/display/sdkdoc ... +Meta-Data for SDK1, no?
0 Kudos
johnmarsden
Visitor

Re: How to use PlayReady DRM on the older SDK (not SceneGraph)?

Correct. Yeah, I guess what I need in this metadata are these two key/vals:


EncodingType = "PlayReadyLicenseAcquisitionAndChallenge"
EncodingKey = "PlayReadyLicenseServerUrl" + "%%%" + customData"



And adding those two to the ContentMetaData object of every video should essentially be the same thing as the SceneGraph example?
0 Kudos
johnmarsden
Visitor

Re: How to use PlayReady DRM on the older SDK (not SceneGraph)?

Hey @RokuNB,

I tried setting this up today but I'm not seeing any calls go out to the DRM server. No traffic seems to be sent from the Roku side. I'm setting the EncodingType on the Content Meta-Data to be "PlayReadyLicenseAcquisitionAndChallenge" and the encoding key to be "URL%%%data"

So the encoding key looks something like this: 
https://lic.drmtoday.com/license-proxy-headerauth/drmtoday/RightsManager.asmx%%%eyJtZXJjaGFudCI6Im15LW1lcmNoYW50Iiwic2Vzc2lvbklkIjoibXktc2Vzc2lvbi1pZC1oZXJlIiwidXNlcklkIjoiMTIzNDUifQ==


Which translates to this (with proper values changed for server):

{
    "merchant": "my-merchant",
    "sessionId": "my-session-id-here",
    "userId": "12345"
}


And the URL is obviously: https://lic.drmtoday.com/license-proxy-headerauth/drmtoday/RightsManager.asmx

Are you seeing anything wrong here that would prevent the data from being sent up to the server? Is there a flag I need to enable aside from these two key values on the Content Meta-data object?


Edit: 
Not sure if this matters, but my `getDRMInfo` call on roDeviceInfo reports back this:


<Component: roAssociativeArray> =
{
    PlayReady: " "
}


Which doesn't say anything about "tee;ss" as per https://sdkdocs.roku.com/display/sdkdoc/ifDeviceInfo . Not sure if that is affecting this. I've also tried explicitly setting some certificate data on the roVideoScreen like this:

            ' set https certs
            m.screen.setCertificatesFile("common:/certs/ca-bundle.crt")
            m.screen.setCertificatesDepth(4)
0 Kudos
nmaves
Visitor

Re: How to use PlayReady DRM on the older SDK (not SceneGraph)?

Have you figured this out yet?

I am in the same boat.  I think I have everything right but I don't get playback.  No errors and I see nothing on the Castlabs side of things.

Nathan
0 Kudos
johnmarsden
Visitor

Re: How to use PlayReady DRM on the older SDK (not SceneGraph)?

Nope, no answers yet.
0 Kudos
RokuNB
Roku Guru

Re: How to use PlayReady DRM on the older SDK (not SceneGraph)?

"johnmarsden" wrote:
Nope, no answers yet.

Sadly i know nothing on this. Two random things, for me:
Brightscript Debugger> ? createObject("roDeviceInfo").getDrmInfo()
<Component: roAssociativeArray> =
{
PlayReady: "tee"
}

And also if you setCertificatesFile(), you should follow it with InitClientCertificates().
0 Kudos
umitic
Visitor

Re: How to use PlayReady DRM on the older SDK (not SceneGraph)?

Did You set up video URL in a proper way?
Wrong code:
videoclip = CreateObject("roAssociativeArray")
videoclip.url= URL

Proper way to set up URL in the old SDK for the stream would be:
videoclip = CreateObject("roAssociativeArray")
videoclip.StreamUrls = [URL]

***I know this is an old thread but maybe I will help someone else.
0 Kudos