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

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 2
adamkaz1
Visitor

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

Your first mistake was trusting the Roku documentation :). 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
Visitor

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

"adamkaz1" wrote:
Your first mistake was trusting the Roku documentation :).  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
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.