Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jnixon
Level 7

How to detect HLS stream switching

Is there a way to detect when HLS streams switch? I would like to gather some statistics. From what I can tell an isStreamStarted event is thrown when streams switch and I see there is some data in the isStreamStarted event on roVideoScreen, but StreamBitrate seems to always be 0.
0 Kudos
2 REPLIES 2\
RokuChris
Roku Employee
Roku Employee

Re: How to detect HLS stream switching

"jnixon" wrote:
Is there a way to detect when HLS streams switch? I would like to gather some statistics. From what I can tell an isStreamStarted event is thrown when streams switch and I see there is some data in the isStreamStarted event on roVideoScreen, but StreamBitrate seems to always be 0.


There's a roVideoScreenEvent called isStreamSegmentInfo() that I think will give you the data you're looking for. If memory serves, it's only available on 4.x, so you won't get it on older boxes running firmware 3.1.
0 Kudos
jnixon
Level 7

Re: How to detect HLS stream switching

Thank you for the response. Is that event documented anywhere?
0 Kudos