jvalero
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2012
12:26 PM
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?
4 REPLIES 4
jvalero
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2012
01:47 PM
Re: Best way to listen for end of video with roVideoPlayer
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

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2012
02:46 PM
Re: Best way to listen for end of video with roVideoPlayer
msg.isfullresult() should give you the end of playback.
- Joel
- Joel
jvalero
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2012
02:48 PM
Re: Best way to listen for end of video with roVideoPlayer
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.

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2012
05:21 PM
Re: Best way to listen for end of video with roVideoPlayer
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.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)