Hey, I came across an issue that events for stream.online from EventSub are creating new stream identifier and are fired for the same stream when the stream is temporary down.
But in the Insights in streamer dashboard it acts as one stream. How can I achieve such behavior as Twitch is having with the events?
If the stream is down for long enough that stream.offline is fired, then it’s going to have a different stream ID if it starts up again. There is some protection built in against minor stream outages to not fire the offline message right away, but beyond that it’s entirely up to you how you want to handle it within your app.
If you want it to look like a single stream, then you’d need your app to ignore the stream offline/online events if they happen close enough to eachother (how close for it to still be classed as the same stream would be up to you), and then also a way to track that the stream has 2 (or more) Stream ID’s.
Thanks for the input, the weirdest thing from my perspective is that in Insights it acts as one stream, therefore Twitch is having some protection that is not used when firing events.
I’ll try to go around it, but having multiple stream IDs tied to one is quite big change for me at the moment. As some queries on my backend use those.
On Twitch it’s still likely counted as multiple individual streams internally, it’s just their frontend or on insights data simply do what you need to do where you check if a stream went online shortly after going offline, and treat it as a single stream.