41 lines
1.0 KiB
HTML
41 lines
1.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script defer src="/static/alpine.min.js"></script>
|
|
<meta charset="utf-8">
|
|
<title>Radio bullshit, la radio du paradis !</title>
|
|
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon">
|
|
<link rel="icon" href="/static/favicon.ico" type="image/x-icon">
|
|
</head>
|
|
<body>
|
|
<div
|
|
x-data="{ metadata: { status: 'down' } }"
|
|
x-init="setInterval(
|
|
async () => {
|
|
metadata = await get_metadata()
|
|
},
|
|
2000,
|
|
)
|
|
"
|
|
>
|
|
<p x-show="metadata.status == 'ready'" x-text="metadata.title"></p>
|
|
<audio controls autoplay>
|
|
<source src="/radio-bullshit" type="audio/mpeg" preload="none" >
|
|
</audio>
|
|
</div>
|
|
<p>
|
|
<ul>
|
|
<li><a href="/radio-bullshit">VLC Stream</a></li>
|
|
<li><a href="/radio-bullshit.m3u">M3U file</a></li>
|
|
</ul>
|
|
</p>
|
|
|
|
</body>
|
|
<script>
|
|
const get_metadata = async () => {
|
|
return Object.fromEntries(
|
|
await (await fetch("/status.json")).json()
|
|
)
|
|
}
|
|
</script>
|
|
</html> |