I am trying to figure out what the invalid character is, and as I’m not a scripter I don’t quite get this. Im building a site for a friend and between CSS and this Im about ready to lose it.
Site is memestreams.gq.
code
<div id="twitch-embed">
<!-- Add a placeholder for the Twitch embed -->
<!-- Load the Twitch embed script -->
<script src="https://player.twitch.tv/js/embed/v1.js"></script>
<!-- Create a Twitch.Player object. This will render within the placeholder div -->
<script type="text/javascript">
new Twitch.Player("twitch-embed", {
channel: "meme_games746",
});
</script>
It is taken directly from the share button near the stream. Can someone please help me with this?
Alright thank you for that information. however, It states that the embed is misconfigured. I’m now experiencing an issue attempting to embed an VOD stream. It will refuse to connect, or it will say misconfigured embed. I’m using the script given by the share button.
<!-- Add a placeholder for the Twitch embed -->
<div id="twitch-embed"></div>
<!-- Load the Twitch embed script -->
<script src="https://player.twitch.tv/js/embed/v1.js"></script>
<!-- Create a Twitch.Player object. This will render within the placeholder div -->
<script type="text/javascript">
new Twitch.Player("twitch-embed", {
video: "1495975551"
});
</script>
above is for the VOD Stream.
And the code you provided partially works other than twitch says the embed is misconfigured.
Investigating and solving the issue requires looking at the problem inside the environment. So without the “live page” to look at I can’t trace the issue.
The code you presented looks correct. So this suggests some kind of problem with the environment. Likely nested iFrames, but if the code is on Github then that doesn’t seem likely. So I need to check the environment, which I can’t without the page being live
I am having trouble resizing the VOD embed for past streams on the site. I managed to get it working and centered, but it is far too small. I have tried using the Twitch documentation on the VOD embeds, and also tried browsing the internet (eg. Stack Overflow) for solutions.
<script src="https://player.twitch.tv/js/embed/v1.js"></script>
<div id="<laststream>">
<div id="twitch-embed"></div>
<!-- Load the Twitch embed script -->
<script src="https://player.twitch.tv/js/embed/v1.js"></script>
<!-- Create a Twitch.Player object. This will render within the placeholder div -->
<script type="text/javascript">
new Twitch.Player("twitch-embed", {
video: "1501464684"
});
</script>
var player = new Twitch.Player("
<laststream>", options); player.setVolume(0.5);
</script>
</div>
I’m certain there’s something i’m missing but i’m not sure what it might be.