destruk
13 years agoStreaming Star
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.