onContext hlsLatencyBroadcaster not working in local/hosted test?

In my extension panel, I’m trying to get the hlsLatencyBroadcaster using the onContext function.

I know my code somewhat works because it works in the developer rig when I manually change the context - but when I test it on my twitch channel the context never gets updated so hlsLatencyBroadcaster is not part of the onContext object.

Is it supposed to work this way? Or am I missing something out.

1 Like

Last time I tested it.

It works fine in localhost and hosted for me

Heres a 3 month old video showing it working in localtest

And it’s related test code

1 Like

Hey Barry, what’s the difference between the two extension panels in your video? One seems to be receiving the hlsLatency updates, but not the other.

The second/left is the “popout view”

Ah right yeah, and the “popout view” won’t receive the values for hlsLatency etc.?

Popout view doesn’t have a video to load/obtain the Latency from.
As it’s in another window, so it doesn’t know what the latency is.
And in theory you can open a popout video and close the original window. So there is no video anywhere, either

Ah yes. Makes sense! For some reason, even using your code, I’m getting the same limited context and it isn’t being triggered by the video, even in non popup mode. Could this be because the testing base URI is http not https?

Still not working for me. ‘game’ and ‘theme’ do get updated when I change those but for some reason even if I change the display resolution or pause the player the context never gets triggered - seems like all video related parameters aren’t being updated.

I’m running it on the react boilerplate app and streaming to twitch by OBS.

No as if you can see the table from the test code then the extension loaded.

See issue 223 about game onContext game inaccurate on game change · Issue #233 · twitchdev/issues · GitHub

Never used the react boilerplate, my example code is pure javascript, nothing gets in the way like react may.

The video source makes no difference

I just went and tested my example code. Looks like Twitch broke something :expressionless:

Left 3 months ago. Right. same code, right now

Raised as onContext not sending any video data (eg: hls delay) when ONLY a panel is active on the channel · Issue #284 · twitchdev/issues · GitHub

I have observed if there is any other extension active in the video slot then it works

Yeah I just tested and I get the HLS latency in my app if I use it as an overlay instead of a panel.

Thanks Barry!

Yeah I put another extension into the video slot

And suddenly the panel was getting data too. So something is screwy