Been attempting to input my livestream into my website, but for some reason it will not recognize when I post and save the script. Here’s where I’m attempting to post to: https://www.jakeparker.tv/live-stream/
Here is what I’m attempting to place on my website. Am I posting this correctly? Also to note, I’m operating a site designed through wordpress.
<script src= "https://player.twitch.tv/js/embed/v1.js"></script>
<div id="5253"></div>
<script type="text/javascript">
var options = {
width: 540,
height: 960,
channel: "JakeParkerLIVE",
parent: ["jakeparker.tv", "www.jakeparker.tv"]
};
var player = new Twitch.Player("5253", options);
player.setVolume(0.5);
</script>
Sounds like. I’m unsure where to find the issue, but the code listed above at least “shows” on the page while the iframe code from the Twitch channel simply disappears:
Ok, so I checked the backend and reinstalled the theme properly. Everything seems to be saving and functioning properly, so I believe now it’s just a matter of finding out why it’s showing the code instead of the video embed. Attempted to go back and use the following code, but the site only shows the code and not the video.
<script src= "https://player.twitch.tv/js/embed/v1.js"></script>
<div id="5253"></div>
<script type="text/javascript">
var options = {
width: 854,
height: 480,
channel: "jakeparkerlive",
};
var player = new Twitch.Player("5253", options);
player.setVolume(0.5);
</script>
From my understanding my theme allows me to place the code in any area of the backend editor such as seen here. At one point it worked and showed the embed but then nothing. Not sure where the fault occurred.
Ok, I may have discovered the issue. It looks like certain template formats of the theme are not allowing the embed script, while converting the page to a different format such as blog allows the embed to start operating. Now it’s just a matter of getting the iframe to work successfully.
Alright, looks like I’ve discovered the issue. For some reason the theme I’m using is very particular with embed options but the following code allowed me to embed the stream properly. Now it’s simply a matter of customizing the page.
The wordpress theme I currently use disables widgets by default and thus requires you to input custom HTML blocks inside the page editor. Appreciate the help with the backend code!