Help me in embedding twitch

I can’t understand the code that is being used to create embeds. I used this topic


and changed it to my channel. The problem is when I used that code and inserted it to my site,it is just a white screen.

This more up to date version may help

Otherwise, please post a link to your broken page

the link for the website is https://sites.google.com/view/reinwebsite/twitch?authuser=0
the first one is just a white screen and the second one is the code you sent.

The second one you omitting the script tags and the JS embed…

You just copied and pasted from the readme, and didn’t add the relevant HTML tags. Check the index.html for a more complete example

Every time you save google changes the URL to use in the stack of parents

You need to modify the "2094822009-atari-embeds.googleusercontent.com" in your first one to window.location.host

It dosen’t work…All is now white screen

You embed does not include the JS Embed helper.

So it cannot init a embed

You need a <script src= "https://embed.twitch.tv/embed/v1.js"></script> before your script block.

You also do not need the " around the window location parnet

So your full code should be

<script src= "https://embed.twitch.tv/embed/v1.js"></script>
<script type="text/javascript">
  new Twitch.Player("twitch-embed", {
    channel: "reinschannelyt",
    parent: ["sites.google.com", "www.gstatic.com", window.location.host],
    width: 600,
    height: 300
  });
</script>

It didn’t work. It’s still a white screen

Missing closing " as indicated

I fixed it,but still,white screen

You have embeds instead of embed here

You should be able to copy and paste the code I gave you earlier, you seem to keep making modifications

Fixed