# Parent=meta.tag, player won't connect

**URL:** <https://discuss.dev.twitch.com/t/parent-meta-tag-player-wont-connect/29739>\
**Category:** API\
**Created:** [January 2, 2021, 12:41am UTC](https://discuss.dev.twitch.com/t/parent-meta-tag-player-wont-connect/29739 "2021-01-02T00:41:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![greasy\_gamer](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/greasy_gamer/32/8317_2.png) [@greasy\_gamer](https://discuss.dev.twitch.com/u/greasy_gamer)\
**Post date:** [January 2, 2021, 12:41am UTC](https://discuss.dev.twitch.com/t/parent-meta-tag-player-wont-connect/29739/1 "2021-01-02T00:41:51Z")

</div>

Refused to frame ‘[https://player.twitch.tv/](https://player.twitch.tv/)’ because an ancestor violates the following Content Security Policy directive: “frame-ancestors”

When I post a Twitch link on my site, it tries to embed it using the parent=meta.tag instead of [parent=greasygamer.com](http://parent=greasygamer.com)

I just installed a php script for the site, Sngine. It worked fine on xenforo which is still currently [greasygamer.com/](http://greasygamer.com/). The Sngine install is at [greasygamer.com/sngine](http://greasygamer.com/sngine) for now, but will be moving it to the main URL once this twitch thing is figured out.

---

<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:** [January 2, 2021, 3:25pm UTC](https://discuss.dev.twitch.com/t/parent-meta-tag-player-wont-connect/29739/2 "2021-01-02T15:25:22Z")

</div>

Then it sounds like a bug with sngine. Not really something we can help with.

---

<div class="post-metadata">

**Author:** ![greasy\_gamer](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/greasy_gamer/32/8317_2.png) [@greasy\_gamer](https://discuss.dev.twitch.com/u/greasy_gamer)\
**Post date:** [January 3, 2021, 12:57pm UTC](https://discuss.dev.twitch.com/t/parent-meta-tag-player-wont-connect/29739/3 "2021-01-03T12:57:35Z")

</div>

Lmao here was sngine response

This iframe code is not coming from Sngine but this is what Sngine get from the twitch itself.

Like in here: [Embed tests](https://oscarotero.com/embed/demo/)

Sngine use the same library BTW.

So Sngine simply save this HTML code returned and then display it, So there is no way to do so unless you add some code to check if it’s twitch or not and then add some code to do whatever you want,

> **[Screenshot-2021-01-02-010905 hosted at ImgBB](https://ibb.co/pbDzGkv)**
>
> Image Screenshot-2021-01-02-010905 hosted in ImgBB

_ **includes/class-user.php** _

---

<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:** [January 3, 2021, 1:04pm UTC](https://discuss.dev.twitch.com/t/parent-meta-tag-player-wont-connect/29739/4 "2021-01-03T13:04:53Z")

</div>

> [@greasy\_gamer](#):
>
> This iframe code is not coming from Sngine but this is what Sngine get from the twitch itself.

“From Twitch itself”? What does that mean?

Looking at at the screenshot, the function is called scraper. This suggests that it’s scraping the Twitch page for the Embed code. And is not replacing “meta.tag” with the correct parent.

sngine needs to generate an embed as documented, not via whatever the hell they are doing.

> **[Embedding Twitch](https://dev.twitch.tv/docs/embed/)**
>
> Embedding Twitch in Your Website

So, again, it’s sngine at fault. Not Twitch.

---

<div class="post-metadata">

**Author:** ![greasy\_gamer](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/greasy_gamer/32/8317_2.png) [@greasy\_gamer](https://discuss.dev.twitch.com/u/greasy_gamer)\
**Post date:** [January 3, 2021, 1:15pm UTC](https://discuss.dev.twitch.com/t/parent-meta-tag-player-wont-connect/29739/5 "2021-01-03T13:15:20Z")

</div>

Yeah I figured that much. The creator of sngine seems like an ass… but I will let them know.

Thanks for your help bud

---

<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:** [February 2, 2021, 1:15pm UTC](https://discuss.dev.twitch.com/t/parent-meta-tag-player-wont-connect/29739/6 "2021-02-02T13:15:21Z")

</div>

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