tmat1075
9 years agoVisitor
How to create a playlist?
I'm trying to make a playlist as referenced here: https://sdkdocs.roku.com/display/sdkdoc/Playing+Videos#PlayingVideos-MediaPlaylists
I'm using the hero-grid template, but I'm stuck with how to make this work.
Here's the code that creates the row
And I'm assuming the current "item" ContentNode just needs to be updated to have a "content" field that has an array of other ContentNodes? Maybe after "AddAndSetFields" have another loop that creates another array of ContetnNodes, then "item.content = {array of ContentNode}" ? The things I've been trying don't seem to work.
Any help would much appreciated.
I'm using the hero-grid template, but I'm stuck with how to make this work.
Here's the code that creates the row
function createRow(list as object, num as Integer)
print "Parser.brs - [createRow]"
Parent = createObject("RoSGNode", "ContentNode")
row = createObject("RoSGNode", "ContentNode")
row.Title = list[num].Title
for each itemAA in list[num].ContentList
item = createObject("RoSGNode","ContentNode")
AddAndSetFields(item, itemAA)
row.appendChild(item)
end for
Parent.appendChild(row)
return Parent
end function
And I'm assuming the current "item" ContentNode just needs to be updated to have a "content" field that has an array of other ContentNodes? Maybe after "AddAndSetFields" have another loop that creates another array of ContetnNodes, then "item.content = {array of ContentNode}" ? The things I've been trying don't seem to work.
Any help would much appreciated.