p2premote
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2012
10:28 AM
Why 'Video status' event is not firing?
I am interested seeing video status event to know if the video has started playing, but it looks like the event is not being fired.
In RokuSDK_v41/examples/source/videoplayer/source/appVideoScreen.brs, it has:
if type(msg) = "roVideoScreenEvent" then
print "showHomeScreen | msg = "; msg.getMessage() " | index = "; msg.GetIndex()
if msg.isScreenClosed()
print "Screen closed"
exit while
...
elseif msg.isStatusMessage()
print "Video status: "; msg.GetIndex(); " " msg.GetData()
But when running the example on my roku box, I have never seen the status message. For example, the following is copied from telnet:
url: http://rokudev.roku.com/rokudev/example ... tivity.xml
Request Time: 60
Show Feed Parse Took : 21
ButtonPressed
ButtonPressed
showHomeScreen | msg = Stream started. | index = 1
Unexpected event type: 20
showHomeScreen | msg = | index = 0
showHomeScreen | msg = Playback interrupted by user. | index = 0
Unexpected event type: 15
showHomeScreen | msg = | index = 0
Screen closed
Button pressed: 2 0
The video plays fine, but I have not seen any '"Video status' message.
Thanks.
In RokuSDK_v41/examples/source/videoplayer/source/appVideoScreen.brs, it has:
if type(msg) = "roVideoScreenEvent" then
print "showHomeScreen | msg = "; msg.getMessage() " | index = "; msg.GetIndex()
if msg.isScreenClosed()
print "Screen closed"
exit while
...
elseif msg.isStatusMessage()
print "Video status: "; msg.GetIndex(); " " msg.GetData()
But when running the example on my roku box, I have never seen the status message. For example, the following is copied from telnet:
url: http://rokudev.roku.com/rokudev/example ... tivity.xml
Request Time: 60
Show Feed Parse Took : 21
ButtonPressed
ButtonPressed
showHomeScreen | msg = Stream started. | index = 1
Unexpected event type: 20
showHomeScreen | msg = | index = 0
showHomeScreen | msg = Playback interrupted by user. | index = 0
Unexpected event type: 15
showHomeScreen | msg = | index = 0
Screen closed
Button pressed: 2 0
The video plays fine, but I have not seen any '"Video status' message.
Thanks.
8 REPLIES 8

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2012
10:36 AM
Re: Why 'Video status' event is not firing?
showHomeScreen | msg = Stream started. | index = 6
That IS a status message
While it is playing you will see this:
showHomeScreen | msg = | index = 60
where the index is the position in seconds in the video.
- Joel
That IS a status message
While it is playing you will see this:
showHomeScreen | msg = | index = 60
where the index is the position in seconds in the video.
- Joel
p2premote
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2012
10:47 AM
Re: Why 'Video status' event is not firing?
'Stream started' is a different event. The video is not showing on the screen when 'stream started'. It looks like roku starts to download the video when this event happens, but normally it takes a few more seconds of buffering before the video starts to play.
I am interested in the event that can tell me if the video is actually showing up on the screen.
I am interested in the event that can tell me if the video is actually showing up on the screen.

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2012
12:12 PM
Re: Why 'Video status' event is not firing?
This appears to be what you get when the image actually first shows on the screen:
?"message:";msg.getmessage();" Type:";msg.gettype();" Index:"; msg.getindex();" data:";msg.getdata()
message: Type: 6 Index: 0 data: 0
so msg.gettype() returns 6, which is the same as what msg.isplaybackposition() would give you, in otherwords, you get a playback position of 0 with a message type 6.
- Joel
?"message:";msg.getmessage();" Type:";msg.gettype();" Index:"; msg.getindex();" data:";msg.getdata()
message: Type: 6 Index: 0 data: 0
so msg.gettype() returns 6, which is the same as what msg.isplaybackposition() would give you, in otherwords, you get a playback position of 0 with a message type 6.
- Joel

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2012
12:20 PM
Re: Why 'Video status' event is not firing?
To expand on that a little bit:
Output when video shows:
******************************************MESSAGE**********************************
message: Type: 6 Index: 0 data: 0 playback pos? true
******************************************MESSAGE**********************************
if type(msg) = "roVideoScreenEvent" then
?"******************************************MESSAGE**********************************"
?"message:";msg.getmessage();" Type:";msg.gettype();" Index:"; msg.getindex();" data:";msg.getdata();" playback pos? ";msg.isplaybackposition()
?"******************************************MESSAGE**********************************"
Output when video shows:
******************************************MESSAGE**********************************
message: Type: 6 Index: 0 data: 0 playback pos? true
******************************************MESSAGE**********************************
p2premote
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2012
01:18 PM
Re: Why 'Video status' event is not firing?
Thanks. I saw the event with type 6 for mp4.
But I am not able to see any status for HLS stream. The only even I saw is 'stream starts'. Is there a way to tell if the video starts playing for HLS stream?
But I am not able to see any status for HLS stream. The only even I saw is 'stream starts'. Is there a way to tell if the video starts playing for HLS stream?
p2premote
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2012
11:44 AM
Re: Why 'Video status' event is not firing?
I tried many ways, still not able to see status message for http live streaming (hls).
Any one knows if it is possible? If it is not available now, I highly recommend Roku to add one, there are lots of creative things people can do while video is buffering.
Any one knows if it is possible? If it is not available now, I highly recommend Roku to add one, there are lots of creative things people can do while video is buffering.


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2012
12:02 PM
Re: Why 'Video status' event is not firing?
isPlaybackPosition and isStreamStarted both work with HLS.
Are you calling SetPositionNotificationPeriod() on your roVideoScreen? If you don't, isPlaybackPosition will not fire.
Are you calling SetPositionNotificationPeriod() on your roVideoScreen? If you don't, isPlaybackPosition will not fire.
p2premote
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2012
01:01 PM
Re: Why 'Video status' event is not firing?
Thank you Chris!
Yes I did not call SetPositionNotificationPeriod, and it works after I added it.
Yes I did not call SetPositionNotificationPeriod, and it works after I added it.