Best way to listen for end of video with roVideoPlayer

What is the best/easiest way to listen for the end of a single video in the roVideoPlayer playlist? It seems isFullResult() only fires at the the very end of the playlist. Also how can I gain access to attributes (meta data) of the current item being played?

I figured it out. I was hoping to just use a built in event, but it does not seem that one fires at the end of a video in the playlist. So what I did was:

'// Set Index to 0 to mirror playing from the start of the playList
currentIndex = 0

'// Code to setup roVideoPlayer and Event Loop Here ...

'// Event Listener for Position
If msg.isPlaybackPosition() Then

    index = msg.GetIndex()
    
    If index.tostr() = playList[currentIndex].Length

    currentIndex = currentIndex + 1

    '// Do something

   End If

End If

msg.isfullresult() should give you the end of playback.

  • Joel

No, it doesn’t seem to fire as expected. I haven’t tested it, but I think it will fire at the end of the playlist. I could be wrong, but it does not fire at the end of each item in the playlist.

I think you should get an “end of stream” status message in the IsStatusMessage() event. There may also be an undocumented IsRequestSucceeded() event. I’ve found that quite a few of the documented roAudioPlayerEvents are also present in the roVideoPlayer, even though they’re not documented as such.