Display current music
All checks were successful
ci / deploy (push) Successful in 2m30s

This commit is contained in:
2026-01-21 00:37:15 +01:00
parent f397ec62ed
commit 8ca5deebb2
6 changed files with 145 additions and 34 deletions

View File

@@ -1,16 +1,28 @@
<!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>
<audio controls autoplay>
<source src="/radio-bullshit" type="audio/mpeg" preload="none" >
</audio>
<div
x-data="{ metadata: { status: 'down' } }"
x-init="setInterval(
async () => {
metadata = await get_metadata()
},
1000,
)
"
>
<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>
@@ -19,4 +31,11 @@
</p>
</body>
<script>
const get_metadata = async () => {
return Object.fromEntries(
await (await fetch("/status.json")).json()
)
}
</script>
</html>