lilachat-frontend/index.html

73 lines
2.1 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE html>
<html>
2021-07-25 20:10:09 +00:00
<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">
2021-07-26 22:33:30 +00:00
<link rel="stylesheet" href="css/index.css">
2021-07-26 22:48:24 +00:00
<link rel="icon" href="assets/favicon.svg">
2021-07-25 20:10:09 +00:00
</head>
<body>
<nav>
<ul class="navigation-list">
<li><a href="index.html">
<div class="buttons">Stream</div>
</a></li>
2021-07-26 22:23:13 +00:00
<li><a href="/html/chat.html">
2021-07-25 20:10:09 +00:00
<div class="buttons">Just Chat</div>
</a></li>
2021-07-26 22:23:13 +00:00
<li><a href="/html/register.html">
2021-07-25 20:10:09 +00:00
<div class="buttons">Register</div>
</a></li>
2021-07-26 22:23:13 +00:00
<li><a href="/html/login.html">
2021-07-25 20:10:09 +00:00
<div class="buttons">Login</div>
</a></li>
2021-07-26 22:23:13 +00:00
<li><a href="/html/updateinfo.html">
2021-07-25 20:10:09 +00:00
<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>
2021-07-25 20:10:09 +00:00
<div id="streamchat">
<div id="stream">
<iframe id="streamframe" src="https://live.on.chaos.stream/maya" title="mayas stream"
scrolling="no"></iframe>
</div>
2021-07-25 20:10:09 +00:00
2021-07-26 22:23:13 +00:00
<iframe id="chatbox" src="/html/chat.html" title="chat box" scrolling="no"></iframe>
2021-07-25 20:10:09 +00:00
</div>
</section>
</main>
2021-07-25 20:10:09 +00:00
</body>
2021-07-25 20:10:09 +00:00
</html>