Hello,
I’ve updated my code to fill in the new required parameters as documented on https://dev.twitch.tv/docs/embed/video-and-clips/#interactive-frames-for-live-streams-and-vods . The exact same code is deployed to two different domains: one is a staging server used for testing, and the other is the production domain. The options passed to the embed constructor are identical except for the domain name.
On the staging server, the embed works fine. On the production server, I get this error:
Twitch embed error message:
[FailedAttributeCheck] mandatory requirements were not met
Docs: https://dev.twitch.tv/docs/embed/video-and-clips/
Works: curl ‘https://player.twitch.tv/?height=607&migration=true&parent=example.com&referrer=https%3A%2F%2Fexample.com%2Fr%2Ftest&video=v654584133&width=1078 ’
Fails: curl ‘https://player.twitch.tv/?height=607&migration=true&parent=cytu.be&referrer=https%3A%2F%2Fcytu.be%2Fr%2Ftest&video=v654584133&width=1078 ’
Fails: curl ‘https://player.twitch.tv/?height=607&migration=true&parent=sub.cytu.be&referrer=https%3A%2F%2Fsub.cytu.be%2Fr%2Ftest&video=v654584133&width=1078 ’
Can you please help me understand why embeds fail on cytu.be specifically (and any subdomains)?
Why are you curl-ing them?
This is a URL supposed to be used in an iFrame.
As per the
If you are using WIX/Google Sites/Some other tool and your embeds are no longer working.
The fix is as follows, it seems that wix and other website builders will put your embed in another iframe, so you need to include your website as a parent and that extra iframe as a parent.
FOR WIX
Generally it seems that for a wix site, your site is
somesite.com
And your iframe is
somesite-com.fileusr.com
or
www-somesite.com.filesusr.com
So your parent would be
parent=somesite.com&parent=www.somesi…
You need to post the URl to the page that is broken, and someone can look and see the issue
Hmm very odd. I think this might be a bug and domains ending .be are not in the acceptable list?
Raised as a bug here
opened 10:29AM - 24 Jun 20 UTC
closed 02:44AM - 01 Sep 20 UTC
not a bug
product: embeds
**Brief description**
Embeds don't appear to work on `.be` domains
**How t… o reproduce**
https://cytu.be/twitch-test.html
this example clip embed appears to be correctly configured. But throws a
```
Twitch embed error message:[FailedAttributeCheck] mandatory requirements were not metDocs: https://dev.twitch.tv/docs/embed/video-and-clips/
```
**Expected behavior**
The embed works
**Screenshots**
![image](https://user-images.githubusercontent.com/20999/85539552-e0c41b80-b60d-11ea-9cae-61e6ad14ba20.png)
**Additional context or questions**
Original report
https://discuss.dev.twitch.tv/t/embed-api-parent-parameter-not-working-for-specific-domain/26671/
Ok in my initial check I missed this
but currently your code is
<iframe src="https://clips.twitch.tv/embed?clip=CautiousWrongAmazonTwitchRP&parent=cytu.be"
height="400"
width="640"
scrolling="no"
allowfullscreen="true">
</iframe>
The URL should be
https://clips.twitch.tv/embed?clip=CautiousWrongAmazonTwitchRP&parent=cytu.be
The &
is an XML escape – technically putting “&parent” into an HTML string would be incorrect markup. If you inspect element on the rendered page, you will see the literal string of the src is “&parent” – the “&
parent” is just the way that needs to be encoded in the page source in order to produce correct HTML.
However, just to be sure, I’ve updated the page source to the literal URL you provided and the effect is the same (same error).
Commented on the GitHub issue, thanks for opening that.
calzoneman:
The &
is an XML escape – technically putting “&parent” into an HTML string would be incorrect markup. If you inspect element on the rendered page, you will see the literal string of the src is “&parent” – the “ &
parent” is just the way that needs to be encoded in the page source in order to produce correct HTML.
Not when specifying URL’s to things the & needs to be & to seperate the query string arguments
Thanks. Looks like the GitHub issue is following up.
system
Closed
July 24, 2020, 8:23pm
10
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.