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

UNABLE TO CREATE RoSGNode of type ContentNode

what is wrong in this function i am using it inside a task node where at the end i assign the content field of type contenNode
and in the scene i am observing this field to apply changes.

function getChannels()
jsonRequest=CreateObject("roUrlTransfer")
jsonRequest.SetURL(m.top.url)
response=ParseJson(jsonRequest.GetToString())
channels = response.available_channels
listcontent = createObject("RoSGNode","ContentNode") <===================== Error is happening at this line
for each id in channels
if channels[id].stream_type = "live"
stream={}
stream.Title = channels[id].name
stream.url = "some url.m3u8"
listitem = listcontent.createChild("ContentNode") <===================== Error is happening at this line
listitem.Title = stream.Title
listitem.url = stream.url
end if
end for
m.top.listcontent = listcontent
end function
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.