Your Digital Media Has Never Looked So Good

 
User avatar
dreamer2057
Topic Author
Posts: 62
Joined: Thu Oct 09, 2014 7:28 am
Contact:

EPG Grid Example

Wed Feb 03, 2016 1:23 pm

Anybody has an example of EPG Grid?

I want to customize (or use as it) this:
https://sdkdocs.roku.com/display/sdkdoc/EPGGrid
Sincerely, Sergey Shoshin, software developer.
 
User avatar
dreamer2057
Topic Author
Posts: 62
Joined: Thu Oct 09, 2014 7:28 am
Contact:

Re: EPG Grid Example

Thu Feb 04, 2016 7:46 am

I found an example. On the fifth page. Thanks to edskitter

viewtopic.php?f=34&t=88621&start=60

edskitter wrote:
epgGridScene.xml
<?xml version="1.0" encoding="utf-8" ?> 

<!--********** Copyright 2015 Roku Corp.  All Rights Reserved. **********-->

<component name="epgGridScene" extends="Scene">

   <script type="text/brightscript" >
   
   </script>

   <children>
      <!-- EPG Grid -->
      <customEPGGrid />
   </children>
</component>


EpgGrid.xml
<?xml version="1.0" encoding="utf-8" ?> 

<component name="customEPGGrid" extends="EPGGrid" >

<script type="text/brightscript" >

<![CDATA[

function init()
   print "inside epg"
   m.content = createObject("RoSGNode","ContentNode")
   m.top.setFocus(true)
   
   dateNow = CreateObject("roDateTime")
   dateNow = dateNow.asSeconds() - 2000
   
   addChannel("ABC")
   addItem("ABC Show ", dateNow)
   

   addChannel("CBS")
   addItem("CBS Show ", dateNow)

   addChannel("NBC")
   addItem("NBC Show ", dateNow)
   
   
   addChannel("NICK")
   addItem("NICK Show ", dateNow)

   addChannel("OUTSIDE")
   addItem("Outside Show ", dateNow)
   
   addChannel("TEST")
   addItem("Test Show ", dateNow)

   m.top.content = m.content
   m.top.translation = [50, 300]
   m.top.numRows = 5
   m.top.duration = 10800
   m.top.nowNextMode = false
   m.top.infoGridGap = 0
   m.top.channelInfoColumnLabel = "Hello"
   
end function

sub addChannel(channelText as string)
  m.channel = m.content.createChild("ContentNode")
  m.channel.TITLE = channelText
  m.channel.HDSMALLICONURL = "http://css.boshanka.co.uk/wp-content/uploads/2015/04/icon-logo-design-small.png"
end sub
 
sub addItem(progText as string, timeStart)
  For i=0 To 5 Step 1
    program = m.channel.createChild("ContentNode")
     program.TITLE = progText + str(i)
     program.PLAYSTART = timeStart + (i * 2000)
     program.PLAYDURATION = "2000"
End For
 
end sub

]]>

</script>
</component>


main.brs
'********** Copyright 2015 Roku Corp.  All Rights Reserved. **********

sub Main()
   showChannelSGScreen()
end sub

sub showChannelSGScreen()
   print "in showChannelSGScreen"
   screen = CreateObject("roSGScreen")
   m.port = CreateObject("roMessagePort")
   screen.setMessagePort(m.port)
   scene = screen.CreateScene("epgGridScene")
   screen.show()

   while(true)

      msg = wait(0, m.port)
      msgType = type(msg)

      if msgType = "roSGScreenEvent"

         if msg.isScreenClosed()
            print "screen closed"
          return
          end if

      end if

   end while
end sub


I can get the EPG to render but I can not get the grid to have focus to move up / down / left / right. What am I missing?
Sincerely, Sergey Shoshin, software developer.
 
Vignesh
Posts: 1
Joined: Tue Apr 05, 2016 7:46 am

Re: EPG Grid Example

Tue Apr 05, 2016 7:56 am

I am currently using EPG Grid based on your example. But I need to do some customizations in the EPG Grid (i.e)

How to hide blue colour vertical time line bar in the grid ? &

How to center align the Channel Logo in the First column?
 
xoceunder
Posts: 62
Joined: Wed Dec 14, 2016 4:08 pm

Re: EPG Grid Example

Tue Apr 04, 2017 3:04 pm

dreamer2057 wrote:
I found an example. On the fifth page. Thanks to edskitter

viewtopic.php?f=34&t=88621&start=60

edskitter wrote:
epgGridScene.xml
<?xml version="1.0" encoding="utf-8" ?> 

<!--********** Copyright 2015 Roku Corp.  All Rights Reserved. **********-->

<component name="epgGridScene" extends="Scene">

 <script type="text/brightscript" >
 
 </script>

 <children>
 <!-- EPG Grid -->
 <customEPGGrid />
 </children>
</component>


EpgGrid.xml
<?xml version="1.0" encoding="utf-8" ?> 

<component name="customEPGGrid" extends="EPGGrid" >

<script type="text/brightscript" >

<![CDATA[

function init()
 print "inside epg"
 m.content = createObject("RoSGNode","ContentNode")
 m.top.setFocus(true)
 
 dateNow = CreateObject("roDateTime")
 dateNow = dateNow.asSeconds() - 2000
 
 addChannel("ABC")
 addItem("ABC Show ", dateNow)
 

 addChannel("CBS")
 addItem("CBS Show ", dateNow)

 addChannel("NBC")
 addItem("NBC Show ", dateNow)
 
 
 addChannel("NICK")
 addItem("NICK Show ", dateNow)

 addChannel("OUTSIDE")
 addItem("Outside Show ", dateNow)
 
 addChannel("TEST")
 addItem("Test Show ", dateNow)

 m.top.content = m.content
 m.top.translation = [50, 300]
 m.top.numRows = 5
 m.top.duration = 10800
 m.top.nowNextMode = false
 m.top.infoGridGap = 0
 m.top.channelInfoColumnLabel = "Hello"
 
end function

sub addChannel(channelText as string)
  m.channel = m.content.createChild("ContentNode")
  m.channel.TITLE = channelText
  m.channel.HDSMALLICONURL = "http://css.boshanka.co.uk/wp-content/uploads/2015/04/icon-logo-design-small.png"
end sub
 
sub addItem(progText as string, timeStart)
  For i=0 To 5 Step 1
    program = m.channel.createChild("ContentNode")
   program.TITLE = progText + str(i)
   program.PLAYSTART = timeStart + (i * 2000)
   program.PLAYDURATION = "2000"
End For
  
end sub

]]>

</script>
</component>


main.brs
'********** Copyright 2015 Roku Corp.  All Rights Reserved. **********

sub Main()
 showChannelSGScreen()
end sub

sub showChannelSGScreen()
 print "in showChannelSGScreen"
 screen = CreateObject("roSGScreen")
 m.port = CreateObject("roMessagePort")
 screen.setMessagePort(m.port)
 scene = screen.CreateScene("epgGridScene")
 screen.show()

 while(true)

 msg = wait(0, m.port)
 msgType = type(msg)

 if msgType = "roSGScreenEvent"

 if msg.isScreenClosed()
 print "screen closed"
 return
 end if

 end if

 end while
end sub


I can get the EPG to render but I can not get the grid to have focus to move up / down / left / right. What am I missing?


How can i get a link list with your epg and select to play the video
 
jitendragaurgkv
Posts: 24
Joined: Sun Sep 18, 2016 11:35 pm
Contact:

Re: EPG Grid Example

Tue May 22, 2018 1:19 am

How i can use this code to make My EPG using XMl feed or JSON Feed

Who is online

Users browsing this forum: No registered users and 4 guests