lila-chat/frontend/index.html

73 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Maya's Stream</title>
<meta name="author" content="Luna">
<meta name="description" content="Maya's Stream">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="UTF-8">
<link rel="stylesheet" href="index.css">
<link rel="icon" href="/favicon.svg">
</head>
<body>
<nav>
<ul class="navigation-list">
<li><a href="index.html">
<div class="buttons">Stream</div>
</a></li>
<li><a href="chat.html">
<div class="buttons">Just Chat</div>
</a></li>
<li><a href="register.html">
<div class="buttons">Register</div>
</a></li>
<li><a href="login.html">
<div class="buttons">Login</div>
</a></li>
<li><a href="updateinfo.html">
<div class="buttons">Update Info</div>
</a></li>
</ul>
</nav>
<script>
// Checking if the stream is down and displays a message if it is.
async function isStreamDown() {
const response = await fetch(`https://cdn.chaos.stream/hls/src/maya.m3u8`);
if (response.status === 404) {
document.getElementById("streamframe").style.display = "none";
document.getElementById("stream").style.border = 'double'
document.getElementById("stream").innerHTML = 'Currently not streaming.'
}
}
window.onload = isStreamDown()
</script>
<main>
<section>
<div id="streamchat">
<div id="stream">
<iframe id="streamframe" src="https://live.on.chaos.stream/maya" title="mayas stream"
scrolling="no"></iframe>
</div>
<iframe id="chatbox" src="chat.html" title="chat box" scrolling="no"></iframe>
</div>
</section>
</main>
</body>
</html>