The great big "I'm using WIX/SomeWebsiteMaking Tool and I don't know how to fix my embed" thread

Thank you i will try and once again i apprecaite your help

Ye old wix here. This has me banging my head on the wall as I got it working on my own site, but for my friends - I can not. Not sure if the .tv domain is complicating things…

https://www.theblunderdome.tv/stream

<!-- Load the Twitch embed JavaScript file -->
<script src="https://embed.twitch.tv/embed/v1.js"></script>

<!-- Create a Twitch.Embed object that will render within the "twitch-embed" element -->
<script type="text/javascript">
  new Twitch.Embed("twitch-embed", {
    width: 854,
    height: 480,
    channel: "theblunderdome",
    // Only needed if this page is going to be embedded on other websites
    parent: ["www.theblunderdome.tv", "www-theblunderdome-tv.filesusr.com", "theblunderdome.tv","theblunderdome.tv/stream", "www.theblunderdome.tv/stream", "https://www.theblunderdome.tv/stream", "https://www.theblunderdome.tv"]
  });
</script>

Your parent contains https:// and paths

The correct script is

<!-- Load the Twitch embed JavaScript file -->
<script src="https://embed.twitch.tv/embed/v1.js"></script>

<!-- Create a Twitch.Embed object that will render within the "twitch-embed" element -->
<script type="text/javascript">
      new Twitch.Embed("twitch-embed", {
        width: 854,
        height: 480,
        channel: "theblunderdome",
        // Only needed if this page is going to be embedded on other websites
        parent: ["www.theblunderdome.tv", "theblunderdome.tv", "www-theblunderdome-tv.filesusr.com"]
      });
</script>    

1 Like

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

Hello I am looking for some help with a problem I do not understand with embedding your live stream in your website. Using the code below I am able to see the stream on my google sites page but when I go to my website using the domain www.lifewithmoody.com I get a embed error that says “player.twitch.tv refused to connect”. Can anyone tell me what I am doing wrong? and Why the player is not showing up on the site? Thank You In Advance.

The Code I Am Using For Embed:
player code

You parents omitted the main page/website URL here is the correct JS to use

  var options = {
    width: "100%",
    height: "100%",
    channel: "MoodyGamesOnRoblox",
    parent: ["sites.google.com",document.domain,"gstatic.com","www.gstatic.com","www.lifewithmoody.com"]
  };
  var player = new Twitch.Player("<player div ID>", options);
  player.setVolume(0.5);

1 Like

I feel like i am still missing something because the embed is still not loading for me to view it

Now it is missing the error box all together:

The updated code I used for the embed:
code 2

<player div ID> isn’t a valid div ID, It should be a regular word like myplayer or something like that, not that that really gets in the way…

For some reason your player isn’t initing/the JS code isn’t running in the atari iFrame. Why that is I don’t know. (My test/screenshot was from triggering the code manually/not at page load)

I get the feeling google pages is doing some sort of weird lazy load which is intferring with document ready

thank you so much for your help I figured out what was wrong with the code and now it works just find, wouldn’t have made it this far without - thx u

this is the correct code - it was missing the at the bottom of the code
Twitch Embed Code

Im so sorry, but im so new to embedding and I have no idea what’s going on and im so frustrated, I just want my damn twitch on my six, do they really need to make it this complicated?

<html>
  <body>
    <!-- Add a placeholder for the Twitch embed -->
    <div id="twitch-embed"></div>

    <!-- Load the Twitch embed JavaScript file -->
    <script src="https://embed.twitch.tv/embed/v1.js"></script>

    <!-- Create a Twitch.Embed object that will render within the "twitch-embed" element -->
    <script type="text/javascript">
      new Twitch.Embed("twitch-embed", {
        width: 854,
        height: 480,
        channel: "goojick",
        // Only needed if this page is going to be embedded on other websites
        parent: ["embed.example.com", "othersite.example.com"]
      });
    </script>
  </body>
</html>

I have no idea what to put in the “div id” or what parameters to change or anything. I am a hopeless turtle kicking and kicking to turn on its front side. Just like the monotonous repetition of failure throughout my music career lmao. Maybe we can take away a dub this time??? Thanks for all of your help btw, I see you in the thread helping everyone out for free which makes me feel even better entering the twitch community:)

ID’s are unique identifiers to HTML elements on the page, so in yoru copy/pasta is twitch-embed

Your parents are incorrect for your embed. And will need to include the domainname of your website and any other iFrames in the stack. Sites like wix will have multiple iframes due to how they do embeds.

If you provide a link to the broken page I can advise a fix

https://www.heykipp.com/livestream I feel like I infinitely stare into the void with this issue hahaha. I inspect and find the parent iframe from wix, and still never get the feed, just the errored out window
kippsite

<iframe src="https://player.twitch.tv/?channel=heykipp&parent=parent=heykipp.com&parent=www.heykipp.com&parent=https://www-heykipp-com.filesusr.com" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>

The parent param should just be the domain portion of the URL, you don’t need the protocol https://, or any path that comes after the domain (I noticed on the page itself there’s the parent https://www-heykipp-com.filesusr.com/html/8acede_1088a4b2dc22e38f556eb2e51a0decbf.html, this for example doesn’t need the https://, or anything after .com)

This should work as your iframe

<iframe src="https://player.twitch.tv/?channel=heykipp& parent=heykipp.com&parent=www.heykipp.com&parent=www-heykipp-com.filesusr.com" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>

1 Like

So it is! Thank you so much!

Its also occured to me that iframe embed doesn’t allow chat, etc? Any idea what obvious mistake I am making on the second embed I am testing? below the first?

https://www.heykipp.com/livestream

<!-- Load the Twitch embed JavaScript file -->
<script src="https://embed.twitch.tv/embed/v1.js"></script>

<!-- Create a Twitch.Embed object that will render within the "twitch-embed" element -->
<script type="text/javascript">
  new Twitch.Embed("twitch-embed", {
    width: 854,
    height: 480,
    channel: "heykipp",
    // Only needed if this page is going to be embedded on other websites
    parent: ["heykipp.com, www.heykipp.com, www-heykipp-com.filesusr.com"]
  });
</script>

Use a layout of video-with-chat in your options

Then you only need the one iframe

Thanks for the response. I suppose I can just drop the stand alone chat embed in the wix iframe box? If thats essentially the only method then I think I understand. Ideally I want the stream with chat ‘pinned’ to the side and when you full screen - the chat remains on the side. And even ideally the chat being collapsible as on twitch. However if that is super beyond the inherit limitations and its really just boils down to the video window and chat window being seperate elements - then I think I get it and will just also embed chat in the same way.

Twitch doesn’t provide a full screen embed that is video+chat you’d have to devise this yourself

1 Like

The correct URL appears to be

https://player.twitch.tv/?channel=hirory&parent=www.thelovechat.net

You has missed the ? before channel and had a / on the end of the parent