I have an roVideoScreen that is loading and seems to hang when it waits on a new message. I have verified the URL going in is valid [using Print urls.GetEntry(0)] and in my code I get the "in while loop" in telnet but nothing past that. The TV shows "retrieving" and never shows any progress on the progress bar. The remote buttons also don't seem to do anything and I have to hit the home button to exit all the way out as the back button doesn't work.
I'm sure I've missed something simple, but I would appreciate some help.
Sub ShowVideoScreen(StartPosition As Integer)
port = CreateObject("roMessagePort")
screen = CreateObject("roVideoScreen")
episode = CreateObject("roAssociativeArray")
episode.HDBranded = false
episode.IsHD = false
urls = CreateObject("roArray", 0, True)
urls.Push(m.CurrentVideo.URL)
Print urls.GetEntry(0)
episode.StreamUrls = urls
episode.StreamFormat = "mp4"
screen.SetContent(episode)
screen.SetMessagePort(port)
screen.Show()
print "before the while loop"
while true
Print "in while loop"
msg = wait(0, screen.GetMessagePort())
print type(msg)
if type(msg) = "roVideoScreenEvent" then
print "showVideoScreen | msg = "; msg.GetMessage() " | index = "; msg.GetIndex()
if msg.isScreenClosed()
print "Screen closed"
exit while
else if msg.isStatusMessage()
print "status message: "; msg.GetMessage()
else if msg.isPlaybackPosition()
print "playback position: "; msg.GetIndex()
else if msg.isFullResult()
print "playback completed"
exit while
else if msg.isPartialResult()
print "playback interrupted"
exit while
else if msg.isRequestFailed()
print "request failed – error: "; msg.GetIndex();" – "; msg.GetMessage()
exit while
end if
end if
end while
print "after the while loop"
End Sub