Changed twitch embed to chaos stream embed.

This commit is contained in:
Luna 2021-07-25 13:28:54 -07:00
parent b3c2da348c
commit ba03ae8a6c
3 changed files with 12 additions and 20 deletions

View file

@ -47,7 +47,7 @@ async function sendMessage() {
// RECIEVE MESSAGES // RECIEVE MESSAGES
let messageUpdate = window.setInterval(fetchMessages, 500); let messageUpdate = window.setInterval(fetchMessages, 1000);
async function fetchMessages() { async function fetchMessages() {
const response = await fetch('/api/message/messages.json'); const response = await fetch('/api/message/messages.json');

View file

@ -18,13 +18,20 @@ a {
} }
#twitch-embed { #stream {
width: 960px;
height: 540px;
margin-right: 0.3em; margin-right: 0.3em;
margin-left: -40%; margin-left: -40%;
margin-top: auto; margin-top: auto;
margin-bottom: 20%; margin-bottom: 20%;
} }
#streamframe {
height: 100%;
width: 100%;
}
#chatbox { #chatbox {
flex: 1; flex: 1;
height: 53rem; height: 53rem;

View file

@ -40,24 +40,9 @@
<section> <section>
<div id="streamchat"> <div id="streamchat">
<div id="twitch-embed"></div> <div id="stream">
<iframe id="streamframe" src="https://live.on.chaos.stream/maya" title="mayas stream" scrolling="no"></iframe>
<!-- Load the Twitch embed JavaScript file --> </div>
<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: 960,
height: 540,
channel: "mayamayagirl",
layout: "video",
autoplay: false,
muted: true,
// Only needed if this page is going to be embedded on other websites
parent: ["embed.example.com", "othersite.example.com"]
});
</script>
<iframe id="chatbox" src="chat.html" title="chat box" scrolling="no"></iframe> <iframe id="chatbox" src="chat.html" title="chat box" scrolling="no"></iframe>