Forum Discussion

menghao's avatar
menghao
Visitor
9 years ago

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.
  • 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.
  • "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".