jf-roku/source/Main.brs
2019-01-30 22:56:15 -06:00

31 lines
732 B
Plaintext

sub Main()
'Indicate this is a Roku SceneGraph application'
globals()
screen = CreateObject("roSGScreen")
m.port = CreateObject("roMessagePort")
screen.setMessagePort(m.port)
'todo - pick the scene based on if we need a server already
first_scene = "ServerSelect"
'Create a scene and load a component'
m.scene = screen.CreateScene("VideoScene")
screen.show()
player = VideoPlayer(get_var("video_id"))
while(true)
msg = wait(0, m.port)
msgType = type(msg)
if msgType = "roSGScreenEvent"
if msg.isScreenClosed() then return
end if
end while
end sub
function get_var(key as String)
return GetGlobalAA().Lookup(key)
end function