destruk
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2012
04:45 PM
How do you discover unexpected event types?
Just curious in the debugger - videos play, the channel app works fine, but I keep seeing prints for unexpected event type: 0 0 ?
When this happens, msg.getType returns "0", msg.getData is "0", msg.getIndex is "0", msg.getMessage is nothing, type(msg) is "roVideoPlayerEvent"
My code handles (alphabetized)
If msg<>invalid
If msg.isButtonPressed()
Else If msg.isFullResult()
Else If msg.isPartialResult()
Else If msg.isPaused()
Else If msg.isPlaybackPosition()
Else If msg.isRemoteKeyPressed()
Else If msg.isRequestFailed()
Else If msg.isResumed()
Else If msg.isScreenClosed()
Else If msg.isStatusMessage()
Else If msg.isStreamStarted() 'simply present to prevent a meaningless error message
Else
Print"Unexpected event type: ";msg.GetMessage()
End If
End If
So which "roVideoPlayerEvent" am I missing?
It doesn't break anything leaving it like it is - from the docs - "If you receive an unknown event in your event loop, you should ignore it; then just continue processing other events. Roku may occasionally add new events, and if your event is written to exit on unknown events, any future events that Roku may add will cause your application to misbehave." - I just want to know what this new event message is for.
When this happens, msg.getType returns "0", msg.getData is "0", msg.getIndex is "0", msg.getMessage is nothing, type(msg) is "roVideoPlayerEvent"
My code handles (alphabetized)
If msg<>invalid
If msg.isButtonPressed()
Else If msg.isFullResult()
Else If msg.isPartialResult()
Else If msg.isPaused()
Else If msg.isPlaybackPosition()
Else If msg.isRemoteKeyPressed()
Else If msg.isRequestFailed()
Else If msg.isResumed()
Else If msg.isScreenClosed()
Else If msg.isStatusMessage()
Else If msg.isStreamStarted() 'simply present to prevent a meaningless error message
Else
Print"Unexpected event type: ";msg.GetMessage()
End If
End If
So which "roVideoPlayerEvent" am I missing?
It doesn't break anything leaving it like it is - from the docs - "If you receive an unknown event in your event loop, you should ignore it; then just continue processing other events. Roku may occasionally add new events, and if your event is written to exit on unknown events, any future events that Roku may add will cause your application to misbehave." - I just want to know what this new event message is for.
3 REPLIES 3

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2012
05:11 PM
Re: How do you discover unexpected event types?
The only VideoPlayer event I see that you're missing is isStreamSegmentInfo. The info AA has members Sequence, SegUrl, StreamBandwidth and SegStartTime. This may not be documented.
--Mark
--Mark

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2012
05:44 PM
Re: How do you discover unexpected event types?
I'm pretty sure isStreamSegmentInfo isn't available in the 3.x firmware, so checking for it could cause a crash unless it's the last one in your If...Then checks, so it should never be reached.
Mark, any chance of getting the event type 7, mentioned in your post here (viewtopic.php?f=34&t=48575&p=331515#p331515), added so we can determine the length of a video without having to have it explicitly in the metadata?
Mark, any chance of getting the event type 7, mentioned in your post here (viewtopic.php?f=34&t=48575&p=331515#p331515), added so we can determine the length of a video without having to have it explicitly in the metadata?
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)
destruk
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2012
07:58 PM
Re: How do you discover unexpected event types?
Thanks Mark! Looks like it's a different one, but I'm not going to lose sleep over it.