the quit messages aren't even firing either.
updated code still having issues
screen = CreateObject("roSGScreen")
m.port = CreateObject("roMessagePort")
screen.setMessagePort(m.port)
if contentid <> invalid
m.vidd = contentid
else
m.vidd = ""
end if
m.global = screen.getGlobalNode()
m.global.id = contentid
m.global.addFields( {id: contentid} )
scene = screen.CreateScene("VideoExampleScene")
screen.show()
while(true)
print "in while loop"
msg = wait(0, m.port)
msgType = type(msg)
print "msg"
print msg
print msgType
if msgType = "roSGScreenEvent"
print "showHomeScreen | msg = "; msg.getMessage() " | index = "; msg.GetIndex()
if msg.isScreenClosed()
print "Screen closed"
return
else if msg.isRequestFailed()
print "Video request failure: "; msg.GetIndex(); " " msg.GetData()
else if msg.isFullResult()
print "Playback completed"
else if msg.isStatusMessage()
print "Video status: "; msg.GetIndex(); " " msg.GetData()
else if msg.isButtonPressed()
print "Button pressed: "; msg.GetIndex(); " " msg.GetData()
else if msg.isPlaybackPosition() then
nowpos = msg.GetIndex()
RegWrite(episode.ContentId, nowpos.toStr())
else
print "Unexpected event type: "; msg.GetType()
nowpos = msg.GetIndex()
print "Current position: "; nowpos.ToStr()
RegDelete(episode.contentId)
end if
else
print "Unexpected message class: "; type(msg)
end if
end while