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: 
dreamer2057
Channel Surfer

EPG Customize

Hello! How I can customize EPG channel(or program) node element?

I tried to create few pretty simple custom ContentNodes:

Channel


<component name="EpgGridChannel" extends="ContentNode">
<children>
<Poster
id="epgGridChannel"
uri="pkg:/images/channel.png"
width="14"
height="10"
translation="[10,10]"
opacity="1"/>
</children>
</component>


Program


<component name="EpgGridProgram" extends="ContentNode">
<children>
<Poster
id="epgGridProgram"
uri="pkg:/images/program.png"
width="14"
height="10"
translation="[10,10]"
opacity="1"/>
</children>
</component>


In next time, I fill the EPG:



...

sub FillEpgGrid()

m.content = createObject("RoSGNode","ContentNode")
m.top.setFocus(true)

for i = 0 TO m.temp.chns.Count() - 1 STEP 1

addChannel(i)
addPrograms(i)

NEXT i

m.top.content = m.content
' ... EPG view Customization Code ...

end sub
...



And now starts the most intresting things... As i suppose, all what i need is append my custom nodes instead of default, like this:

Default


sub addChannel(index as integer)

channel = m.temp.chns[index]
m.channel = m.content.createChild("ContentNode")
m.channel.TITLE = channel.name

end sub


Custom


sub addChannel(index as integer)

channel = m.temp.chns[index]
m.channel = m.content.createChild("EpgGridChannel")
m.channel.TITLE = channel.name

end sub


I expect that my posters will be inserted into default epg grid, but when i apply content to EPG:



... ' foreach code

m.top.content = m.content

...



a) when i try to customize channels - roku device goes to restart.
b) when i try to customize programs - nothing happens (roku didn't restarted and posters didn't inserted).
How I can customize EPG element?
Sincerely, Sergey Shoshin, software developer.
0 Kudos
1 REPLY 1
dreamer2057
Channel Surfer

Re: EPG Customize

At this moment, for customization, as i understand, will be best to extend Array Grid (or extensions like Markup Grid)
Sincerely, Sergey Shoshin, software developer.
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.