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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Roku Guru

video node setting header is not working

I have a stream with widevine drm, i am doing the following (pseudo code):
drmParams = {
"keySystem": "widevine",
"licenseServerURL": ""
ContentNode_object.streamformat = "dash"
ContentNode_object.url = "https://mydashmanifest.mpd?asdas"

'setting header and drm params
ContentNode_object.HttpHeaders = ["mydata:licensekey"]
ContentNode_object.drmParams = drmParams = ContentNode_object

I get the following error:
inside video state: error
inside video errorCode: -6
inside video errorMsg: ignored

I see that the license server is not getting the headers.
Any ideas?
Gokul M
0 Kudos
Binge Watcher

Re: video node setting header is not working

You need to call"headername", "header value") instead
0 Kudos
Roku Guru

Re: video node setting header is not working

this is what worked for me:
hvideo = CreateObject("roHttpAgent")
vheaders = {"h1":"value"}

and before setting the content ' settting headers
0 Kudos

Re: video node setting header is not working

Hi gomad, 

I have implemented like as yours . but i am still not able to play with DRM encrypted content. 

can you help me out where i am stuck.

following are the errors i am getting: Protected content license error. decoder: pump: DRM exception: decrypt error: DRM failed:extra:clip_id: 0


following are the code for it:

vidContent = CreateObject("RoSGNode", "ContentNode")

drmParams = {
keySystem: "Widevine"
vidContent.streamformat = "dash"
vidContent.drmParams = drmParams

httpAgent = CreateObject("roHttpAgent")
httpAgent.AddHeader("X-Roku-Reserved-Dev-Id", "")
"customdata":"PD94bWwgdmVyc2lvbj0....."    ' 64 bit encoded key string passing in header
httpAgent.setheaders(headers) = false = vidContent = "play"
0 Kudos
Reel Rookie

Re: video node setting header is not working

You could simply do that by setting
videoNode.httpHeaders = headersKeyValueMapObject

These headers are passed in requests made by the player.

If you want custom headers only to be passed in the DRM request, the new drmHttpAgent available from. 9.3 will do the purpose.

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.