maybe I’m blind, but I’m searching an option to find out in my (viewer)Panel extension if the streamer on which page the extension is shown is online/offline and if the stream is live or replay or it is a hostet stream.
Can’t find it in onContext.
Can anyone help?
Our extension needs to know if the strem is online AND live from the original streamer.
i currently do the first thing to check the live activated extensions endpoint. however the issue of vodcast came up, and only way i know how to do it is as you suggested. however im afraid of the rate limits. say a streamer has 10,000 people hit a page with this extension, as far as i know live activated extensions isnt rate limited so it was safe, but new twitch api definitely is rate limited (30 for non bearer 120 for bearer)?
I also suggested a long time ago for the onContext - context object tell us wether the streamer is live, hosting, vodcasting but it was never added.
That is also the problem I see at this point.
Our extension needs the information if streamer is live in realtime. If the stream goes offline, the extension have to change its content directly.
To reach that we have to poll this information very often, what is not such a good solution.
We can do the polling of the information in our EBS and send the updates to the extension panels if there is a change. That minimizes the number of requests on API, but its still not a smart solution.
I would probably not recommend designing your extension to need to-the-second accuracy. The live extensions endpoint is pretty quick to updated, I’d say probably <1min, so I’d probably try and build around that.
If absolutely need a higher level of accuracy, I’d probably have your backend monitor the stream feed for each channel you’re installed on and notify your extension whenever the broadcast cuts. However that’s probably going to use a lot of bandwidth and a decent amount of computational grunt.
The second way is correct. Unfortunately, Twitch currently makes that endpoint 404 until your extension is released. For now, you should use a placeholder function (that just returns your testing channel ID), then switch to the real function once your extension is live. You can also go and comment in the other threads on this and tell the Twitch team it’s causing you problems!