edskitter
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2015
04:25 PM
Re: Beta Scene Graph Components
Does anyone have an example of the epggrid? It would be great to see the performance and what is offered...
edskitter
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2015
12:23 PM
Re: Beta Scene Graph Components
epgGridScene.xml
EpgGrid.xml
main.brs
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?
<?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?

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2015
11:54 PM
Re: Beta Scene Graph Components
"edskitter" wrote:
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?
Try giving your customEPGGrid tag an id and setting the "initialFocus" attribute of the epgGridScene component. Or set focus to the grid explicitly inside the init function (which currently doesn't exist) in your epgGridScene.xml.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
sudo97
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2015
04:27 AM
Re: Beta Scene Graph Components
What about creating one scene from another? I need to edit settings in my application. Or can I just use Dialogs?
here's code I wrote to create a simple dialog, and nothing appears, when I press button:
I use roku stick, what am I doing wrong?
SOLVED, just had to write m.top.dialog instead of m.dialog
here's code I wrote to create a simple dialog, and nothing appears, when I press button:
function onKeyEvent(key as string, press as boolean) as boolean
handled = false
if (press)
if(key = "options")
m.dialog = CreateObject("roSGNode", "Dialog")
m.dialog.title = "HELLO WORLD"
m.dialog.message = "SIMPLE DIALOG"
handled = true
end if
end if
return handled
end function
I use roku stick, what am I doing wrong?
SOLVED, just had to write m.top.dialog instead of m.dialog
edskitter
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2015
06:51 AM
Re: Beta Scene Graph Components
Thanks Endless but I had tried both. Strange, I used this :
inside the customEPGGrid component and I am able to scroll now. I am really not sure why that kicked it off. I kept the m.top.setFocus(true) inside the component as before.
m.top.jumpToItem = 0
m.top.animateToItem = 1
inside the customEPGGrid component and I am able to scroll now. I am really not sure why that kicked it off. I kept the m.top.setFocus(true) inside the component as before.
edskitter
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2015
08:07 AM
Re: Beta Scene Graph Components
Concerning video, what are Roku's plan for securing video?
In previous version, I was using :
videoContent.Addheader("reserved-id", "xxxx.."
videoContent.SetCertificatesFile("pkg:/certs/xx.crt")
videoContent.InitClientCertificates()
How can we achieve this with the new API?
In previous version, I was using :
videoContent.Addheader("reserved-id", "xxxx.."
videoContent.SetCertificatesFile("pkg:/certs/xx.crt")
videoContent.InitClientCertificates()
How can we achieve this with the new API?
edskitter
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2015
08:13 AM
Re: Beta Scene Graph Components
How would keep persistent data ( i.e. login information ) as roRegistry is not allowed in the Graph components?
vjani
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2015
10:58 PM
Re: Beta Scene Graph Components
Hello,
I am going through the Scene Graph documentation to figure out whether we can use that for our channel or not. Since the Video roSGNode replaces roVideoPlayer/roVideoScreen, how do I listen for the various events that those components used to throw, such as isStreamStarted/isPlaybackPosition etc? There are no "ObserveOnly" Event fields in the Video documentation, which I can observe using observeField. Is there any example for videoplayer with progressbar that I can refer using the Scene Graph framework?
Thanks,
Vivek
I am going through the Scene Graph documentation to figure out whether we can use that for our channel or not. Since the Video roSGNode replaces roVideoPlayer/roVideoScreen, how do I listen for the various events that those components used to throw, such as isStreamStarted/isPlaybackPosition etc? There are no "ObserveOnly" Event fields in the Video documentation, which I can observe using observeField. Is there any example for videoplayer with progressbar that I can refer using the Scene Graph framework?
Thanks,
Vivek
edskitter
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2015
06:14 AM
Re: Beta Scene Graph Components
Hello Vivek,
You can use the observeField like this :
I did receive an error when the hlsLoading function reached 100% though.
You can use the observeField like this :
m.video.ObserveField("state","hlsStatus")
m.video.ObserveField("bufferingStatus", "hlsLoading")
function hlsStatus() as void
print m.video.state
end function
function hlsLoading() as void
loading = m.video.bufferingStatus
print "========="
print "hlsLoading"
print loading.percentage
print loading.isUnderrun
print "========="
'end function
I did receive an error when the hlsLoading function reached 100% though.
edskitter
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2015
11:50 AM
Re: Beta Scene Graph Components
Could Roku post an example with multiple scenes and how to navigate between them? That would be a great start to learning how to use the Scene Graph components. The examples posted seem to show a main.brs with 1 scene creation.
For example, multiples scenes involving :
Marketing scene
Login scene
Video scene
Channel Navigation (EPGGrid) scene
It would cool to see how best to architect this with the new Scene graph components.
When will this go live from Beta?
For example, multiples scenes involving :
Marketing scene
Login scene
Video scene
Channel Navigation (EPGGrid) scene
It would cool to see how best to architect this with the new Scene graph components.
When will this go live from Beta?