Thank you i will try and once again i apprecaite your help
Ye old wix here. This has me banging my head on the wall as I got it working on my own site, but for my friends - I can not. Not sure if the .tv domain is complicating thingsâŚ
https://www.theblunderdome.tv/stream
<!-- Load the Twitch embed JavaScript file -->
<script src="https://embed.twitch.tv/embed/v1.js"></script>
<!-- Create a Twitch.Embed object that will render within the "twitch-embed" element -->
<script type="text/javascript">
new Twitch.Embed("twitch-embed", {
width: 854,
height: 480,
channel: "theblunderdome",
// Only needed if this page is going to be embedded on other websites
parent: ["www.theblunderdome.tv", "www-theblunderdome-tv.filesusr.com", "theblunderdome.tv","theblunderdome.tv/stream", "www.theblunderdome.tv/stream", "https://www.theblunderdome.tv/stream", "https://www.theblunderdome.tv"]
});
</script>
Your parent contains https://
and paths
The correct script is
<!-- Load the Twitch embed JavaScript file -->
<script src="https://embed.twitch.tv/embed/v1.js"></script>
<!-- Create a Twitch.Embed object that will render within the "twitch-embed" element -->
<script type="text/javascript">
new Twitch.Embed("twitch-embed", {
width: 854,
height: 480,
channel: "theblunderdome",
// Only needed if this page is going to be embedded on other websites
parent: ["www.theblunderdome.tv", "theblunderdome.tv", "www-theblunderdome-tv.filesusr.com"]
});
</script>
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
Hello I am looking for some help with a problem I do not understand with embedding your live stream in your website. Using the code below I am able to see the stream on my google sites page but when I go to my website using the domain www.lifewithmoody.com I get a embed error that says âplayer.twitch.tv refused to connectâ. Can anyone tell me what I am doing wrong? and Why the player is not showing up on the site? Thank You In Advance.
The Code I Am Using For Embed:
You parents omitted the main page/website URL here is the correct JS to use
var options = {
width: "100%",
height: "100%",
channel: "MoodyGamesOnRoblox",
parent: ["sites.google.com",document.domain,"gstatic.com","www.gstatic.com","www.lifewithmoody.com"]
};
var player = new Twitch.Player("<player div ID>", options);
player.setVolume(0.5);
I feel like i am still missing something because the embed is still not loading for me to view it
Now it is missing the error box all together:
The updated code I used for the embed:
<player div ID>
isnât a valid div ID, It should be a regular word like myplayer
or something like that, not that that really gets in the wayâŚ
For some reason your player isnât initing/the JS code isnât running in the atari
iFrame. Why that is I donât know. (My test/screenshot was from triggering the code manually/not at page load)
I get the feeling google pages is doing some sort of weird lazy load which is intferring with document ready
thank you so much for your help I figured out what was wrong with the code and now it works just find, wouldnât have made it this far without - thx u
this is the correct code - it was missing the at the bottom of the code
Im so sorry, but im so new to embedding and I have no idea whatâs going on and im so frustrated, I just want my damn twitch on my six, do they really need to make it this complicated?
<html>
<body>
<!-- Add a placeholder for the Twitch embed -->
<div id="twitch-embed"></div>
<!-- Load the Twitch embed JavaScript file -->
<script src="https://embed.twitch.tv/embed/v1.js"></script>
<!-- Create a Twitch.Embed object that will render within the "twitch-embed" element -->
<script type="text/javascript">
new Twitch.Embed("twitch-embed", {
width: 854,
height: 480,
channel: "goojick",
// Only needed if this page is going to be embedded on other websites
parent: ["embed.example.com", "othersite.example.com"]
});
</script>
</body>
</html>
I have no idea what to put in the âdiv idâ or what parameters to change or anything. I am a hopeless turtle kicking and kicking to turn on its front side. Just like the monotonous repetition of failure throughout my music career lmao. Maybe we can take away a dub this time??? Thanks for all of your help btw, I see you in the thread helping everyone out for free which makes me feel even better entering the twitch community:)
IDâs are unique identifiers to HTML elements on the page, so in yoru copy/pasta is twitch-embed
Your parents are incorrect for your embed. And will need to include the domainname of your website and any other iFrames in the stack. Sites like wix will have multiple iframes due to how they do embeds.
If you provide a link to the broken page I can advise a fix
https://www.heykipp.com/livestream I feel like I infinitely stare into the void with this issue hahaha. I inspect and find the parent iframe from wix, and still never get the feed, just the errored out window
<iframe src="https://player.twitch.tv/?channel=heykipp&parent=parent=heykipp.com&parent=www.heykipp.com&parent=https://www-heykipp-com.filesusr.com" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>
The parent
param should just be the domain portion of the URL, you donât need the protocol https://
, or any path that comes after the domain (I noticed on the page itself thereâs the parent https://www-heykipp-com.filesusr.com/html/8acede_1088a4b2dc22e38f556eb2e51a0decbf.html
, this for example doesnât need the https://
, or anything after .com
)
This should work as your iframe
<iframe src="https://player.twitch.tv/?channel=heykipp& parent=heykipp.com&parent=www.heykipp.com&parent=www-heykipp-com.filesusr.com" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>
So it is! Thank you so much!
Its also occured to me that iframe embed doesnât allow chat, etc? Any idea what obvious mistake I am making on the second embed I am testing? below the first?
https://www.heykipp.com/livestream
<!-- Load the Twitch embed JavaScript file -->
<script src="https://embed.twitch.tv/embed/v1.js"></script>
<!-- Create a Twitch.Embed object that will render within the "twitch-embed" element -->
<script type="text/javascript">
new Twitch.Embed("twitch-embed", {
width: 854,
height: 480,
channel: "heykipp",
// Only needed if this page is going to be embedded on other websites
parent: ["heykipp.com, www.heykipp.com, www-heykipp-com.filesusr.com"]
});
</script>
Use a layout
of video-with-chat
in your options
Then you only need the one iframe
Thanks for the response. I suppose I can just drop the stand alone chat embed in the wix iframe box? If thats essentially the only method then I think I understand. Ideally I want the stream with chat âpinnedâ to the side and when you full screen - the chat remains on the side. And even ideally the chat being collapsible as on twitch. However if that is super beyond the inherit limitations and its really just boils down to the video window and chat window being seperate elements - then I think I get it and will just also embed chat in the same way.
Twitch doesnât provide a full screen embed that is video+chat youâd have to devise this yourself
The correct URL appears to be
https://player.twitch.tv/?channel=hirory&parent=www.thelovechat.net
You has missed the ?
before channel and had a /
on the end of the parent