Twitch Embed for Discourse with API

Hello I see you guys are running Discourse app for the forums and I was wondering if anyone is familiar with API embedding on Discourse.

I can embed on header and footer with iframes on my site already, however I would like to use the API code like the following to have more features like the follow button and sub inside the video frame.

<div id="twitch-embed"></div>

<script src=""></script>

<script type="text/javascript">
  new Twitch.Embed("twitch-embed", {
    width: 854,
    height: 480,
    layout: "video",
    channel: "lutechi"

I can’t get it to work on Discourse header or footer, but since you guys are running Discourse I was wondering if anyone knew the work around to make it work as API + JS without using iframe.

Thanks in advance!

You basically have to use iFrame, it works for all rich media, YouTube/etc

We’ve not done anything special on this Discourse, it’s just a stock install afaik

So, Just post the Twitch URL


And Discourse rich media magic embed handles it



I am familiar with embedding through posts for the rich media embeds with a simple link, however these do not work when trying to do it on the theme level and not inside a post.

Basically I am trying to add the API scripts I posted previously to the Customize > Themes > CSS & HTML sections.

I can do it with iframes but the API will give more features and a simple rich media link does not work in there.

Thanks for the quick reply.

Then you are better suited to consulting Discourse support than the Twitch API support forums. Since you are talking about Discourse not the API really.

Alright, I thought it was worth a shot since you guys were using the same App maybe someone knew how to do it at the theme level.

Thanks again and have a great day!

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