Welcome to TG!
First you will have to remove the first two and last two lines from your placeholder. The placeholder code goes to the body already.
Then you will have to give unique IDs to the DIVs that are used for emedding and also use that unique IDs in the scripts.
And I am quite sure you should only include the javascript file https://embed.twitch.tv/embed/v1.js once.
For example in the placeholder at the main variant add the following code to the head:
Code:
<!-- Load the Twitch embed script -->
<script src="https://embed.twitch.tv/embed/v1.js"></script>
Change the body code to:
Code:
<!-- Add a placeholder for the Twitch embed -->
<div id="twitch-embed-main"></div>
<!-- Create a Twitch.Embed object that will render within the "twitch-embed-main" root element. -->
<script type="text/javascript">
new Twitch.Embed("twitch-embed-main", {
width: 960,
height: 575,
channel: "thebeardedspider"
});
</script>
And on the mobile variant add a placeholder with only body code:
Code:
<!-- Add a placeholder for the Twitch embed -->
<div id="twitch-embed-mobile"></div>
<!-- Create a Twitch.Embed object that will render within the "twitch-embed-mobile" root element. -->
<script type="text/javascript">
new Twitch.Embed("twitch-embed-mobile", {
width: 480,
height: 288,
channel: "thebeardedspider"
});
</script>
The size for the mobile variant might differ in your case off course.
This is all just a guess!
Bookmarks