I'm working on an app that has a large video that I break up into smaller clips. You can select to play just certain clips which are separate objects in my video array, with the playduration set to the length of the clip. However, I noticed that when the Roku gets to the end of that duration, it does stop the video, but it also triggers the isRequestFailed() message. For instance, here is my event loop that tracks the messages and events during the video playback:
msg = wait(0, port)
if type(msg) = "roVideoScreenEvent" then
print "showHomeScreen | msg = "; msg.getMessage() " | index = "; msg.GetIndex()
print "Screen closed"
print "Video request failure: "; msg.GetIndex(); " " msg.GetData()
print "Video status: "; msg.GetIndex(); " " msg.GetData()
print "Button pressed: "; msg.GetIndex(); " " msg.GetData()
elseif msg.isPlaybackPosition() then
nowpos = msg.GetIndex()
print "now position"
print "Unexpected event type: "; msg.GetType()
print "Unexpected message class: "; type(msg)
the isRequestFailed message evaluates as True when the video stops playing (at the correctly determined clip end). This is annoying because I display a dialog box to the user if there is an issue with the video, and right now the dialog box always shows up when the clips stop playing. Is this a known issue or am I doing something wrong?
Thanks in advance,