index.html
<!DOCTYPE html>
<html lang="nl">
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1.0">
<title>Retro Internet Radio</title>
<style>
body {
background: #000;
background-image:
radial-gradient(circle at center,
#201000 0%,
#080400 70%,
#000000 100%);
}
.touchBtn{
position:fixed;
top:50%;
transform:translateY(-50%);
width:80px;
height:80px;
border-radius:50%;
border:none;
background:rgba(0,0,0,0.6);
color:#fff;
font-size:40px;
z-index:1000;
touch-action:manipulation;
}
.leftBtn{
left:10px;
}
.rightBtn{
right:10px;
}
#retro-date {
font-family: "Courier New", monospace;
font-size: 18px;
color: #ffb000;
text-align: center;
text-transform: uppercase;
letter-spacing: 3px;
text-shadow:
0 0 5px #ffb000,
0 0 10px #ff8800,
0 0 20px #ff5500;
margin-bottom: 10px;
}
#year-box{
position:absolute;
top:16%;
left:50%;
transform:translateX(-50%);
min-width:80px;
z-index:35;
}
#day-box{
position:absolute;
top:32%;
left:50%;
transform:translateX(-50%);
min-width:180px;
z-index:35;
}
#month-box{
position:absolute;
top:35%;
left:50%;
transform:translateX(-50%);
min-width:180px;
z-index:35;
}
#clock {
position: absolute;
left: 50%;
top: 40%;
transform: translateX(-50%);
z-index: 35;
color: #ffb000;
font-family: "Courier New", monospace;
font-size: 4vmin;
}
.date-box {
background: #120800;
border: 2px solid #ff8c00;
border-radius: 6px;
padding: 8px 12px;
min-width: 110px;
color: #ffb000;
font-family: "Courier New", monospace;
font-weight: bold;
font-size: 18px;
text-align: center;
text-shadow:
0 0 2px #ffcc66,
0 0 6px #ff9900,
0 0 12px #ff6600;
box-shadow:
inset 0 0 15px rgba(255,150,0,0.25),
0 0 10px rgba(255,140,0,0.5);
position: relative;
overflow: hidden;
}
.naam-box {
background: #120800;
border: 2px solid #ff8c00;
border-radius: 6px;
padding: 8px 12px;
min-width: 110px;
color: #ffb000;
font-family: "Courier New", monospace;
font-weight: bold;
font-size: 18px;
text-align: center;
text-shadow:
0 0 2px #ffcc66,
0 0 6px #ff9900,
0 0 12px #ff6600;
box-shadow:
inset 0 0 15px rgba(255,150,0,0.25),
0 0 10px rgba(255,140,0,0.5);
position: relative;
overflow: hidden;
}
/* scanlines */
.date-box::before,
.naam-box::after {
content: "";
position: absolute;
inset: 0;
background:
repeating-linear-gradient(
to bottom,
rgba(255,255,255,0.03) 0px,
rgba(255,255,255,0.03) 1px,
transparent 2px,
transparent 4px
);
pointer-events: none;
}
/* lichte fosfor-gloed */
.date-box::after,
.naam-box::after {
content: "";
position: absolute;
inset: 0;
background: radial-gradient(
ellipse at center,
rgba(255,180,0,0.12) 0%,
rgba(255,120,0,0.04) 50%,
transparent 100%
);
pointer-events: none;
}
#bediening{
position:absolute;
left:50%;
top:315px;
transform:translateX(-50%);
font-size:11px;
font-weight:bold;
color:#333;
z-index:100;
}
.led{
display:inline-block;
width:10px;
height:10px;
border-radius:50%;
margin-right:4px;
}
.groen{
background:#00ff00;
}
.rood{
background:#aa0000;
}
#radio{
position:fixed;
left:50%;
top:45%;
transform:translate(-50%,-50%) rotate(6deg);
width:100vmin;
height:100vmin;
border-radius:50%;
background:
radial-gradient(
circle,
#f6e7bd 0%,
#e8d39e 55%,
#cab074 100%
);
border:none;
}
.scale{
position:absolute;
background:#4a3419;
transform: scale(1.5);
transform-origin: center center;
}
.station{
position:absolute;
transform:translate(-50%,-50%);
font-size:2.3vmin;
font-weight:bold;
text-align:center;
color:#2b1c0f;
width:18vmin;
}
#stationLogo{
position:absolute;
left:50%;
top:50%;
width:20%;
height:20%;
transform:translate(-50%,-50%);
object-fit:contain;
object-position:center center;
z-index:30;
pointer-events:none;
}
#wijzer{
z-index:40;
}
#verbindingTekst{
margin-left:15px;
font-weight:bold;
color:#cc0000;
}
#naaf{
position:absolute;
width:2px;
height:2px;
left:230px;
top:230px;
border-radius:50%;
background:#444;
z-index:20;
}
#wijzer{
position:absolute;
left:50%;
top:12%;
width:0.8%;
height:38%;
background:#b30000;
transform-origin:50% 100%;
z-index:40;
}
#naaf{
display:none;
}
#naam-box{
position:absolute;
top:58%;
left:50%;
transform:translateX(-50%);
min-width:180px;
z-index:35;
}
#hoek{
position:absolute;
bottom:30px;
width:100%;
text-align:center;
font-size:14px;
color:#555;
}
#bedieningsStatus{
position:absolute;
left:50%;
bottom:33%;
transform:translateX(-50%);
font-size:14px;
font-weight:bold;
color:#222;
z-index:35;
width:100px;
text-align:center;
}
.status-container{
position:absolute;
left:50%;
bottom:35%;
transform:translateX(-50%);
display:flex;
gap:4vmin;
z-index:100;
}
/* Algemene styling voor een led-indicator (lampje + tekst) */
.led-indicator {
display: flex;
flex-direction: column;
align-items: center;
gap: 5px;
}
.led-label {
font-size: 14px;
color: #ffffff;
text-transform: uppercase;
letter-spacing: 1px;
font-family: sans-serif;
}
/* Het fysieke lampje */
.led {
width: 14px;
height: 14px;
border-radius: 50%;
border: 2px solid #333;
transition: all 0.3s ease;
}
/* Groene LED specificaties */
.led-groen.aan {
background-color: #2ecc71;
box-shadow: 0 0 10px #2ecc71, inset 0 0 4px #ffffff;
animation: pulse-groen 2s infinite;
}
.led-groen.uit {
background-color: #1e5333;
box-shadow: inset 0 0 5px #000;
}
/* Rode LED specificaties */
.led-rood.aan {
background-color: #e74c3c;
box-shadow: 0 0 10px #e74c3c, inset 0 0 4px #ffffff;
animation: pulse-rood 2s infinite;
}
.led-rood.uit {
background-color: #5c251e;
box-shadow: inset 0 0 5px #000;
}
/* Pulserende animaties voor een realistisch effect */
@keyframes pulse-groen {
0% { box-shadow: 0 0 6px #2ecc71, inset 0 0 4px #ffffff; }
50% { box-shadow: 0 0 14px #2ecc71, inset 0 0 4px #ffffff; }
100% { box-shadow: 0 0 6px #2ecc71, inset 0 0 4px #ffffff; }
}
@keyframes pulse-rood {
0% { box-shadow: 0 0 6px #e74c3c, inset 0 0 4px #ffffff; }
50% { box-shadow: 0 0 14px #e74c3c, inset 0 0 4px #ffffff; }
100% { box-shadow: 0 0 6px #e74c3c, inset 0 0 4px #ffffff; }
}
.led{
display:inline-block;
width:8px;
height:8px;
border-radius:50%;
margin-right:3px;
background:#cc0000;
vertical-align:middle;
}
.groen{
background:#00ff00;
}
.rood{
background:#ff0000;
}
#ring1{
width:84%;
height:84%;
left:8%;
top:8%;
}
#ring2{
width:66%;
height:66%;
left:17%;
top:17%;
}
#ring3{
width:48%;
height:48%;
left:26%;
top:26%;
}
.ring3 {
position: relative; /* Zorgt ervoor dat we de leds onderaan kunnen positioneren */
}
</style>
</head>
<body>
<div>
<div>
<div class="date-box"></div>
<div class="date-box"></div>
<div class="date-box"></div>
<div class="naam-box"></div>
</div>
<img
src="logos/default.jpg"
alt="Logo">
<div></div>
<div></div>
<div>LOCAL</div>
<div class="ring"></div>
<div class="ring"></div>
<div class="ring">
<div class="status-container">
<div class="led-indicator">
<div class="led led-groen aan"></div>
<span class="led-label">LOCAL</span>
</div>
<div class="led-indicator">
<div class="led led-rood uit"></div>
<span class="led-label">REMOTE</span>
</div>
</div></div>
<div></div>
<div></div>
<div></div>
</div>
<audio></audio>
<script>
const stations = [
{ naam: "Apfelsaft", url: "https://stream.laut.fm/apfelsaft" },
{ naam: "Barok", url: "https://streams.greenhost.nl:8006/barok" },
{ naam: "BE ONE Hits Oostende", url: "https://live.radiostudio.be/beone" },
{ naam: "Blues Drenthe FM", url: "https://d3vbm02trh7zmp.cloudfront.net/icecast/rtvdrenthe/BluesradioDrenthe" },
{ naam: "Classic Gold", url: "https://cast1.torontocast.com:3365/stream" },
{ naam: "Citysound Radio", url: "https://auds1.intacs.com/citysoundfm" },
{ naam: "Deltamusic", url: "https://stream.laut.fm/deltamusic" },
{ naam: "De tijdloze", url: "https://icecast.vrtcdn.be/stubru_tijdloze-high.mp3" },
{ naam: "Discoweek", url: "https://stream.laut.fm/discoweek" },
{ naam: "Filmmuziek", url: "https://streams.greenhost.nl:8006/film" },
{ naam: "FM Goud Limburg", url: "https://stream.fmgoud.be/fm-goud-noord-limburg" },
{ naam: "Flash FM", url: "https://flashfm2.ice.infomaniak.ch/flashfm2-128.mp3" },
{ naam: "Freez FM", url: "https://stream.freezfm.nl/freezfm" },
{ naam: "Funky Channel Brugge", url: "https://cast3.asurahosting.com/proxy/breakou1/stream" },
{ naam: "Galaxy Greece", url: "https://galaxy.live24.gr/galaxy9292" },
{ naam: "Halloween Radio Movies", url: "https://node-17.zeno.fm/mash62rv1bruv" },
{ naam: "Jazz One", url: "https://streaming.broadcast.radio/onejazz" },
{ naam: "Joe Gold", url: "https://audio-streaming.joe.be/joe-gold.aac" },
{ naam: "JOE FM", url: "https://streams.radio.dpgmedia.cloud/redirect/joe_fm/mp3" },
{ naam: "Jukebox", url: "https://jukebox.stream.laut.fm/jukebox" },
{ naam: "Kiev", url: "https://listen6.myradio24.com:9000/4171" },
{ naam: "Klara", url: "https://icecast.vrtcdn.be/klara-high.mp3" },
{ naam: "Klara Continuo", url: "https://icecast.vrtcdn.be/klaracontinuo-high.mp3" },
{ naam: "Komilfoo FM", url: "https://eu1.reliastream.com/proxy/marc?mp=/stream" },
{ naam: "Kustradio", url: "https://www.clubfmserver.be:8000/kustradio.mp3" },
{ naam: "Kortrijk", url: "https://s19.myradiostream.com/18068/listen.mp3" },
{ naam: "Megamix", url: "https://web.radio.antennevorarlberg.at/mm-80er90ermegamix" },
{ naam: "M-FM Zottegem", url: "https://2424.cloudrad.io:8248/live" },
{ naam: "MNM", url: "https://icecast.vrtcdn.be/mnm-high.mp3" },
{ naam: "MNM Hits", url: "https://icecast.vrtcdn.be/mnm_hits-high.mp3" },
{ naam: "Moonlight", url: "https://server-67.stream-server.nl:8780/stream" },
{ naam: "MooyZo Pajotteland", url: "https://play.mooyzo.be/mooyzo.mp3" },
{ naam: "Night Lounge", url: "https://stream.laut.fm/radiomusicnetwork" },
{ naam: "NPO 1", url: "https://icecast.omroep.nl/radio1-bb-mp3" },
{ naam: "NPO 2", url: "https://icecast.omroep.nl/radio2-bb-mp3" },
{ naam: "NPO 3FM", url: "https://icecast.omroep.nl/3fm-bb-mp3" },
{ naam: "NRJ Belgie", url: "https://playerservices.streamtheworld.com/api/livestream-redirect/NRJBELGIE.mp3" },
{ naam: "Ocean FM", url: "https://playerservices.streamtheworld.com/api/livestream-redirect/OCEAN_FM_SLIGO.mp3" },
{ naam: "Oslo InterFM", url: "https://stream.interfm.no/interfm_hq" },
{ naam: "Oudepiratenhits", url: "https://server-67.stream-server.nl:8910/stream" },
{ naam: "Radio 1 BE", url: "https://icecast.vrtcdn.be/radio1-high.mp3" },
{ naam: "Radio 2 BE", url: "https://icecast.vrtcdn.be/ra2wvl-high.mp3" },
{ naam: "Radio 5", url: "https://icecast.omroep.nl/radio5-bb-mp3" },
{ naam: "Radio 538", url: "https://playerservices.streamtheworld.com/api/livestream-redirect/RADIO538.mp3" },
{ naam: "Radio Contact", url: "https://radiocontact.ice.infomaniak.ch/radiocontact-mp3-192.mp3" },
{ naam: "Radio Kompas Diksmuide", url: "https://mediaserv33.live-streams.nl:8052" },
{ naam: "Radio Melodie Schlagers", url: "https://radiomelodie.schlagerparadies.de/radiomelodie" },
{ naam: "Radio Meteor", url: "https://streams.movemedia.be/meteor" },
{ naam: "Radio Mi Amigo", url: "https://stan319.radioca.st/;" },
{ naam: "Radio Ninove", url: "https://radioninove.streamer.radioninove.be/" },
{ naam: "Radio Nostalgie", url: "https://playerservices.streamtheworld.com/api/livestream-redirect/NOSTALGIEWHATAFEELING.mp3" },
{ naam: "Radio Nostalgie Plus", url: "https://playerservices.streamtheworld.com/api/livestream-redirect/NOSTALGIEPLUS.mp3" },
{ naam: "Radio Oostende", url: "https://stream.laut.fm/ostende" },
{ naam: "Radio Pros Aalst", url: "https://live2.radiostudio.be/pros" },
{ naam: "Retro Hits", url: "https://stream.zeno.fm/v8b6uyvf9s8uv" },
{ naam: "Silver Radio", url: "https://stream.silverstar-radio.de/listen/silverstart_radio/radio.mp3" },
{ naam: "Stadsradio Vlaanderen", url: "https://randstad.wirelessbelgie.be:8330/;stream.mp3" },
{ naam: "Starradio Oud-Turnhout", url: "https://streams.movemedia.eu:8000/stereofm" },
{ naam: "Stockholm", url: "https://81.225.54.184:8000/live" },
{ naam: "Studio Brussel", url: "https://icecast.vrtcdn.be/stubru-high.mp3" },
{ naam: "Sunshine FM", url: "https://stream.sunshine-live.de/live/mp3-192/" },
{ naam: "The Beat", url: "https://live-nors.sharp-stream.com/nors19.mp3" },
{ naam: "Topbam", url: "https://playerservices.streamtheworld.com/api/livestream-redirect/TOPBAM.mp3" },
{ naam: "Top Radio", url: "https://str.topradio.be/topradio.mp3" },
{ naam: "Top Zen", url: "https://playerservices.streamtheworld.com/api/livestream-redirect/TOPZEN.mp3" },
{ naam: "VBRO", url: "https://stream.vbro.be:9100/vbro" },
{ naam: "WRadio Roeselare", url: "https://stream.wradio.es:9000/;stream/1" },
{ naam: "Q Foute Radio", url: "https://icecast-qmusicbe-cdp.triple-it.nl/q-foute-radio.mp3" },
{ naam: "Qmusic", url: "https://icecast-qmusicbe-cdp.triple-it.nl/qmusic.mp3" },
{ naam: "QMusic Allstars", url: "https://icecast-qmusicbe-cdp.triple-it.nl/q-allstars.mp3" },
{ naam: "Radio Melinda", url: "https://stream.decibelhuis.be/1" },
{ naam: "Radio Noordzee", url: "https://stream.noordzee105.be/noordzee-192" },
{ naam: "Noordzee Gold", url: "https://stream.noordzee105.be/gold" }
];
const radio=document.getElementById("radio");
console.log(
radio.offsetWidth,
radio.offsetHeight
);
const center = radio.offsetWidth / 2;
const ringRadius = [
center * 0.82,
center * 0.64,
center * 0.46
];
window.addEventListener("load", () => {
const startup = document.getElementById("startupSound");
startup.volume = 0.8;
startup.play().catch(err => {
console.log("Autoplay geblokkeerd:", err);
});
});
function updateClock()
{
const nu = new Date();
document.getElementById("clock").textContent =
nu.toLocaleTimeString(
"nl-BE",
{
hour: "2-digit",
minute: "2-digit"
}
);
}
function updateDate() {
const dagen = [
"Zondag","Maandag","Dinsdag",
"Woensdag","Donderdag","Vrijdag","Zaterdag"
];
const maanden = [
"Januari","Februari","Maart","April",
"Mei","Juni","Juli","Augustus",
"September","Oktober","November","December"
];
const now = new Date();
document.getElementById("day-box").textContent =
dagen[now.getDay()];
document.getElementById("month-box").textContent =
now.getDate() + " " + maanden[now.getMonth()];
document.getElementById("year-box").textContent =
now.getFullYear();
}
updateDate();
setInterval(updateDate, 60000);updateClock();
setInterval(updateClock, 1000);
for(let i=0;i<72;i++)
{
let angle=(i*5-90)*Math.PI/180;
let lengte=(i%2===0)?14:8;
let x = center + center * 0.88 * Math.cos(angle) * 0.95;
let y = center + center * 0.88 * Math.sin(angle) * 0.90;
let mark=document.createElement("div");
mark.className="scale";
mark.style.width="2px";
mark.style.height=lengte+"px";
mark.style.left=(x-1)+"px";
mark.style.top=(y-lengte/2)+"px";
mark.style.transform=`rotate(${i*5}deg)`;
radio.appendChild(mark);
}
for(let i=0;i<stations.length;i++)
{
let ring=i%3;
let angle=(i*5-90)*Math.PI/180;
let x=center+ringRadius[ring]*Math.cos(angle) * 0.95;
let factorY = 0.90; // onderkant 10% omhoog
let y = center + ringRadius[ring] * Math.sin(angle) * factorY;
let div=document.createElement("div");
div.className="station";
div.innerHTML=stations[i].naam;
div.style.left=x+"px";
div.style.top=y+"px";
radio.appendChild(div);
}
let positie=0;
function logoBestand(naam)
{
return naam
.toLowerCase()
.normalize("NFD")
.replace(/[\u0300-\u036f]/g, "")
.replace(/[^a-z0-9]/g, "_");
}
function kiesStation(index, bron="LOCAL")
{
positie = index;
document.getElementById("wijzer").style.transform =
`rotate(${positie * 5}deg)`;
document.getElementById("naam-box").textContent =
stations[positie].naam;
const logoElement =
document.getElementById("stationLogo");
logoElement.src =
"logos/" +
logoBestand(stations[positie].naam) +
".jpg";
const speler =
document.getElementById("player");
speler.src = stations[positie].url;
speler.load();
speler.play()
.then(() => {
console.log("Audio gestart");
})
.catch(err => {
console.log("Autoplay geblokkeerd", err);
});
if (bron === "REMOTE")
{
document.getElementById("LOCAL").className =
"led led-groen uit";
document.getElementById("REMOTE").className =
"led led-rood aan";
document.getElementById("bedieningsStatus").textContent =
"REMOTE";
document.getElementById("bedieningsStatus").style.color = "#cc0000";
}
else
{
document.getElementById("LOCAL").className =
"led led-groen aan";
document.getElementById("REMOTE").className =
"led led-rood uit";
document.getElementById("bedieningsStatus").textContent =
"LOCAL";
document.getElementById("bedieningsStatus").style.color = "#008800";
}
}
let eersteOntvangst = true;
let ws;
function connectWebSocket()
{
ws = new WebSocket("ws://192.168.1.203:8765");
ws.onopen = function()
{
console.log("WebSocket verbonden");
};
ws.onclose = function()
{
console.log("WebSocket verbroken");
setTimeout(connectWebSocket, 2000);
};
ws.onerror = function(e)
{
console.log("WebSocket fout", e);
};
ws.onmessage = function(event)
{
if (eersteOntvangst)
{
eersteOntvangst = false;
}
console.log("ONTVANGEN:", event.data);
if(event.data.startsWith("REMOTE:"))
{
let station = parseInt(
event.data.replace("REMOTE:", "")
);
kiesStation(station, "REMOTE");
return;
}
let cap = parseFloat(event.data);
let verhouding =
(cap - C_MIN) /
(C_MAX - C_MIN);
verhouding =
Math.max(
0,
Math.min(1, verhouding)
);
let station =
Math.round(
verhouding *
(stations.length - 1)
);
if(station !== positie)
{
kiesStation(station, "LOCAL");
};
};
};
const C_MIN = 10;
const C_MAX = 328;
connectWebSocket();
document.getElementById("naam-box").textContent =
"Studio Wilfi";
document.getElementById("stationLogo").src =
"logos/logo.jpg";
document.getElementById("wijzer").style.display =
"block";
setTimeout(() => {
positie = 51;
kiesStation(51, "LOCAL");
}, 6000);
radio.addEventListener("click", function(e)
{
const rect = radio.getBoundingClientRect();
const x = e.clientX - rect.left;
if(x < rect.width * 0.30 || x > rect.width * 0.70)
{
return; // buiten centraal gebied
}
if(x < rect.width * 0.50)
{
positie = (positie - 1 + stations.length) % stations.length;
}
else
{
positie = (positie + 1) % stations.length;
}
kiesStation(positie,"LOCAL");
});
</script>
<audio preload="auto">
<source src="startup.mp3" type="audio/mpeg">
</audio>
</body>
</html>