Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
malloys
Visitor

roVideoPlayerEvents with type codes 10, 33, and 0 mean what?

I was hoping someone could shed some light on a few mystery roVideoPlayerEvents I keep seeing in one of my channels under development...
(FWIW, these are seen on firmware 5.4 build 3140, on a model 3100X - I haven't checked yet on other models or the 3.1 firmware)

I'm checking all the is*() function calls that are documented in the SDK docs for roVideoPlayerEvent, but occasionally I get roVideoPlayerEvents that don't match.
None of them appear to return anything from event.GetMessage().
The types codes (i.e. event.GetType() returns) are:

10 - seems to happen when reloading/rebuffering is necessary.
33 - seems to happen when when reloading/rebuffering gets about 1/3 of the way there (but not during the initial loading).
0 - haven't been able to correlate these events with anything yet.

Are there is*() interface functions for these?
Any other info available about them, etc?

Cheers
0 Kudos
7 REPLIES 7
NewManLiving
Visitor

Re: roVideoPlayerEvents with type codes 10, 33, and 0 mean w

I have experienced the same thing. For one thing, the isStatusMessage() returns more than just your run-of-the-mill
"startup progress", "start of play", "end of stream", "playback stopped". If you want some very useful information on failures just put an else at the bottom of all the documented GetMessages.
For example, if you send the name of a video which does not exist. You will get the correct HTTP error response of not found in the isStatusMessage "not documented but but does return something in GetMessage " event (as I have come to call it )
But in the isRequestFailed event you get something like format unsupported which is totally unrelated. You will find that some things are duplicated between the
two "systems" isStatusMessage and "all the other messages" as if someone could not decide which method to use or their is some type of transition going on from one format to the other and they just simlply forgot about it. What worked for me was trying to force every perceivable message and every error condition and then seeing what response I get from using all the messages plus the "other" or another way to put it : else if, else if "ELSE ... statement. As I said, The ELSE tells you some useful information. With that and the roSystemLog component I think I built a pretty rugged videoplayer. But it takes time. You need to force just about everything to happen. And you must absolutely force IsUnderRun
to handle that properly. Just load a bunch of Netflix, hulu, movies, on your phone, laptop, pc, ipad, what-have-you and you will get plenty of anomalies to work over
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
0 Kudos
malloys
Visitor

Re: roVideoPlayerEvents with type codes 10, 33, and 0 mean w

"NewManLiving" wrote:
I have experienced the same thing. For one thing, the isStatusMessage() returns more than just your run-of-the-mill
"startup progress", "start of play", "end of stream", "playback stopped". If you want some very useful information on failures just put an else at the bottom of all the documented GetMessages.
For example, if you send the name of a video which does not exist. You will get the correct HTTP error response of not found in the isStatusMessage "not documented but but does return something in GetMessage " event (as I have come to call it )
But in the isRequestFailed event you get something like format unsupported which is totally unrelated. You will find that some things are duplicated between the
two "systems" isStatusMessage and "all the other messages" as if someone could not decide which method to use or their is some type of transition going on from one format to the other and they just simlply forgot about it. What worked for me was trying to force every perceivable message and every error condition and then seeing what response I get from using all the messages plus the "other" or another way to put it : else if, else if "ELSE ... statement. As I said, The ELSE tells you some useful information.


Right. I guess I wasn't being clear.
I already do what you suggest above - it's why I posted in the first place:
In an if/else if/else block, I test all documented is*() function calls that all the roVideoPlayer related events support as documented in the SDK docs (in this case, the mystery ones I list in the first post are have a type(event) return value of "roVideoPlayerEvent"), and have a final else that catches instances that don't have a corresponding is*() function call.
For instances that hit the final else block (like the ones I'm asking about), I print the values of event.GetMessage(), event.GetInfo(), event.GetData(), event.GetIndex() and event.GetType() to the debug console. In the 3 type codes mentioned (33,10, and 0), GetMessage() comes back empty, and GetInfo() returns invalid - so there is no textual information to use to figure out what the event subtypes are.
I believe that the type codes combined with the fact they're roVideoPlayerEvents should be enough for the Roku support folks to track these mystery events down.

"NewManLiving" wrote:

With that and the roSystemLog component I think I built a pretty rugged videoplayer. But it takes time. You need to force just about everything to happen. And you must absolutely force IsUnderRun
to handle that properly. Just load a bunch of Netflix, hulu, movies, on your phone, laptop, pc, ipad, what-have-you and you will get plenty of anomalies to work over


Hmmmm.... Good idea - use of roSystemLog might help narrow things down. As I mentioned earlier, at least 2 of the 3 mystery events appear to be correlated to loading/rebuffering. I may give that a try and see if the mystery events correlate to log entries with additional info.

Nevertheless, it appears there are 3 undocumented roVideoPlayerEvent subtypes ( or at least 3 without corresponding documented is*() functions ), and that should be corrected in the SDK docs.

Cheers
0 Kudos
NewManLiving
Visitor

Re: roVideoPlayerEvents with type codes 10, 33, and 0 mean w

No you were being clear I just have a bad habit of not reading entire posts before responding. But I stopped trying to figure out when they happened I just react when they do. But if you get further insight please share. The log component has some interesting features however it can bombard your message queue with ( especially ) connection messages so you kind of have to tweak that too. Most of the messages show up eventually somewhere within the event loop, but I noticed that you may get
several unrelated messages before getting the actual error message so the log component is usually on the mark the first time something occurs. When I said play with it I meant you have to weed
through these 'undefined' messages that may mean and often do mean something. And react consistently to them. Like you said they always happen under certain conditions so I just collect them and compare to the log component and go from there. Your way I perceive is to find out when and why they
happen. Good Luck, I have given up on that. I just ride around things until they are fixed. Obviously the roVideoPlayer messaging has to be looked at. But as a note
I do get some text from getMessage in my isstatusChange "else" event
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
0 Kudos
TheEndless
Channel Surfer

Re: roVideoPlayerEvents with type codes 10, 33, and 0 mean w

I believe 0 is isListItemSelected(), which happens when the playlist advances to the next item. And 10 is isRequestInterrupted(). 33 is a mystery...
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)
0 Kudos
malloys
Visitor

Re: roVideoPlayerEvents with type codes 10, 33, and 0 mean w

Thanks TheEndless! - that definitely solves 2 out of 3 mystery events.

"TheEndless" wrote:
I believe 0 is isListItemSelected(), which happens when the playlist advances to the next item.


That's not documented in the SDK as a valid call for roVideoPlayerEvent, but that's what it is (added the isListItemSelected() to the if/else if/else event processing, and that new else if block is hit).
For anyone finding this thread in the future... "Advancing to the next item" also applies to the first item to play, even if there is only 1 item in the content list (i.e. a playlist of 1).

"TheEndless" wrote:
And 10 is isRequestInterrupted().


Also not documented as a valid call for roVideoPlayerEvent, but again you are correct. Added the call, and the new else if block is hit.

"TheEndless" wrote:
33 is a mystery...


I've been playing around a bit more since the first post, and apparently I can cause this event to happen by seek()ing to any new location in any video (at least from the 1 CDN I'm using for this channel).
The type 33 event appears to fire when the video loading progress reaches 33%.... coincidence?... It'd be a weird one - the event timing seems to be pretty consistent.

Cheers
0 Kudos
TheEndless
Channel Surfer

Re: roVideoPlayerEvents with type codes 10, 33, and 0 mean w

"malloys" wrote:
Thanks TheEndless! - that definitely solves 2 out of 3 mystery events.
"TheEndless" wrote:
I believe 0 is isListItemSelected(), which happens when the playlist advances to the next item.

That's not documented in the SDK as a valid call for roVideoPlayerEvent, but that's what it is (added the isListItemSelected() to the if/else if/else event processing, and that new else if block is hit).
For anyone finding this thread in the future... "Advancing to the next item" also applies to the first item to play, even if there is only 1 item in the content list (i.e. a playlist of 1).

It's documented for roAudioPlayerEvent. The old PDF documentation listed the Type values for every event, which is how I found it awhile back. I'm not sure why they removed that from the docs.

"malloys" wrote:
"TheEndless" wrote:
And 10 is isRequestInterrupted().

Also not documented as a valid call for roVideoPlayerEvent, but again you are correct. Added the call, and the new else if block is hit.

This one's documented for roSlideShowEvent. Found same as above... awhile back.

"malloys" wrote:
"TheEndless" wrote:
33 is a mystery...

I've been playing around a bit more since the first post, and apparently I can cause this event to happen by seek()ing to any new location in any video (at least from the 1 CDN I'm using for this channel).
The type 33 event appears to fire when the video loading progress reaches 33%.... coincidence?... It'd be a weird one - the event timing seems to be pretty consistent.

Cheers

The 33 and the 33% aren't related. I believe the first 33% of buffering is actually making the initial range request to verify the stream is valid. Most times you'll get to 33% even if you specify a bad URL.
Sounds like 33 might be a new event for detecting a seek (for fast-forward/rewind), which isn't currently possible, as it only raises an isResumed() event. I'd be willing to bet it's fired at the same time as isStreamStarted (which I believe is also at 33%).
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)
0 Kudos
RokuMarkn
Visitor

Re: roVideoPlayerEvents with type codes 10, 33, and 0 mean w

Event 33 is isFormatDetected, sent when the media format has been determined. It's used internally but I'm not sure if it has any value for a Brightscript app. I'll make a note to update the docs with these items.

--Mark
0 Kudos