Embed twitch steam only when the streamer is online

Hi guys,

I’ve been trying to get an embed script to work that I found on github. I’m able to use the script section in the code to embed a stream but it doesn’t seem to hide the embed when the streamer is offline.

I noticed that there were some recent changes to twitch embeds and I just wanted to make sure that I’m on the right track to figuring out the issue as it doesn’t seem to be working for me.

Link to Github: https://gist.github.com/fngryboi/f5323765e3358ae27d4a97eb2d63aa3c


It would seem that the event listeners might be broken.

This may get resolved with the upcoming embed player updates:

So an alternative to the player events would be to either use webhooks or the streams endpoint


To obtain Online/Offline status and flip flop based on that instead of pure JS/player calls instead

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.