# Doubled player; iframe fail

**URL:** <https://discuss.dev.twitch.com/t/doubled-player-iframe-fail/40234>\
**Category:** API\
**Created:** [August 28, 2022, 3:28pm UTC](https://discuss.dev.twitch.com/t/doubled-player-iframe-fail/40234 "2022-08-28T15:28:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![HeftyGoof](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/heftygoof/32/19590_2.png) [@HeftyGoof](https://discuss.dev.twitch.com/u/HeftyGoof)\
**Post date:** [August 28, 2022, 3:28pm UTC](https://discuss.dev.twitch.com/t/doubled-player-iframe-fail/40234/1 "2022-08-28T15:28:38Z")

</div>

Hello - seeking help after searching. I’m not technical.

On our website, [gamingmorningshow.tv](http://gamingmorningshow.tv), we’ve been able to embed using the javascript version, but for around the last year, it has doubled up the player.

![image](https://d2opxh93rbxzdn.cloudfront.net/original/3X/7/5/75f18ea3073a8d57e0f1db33827e71a44f5d1b18.png)

We are using Dynadot website builder.

I have tried every version of the iframe embed using [parent=gamingmorningshow.tv](http://parent=gamingmorningshow.tv) OR [parent=gamingmorningshow.tv](http://parent=gamingmorningshow.tv)&[parent=www.gamingmorningshow.tv](http://parent=www.gamingmorningshow.tv) (etc.) – tried lots of varities going through the forum. This is the one that I think should work, but it isn’t:

```auto
<iframe
    src="https://player.twitch.tv/?channel=gamingmorningshow&parent=gamingmorningshow.tv&muted=true"
    height="158"
    width="280"
    allowfullscreen>
</iframe>

```

Like I said - super not technical. Will you please help me get the embed working with just one player. (We want the player only, no chat ideally; we want the option to go full screen in the embed with the player muted on load, please.)

Ryan

---

<div class="post-metadata">

**Author:** ![Xemdo](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/xemdo/32/29273_2.png) [@Xemdo](https://discuss.dev.twitch.com/u/Xemdo)\
**Post date:** [August 29, 2022, 4:29am UTC](https://discuss.dev.twitch.com/t/doubled-player-iframe-fail/40234/2 "2022-08-29T04:29:46Z")

</div>

Looking at the source code on the page, I don’t see your iframe. Did you change it since then?

 ![Twitch embed script](https://d2opxh93rbxzdn.cloudfront.net/original/3X/0/6/06b0b9e038888a01208567145ad1a71a54188309.png)

However I do see the Twitch.Embed JavaScript code, as seen in this image. You should change it to look like this:

```auto
      new Twitch.Embed("twitch-embed", {
        width: 280,
        height: 158,
        channel: "gamingmorningshow",
        allowfullscreen : "true",
        layout : "video",
        parent: ["gamingmorningshow.tv"]
      });

```

After that, leave the code highlighted in my screenshot, and remove your iframe you mentioned in your post.

This is all described further here: [Everything | Twitch Developers](https://dev.twitch.tv/docs/embed/everything)

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 29, 2022, 11:06am UTC](https://discuss.dev.twitch.com/t/doubled-player-iframe-fail/40234/3 "2022-08-29T11:06:50Z")

</div>

I looked at this yesterday.

When I looked it apepared that embed everywhere was in use, and for whatever reason the script is being run Twice.

This seems to be an issue the Dynadot website building but I have no idea why. This would likely be fixed using _just_ the iFrame version instead of the EmbedJS version.

And the presented iFrame code should be

```html
<iframe
    src="https://player.twitch.tv/?channel=gamingmorningshow&parent=gamingmorningshow.tv&parent=www.gamingmorningshow.tv&muted=true"
    height="158"
    width="280"
    allowfullscreen>
</iframe>

```

IE both `gamingmorningshow.tv` and `www.gamingmorningshow.tv` as parents.

> [@Xemdo](#):
>
> However I do see the Twitch.Embed JavaScript code, as seen in this image. You should change it to look like this:
> 
> ```auto
> new Twitch.Embed("twitch-embed", {
> width: 280,
> height: 158,
> channel: "gamingmorningshow",
> allowfullscreen : "true",
> layout : "video",
> parent: ["gamingmorningshow.tv"]
> });
> 
> ```
> 
> After that, leave the code highlighted in my screenshot, and remove your iframe you mentioned in your post.

Omit the parent to let it auto detect. (All their non www.'s seem to redirect to the www. version so auto detect works better.

```javascript
      new Twitch.Embed("twitch-embed", {
        width: 280,
        height: 158,
        channel: "gamingmorningshow",
        allowfullscreen : "true",
        layout : "video"
      });

```

But that won’t solve the double run issue. That appears to be occuring

---

<div class="post-metadata">

**Author:** ![HeftyGoof](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/heftygoof/32/19590_2.png) [@HeftyGoof](https://discuss.dev.twitch.com/u/HeftyGoof)\
**Post date:** [September 5, 2022, 8:45pm UTC](https://discuss.dev.twitch.com/t/doubled-player-iframe-fail/40234/4 "2022-09-05T20:45:43Z")

</div>

> [@BarryCarlyon](#):
>
> And the presented iFrame code should be
> 
> ```auto
> 
> ```

When I copy the iframe code into the website, I get the “player refused” error.  
 ![image](https://d2opxh93rbxzdn.cloudfront.net/original/3X/a/5/a5dd2f161bdd7b772bc19188c3a9920510208a25.png)

Is that also a Dynadot issue? (I’m leaving the iframe code so that you can troubleshoot.) Thanks for the help.

---

<div class="post-metadata">

**Author:** ![HeftyGoof](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/heftygoof/32/19590_2.png) [@HeftyGoof](https://discuss.dev.twitch.com/u/HeftyGoof)\
**Post date:** [September 5, 2022, 8:47pm UTC](https://discuss.dev.twitch.com/t/doubled-player-iframe-fail/40234/5 "2022-09-05T20:47:12Z")

</div>

> [@BarryCarlyon](#):
>
> ```auto
> <iframe
> src="https://player.twitch.tv/?channel=gamingmorningshow&parent=gamingmorningshow.tv&parent=www.gamingmorningshow.tv&muted=true"
> height="158"
> width="280"
> allowfullscreen>
> </iframe>
> 
> ```

WAIT! It might be working. Looks like the “player…” refused to connect error is only shown on the back end. Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [October 21, 2022, 6:48am UTC](https://discuss.dev.twitch.com/t/doubled-player-iframe-fail/40234/7 "2022-10-21T06:48:55Z")

</div>

Closed on October 21, 2022, 6:48am UTC

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