Refused to frame 'https://embed.twitch.tv/' because an ancestor violates the following Content Security Policy directive

Yes, much appreciated. This was not a problem until a couple days ago.

Changes were announced over 4 months ago, along with info on how to comply with these new changes.

If using a parent param is still not working for you, then you’ve either entered it erroneously (eg, you’ve included things other than the domain portion, such as protocol, port, or path, which should not be included), not included every parent (if you’re using a site-builder such as wix then they will put your content inside another iframe, ALL parents must be included so you need to include every iframe your embed is within as parents), or you’re not serving your page over HTTPS which is a requirement now (with the exception being localhost or 127.0.0.0/8 parents where HTTPS is not required).

I don’t see an embed on the page you linked, so I can’t help you.

I have no idea what the iframe is for wix’es editor is, I don’t use wix

I was asleep, there is no need to bump threads

IE is dead/deprecated doesn’t implement new browser features

Checking https://sourceinvite.wixsite.com/sourceinvite/streams

has the iframe of

https://sourceinvite-wixsite-com.filesusr.com/html/ff247d_a61dced71f0dc378928cbf0b15b78b5d.html

Which has no parents


<html>
  <body>
    <div id="twitch-embed"></div>
    <script src="https://embed.twitch.tv/embed/v1.js"></script>
    <script type="text/javascript">
      new Twitch.Embed("twitch-embed", {
        width: '100%',
        height: '100%',
        channel: "sourceinvite",
      });
    </script>
  </body>
</html>

Should be


<html>
  <body>
    <div id="twitch-embed"></div>
    <script src="https://embed.twitch.tv/embed/v1.js"></script>
    <script type="text/javascript">
      new Twitch.Embed("twitch-embed", {
        width: '100%',
        height: '100%',
        channel: "sourceinvite",
        parent: ["sourceinvite-wixsite-com.filesusr.com", "sourceinvite.wixsite.com"]
      });
    </script>
  </body>
</html>

image

If you are using Wix please see the great big Wix thread

https://discuss.dev.twitch.tv/t/the-great-big-im-using-wix-and-i-dont-know-how-to-fix-my-embed-thread/26297/

Otherwise

https://discuss.dev.twitch.tv/t/twitch-embedded-player-updates-in-2020/23956/

I used this and it worked. for some reason it wasnt loading in the editor like it normally does. I had to publish it first and then after i published it it appeared on the live site. thanks for the help barry.

<html>
  <body>
    <div id="twitch-embed"></div>
    <script src="https://embed.twitch.tv/embed/v1.js"></script>
    <script type="text/javascript">
      new Twitch.Embed("twitch-embed", {
        width: '100%',
        height: '100%',
        channel: "sourceinvite",
        parent: ["sourceinvite-wixsite-com.filesusr.com", "sourceinvite.wixsite.com"]
      });
    </script>
  </body>
</html>

you can see it here https://sourceinvite.wixsite.com/sourceinvite/streams

Yup all of our fixes don’t contain the fix for WIX’s editor just live

1 Like

A post was merged into an existing topic: The great big “I’m using WIX/SomeWebsiteMaking Tool and I don’t know how to fix my embed” thread