I seemed to have run into the same problem reported in this earlier post - "
Help with videoplayer resume playing functionality". I, too, designed my channel around the same sample and have run into the same issue(s). I tried the code changes mentioned in the post, but, they don't seem to work for me. Here's the current state of my loop, and, the attempts I've made to debug:
while true
msg = wait(0, port)
if type(msg) = "roVideoScreenEvent" then
print "showHomeScreen | msg = "; msg.getMessage() " | index = "; msg.GetIndex()
if msg.isScreenClosed()
print "Screen closed"
exit while
else if msg.isRequestFailed()
print "Video request failure: "; msg.GetIndex(); " " msg.GetData()
'RegWrite(episode.contentId, "0")
RegDelete(episode.contentId)
else if msg.isFullResult()
print "Playback completed"
'RegWrite(episode.contentId, "0")
RegDelete(episode.contentId)
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
One thing I've noticed that may be related: when finished playing a video, I consistently get an "Unexpected event - 8" in my debug console.
showHomeScreen | msg = start of play | index = 0
Video status: 0 0
showHomeScreen | msg = playback position | index = 0
showHomeScreen | msg = playback position | index = 30
showHomeScreen | msg = playback position | index = 60
showHomeScreen | msg = | index = 0
Unexpected event type: 8
Current position: 0
showHomeScreen | msg = end of stream | index = 0
Video status: 0 0
showHomeScreen | msg = Playback completed. | index = 0
Playback completed
showHomeScreen | msg = end of playlist | index = 0
Video status: 0 0
I tried researching the event types from roVideoScreenEvent and roVideoPlayerEvent, but, there doesn't seem to be a numerical listing of what the events mean, and, I'm at a loss where to get information about what "Unexpected event type 8" means.
I also noticed that if I remove the channel and side load it fresh, it displays the "resume playing" button the very
first time I try to play a video.
I could use some help in trying to figure this out.
FREE Windows desktop software for creating
BIF (Trick Play),
Direct Publisher (MRSS, JSON), and
FireTV feeds @
GitHub/rrirower.
No programming knowledge required.