Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
menghao
Level 7

Need help from the expert in RoSGNode and Content Node

I created a RoSGNode and I try to set the stream with this value url : "http://me.com/big.m3u8"quality : true contented : "big-hls" }. It just does not work. Can anybody help me? Thanks.



node = createObject("RoSGNode","ContentNode")
nodeChild = node.createChild("ContentNode")
nodeChild.stream = { url : "http://me.com/big.m3u8", quality : true, contented : "big-hls" }

And I print out the nodeChild.stream, it is invalid. I followed the documentation in here https://sdkdocs.roku.com/display/sdkdoc/Content+Meta-Data , I also tried the 

nodeChild.setField("strean",{ url : "http://me.com/big.m3u8", quality : true, contented : "big-hls" })

did not work.
0 Kudos
2 Replies
adamkaz1
Level 7

Re: Need help from the expert in RoSGNode and Content Node

Your first mistake was trusting the Roku documentation Smiley Happy. A number of the examples have broken over time or never worked. The variable name should be "contentid" not "contented". I'm guessing some autocorrect was at play here.

Otherwise, I'm not sure what "c" is set to in your code snippet.
0 Kudos
menghao
Level 7

Re: Need help from the expert in RoSGNode and Content Node

"adamkaz1" wrote:
Your first mistake was trusting the Roku documentation Smiley Happy.  A number of the examples have broken over time or never worked.  The variable name should be "contentid" not "contented".  I'm guessing some autocorrect was at play here.

Otherwise, I'm not sure what "c" is set to in your code snippet.

Thanks for the response. Oh, that c.createChild I meant node.createChild (Actually in my original code I wrote c = createObject("RoSGNode", "ContentNode")....) anyway, I changed them to node.createChild() still node working.
Thanks for point out the "contented" lol, its actually from their example. But the nodeChild.stream is still invalid after I changed the variable name to "contentid".
0 Kudos