Embedding issue in Google Sites

I am trying to provide a live view in my Google Sites website, however I am constantly getting errors.

An old article here : https://support.google.com/sites/thread/24626107?hl=en

States that google sites uses sandbox iframe so it’s not possible to embed twitch.

Logically I feel there must be some way around this so I am reaching out here for help.

Regards,
Navdeep

Follow the iframe stack and apply the parents as needed

Thanks Barry, I have done so however I am still receiving the error. Please see the site: https://www.gurujisangatboston.org/live

@BarryCarlyon any update here?

Try

https://player.twitch.tv/?channel=sewadaar_sangat&parent=gurujisangatboston.org&parent=www.gurujisangatboston.org&parent=1389242863-atari-embeds.googleusercontent.com&parent=www.gstatic.com as the embed URL

hi @BarryCarlyon,

thank you for the revert, it’s not working. I have an error which states twitch player refused to connect.

I think the problem is google.

Google changes one of iframes every time you save, so there is no fix for google sites becuase the iframes are not static

Can I ask why this line of code is used?

Why? I used the method outlined on the megathread to follow the iframe embed tree

Sorry. I’ve just seen the same atari-embeds.googleusercontent.com and www.gstatic.com posted on another thread about the same issue and was wondering if there was something specific about those two parents.

The problem with google sites, is every time you save your site the parent tree changes so theres no simple fix as the parents change every time you save

Latest reply on the Google Sites issue here

I follow the iFrame stack and determine the iFrames in the stacks, and that gives me the domains to use. But the second blue circle, that changes, every time you publish/save your Google Sites, site

Hi @BarryCarlyon please find a solution for Google sites ! There are a lot of business customers who use google sites and want twitch but cannot use.

Please note I’m not Twitch staff.
I do support on the forums when I have spare time. I don’t get paid for this. So any paid work I have comes first.

And I posted a possible fix on

The real solutions is not to use a website build, as they have all sorts of weird gotchas. For example, weird nested iFrames for no reason.

If you are running a “business” choose hosting that works for your needs, and google sites probably won’t fit your needs

@BarryCarlyon laudable dedication! Appreciate your valuable inputs.

Its not a business per se in my case,
I commented generally based on support articles on google sites support as lot of people are facing difficulties. Google support just ends them by saying they use sandbox iframes so it cannot support twitch.

Also, for my case it’s more like a prayer service. YouTube cannot be embedded before 4000 view hours , this is where I thought of twitch.

@BarryCarlyon surprising observation. When I am editing the page and put the code you provided, I can see the preview:

As I publish the page and changes, I again see the error :

Link to broken page

I managed to get these working on my side (with my domain and channel). Give it a shot.

Just stream

<script src= "https://player.twitch.tv/js/embed/v1.js"></script>
<div id="twitch-embed"></div>
<script type="text/javascript">
  var options = {
    width: "100%",
    height: "100%",
    channel: "sewadaar_sangat",
    parent: ["gurujisangatboston.org", "www.gurujisangatboston.org","sites.google.com",document.domain,"gstatic.com","www.gstatic.com"]
  };
  var player = new Twitch.Player("twitch-embed", options);
</script>

Stream & Chat

<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: "sewadaar_sangat",
        parent: ["gurujisangatboston.org", "www.gurujisangatboston.org","sites.google.com",document.domain,"gstatic.com","www.gstatic.com"]
      });
</script>

edit: Made a YT video with this information:
https://youtu.be/jDFZncLMHEQ

1 Like