Behind the player

Technology

The software and infrastructure I use to turn local audio into an accessible online radio experience.

Debian

The project runs on a Debian Linux server. Linux gives me direct control over the processes, files, network services and system configuration that the radio depends on.

Python

The radio server is written in Python. The application handles HTTP requests, radio logic, station information and communication with the local audio system.

Keeping the core of the project relatively small makes it easier for me to understand and modify each part of the system.

Station artwork is stored next to the audio files, so each station is paired with its image and the player can display it.

HTTP and streaming

The browser communicates with the radio server over HTTP. The player can request the current stream and other information needed by the interface.

Streaming introduces different problems from serving an ordinary webpage because the connection can remain open for a long time and clients can disappear unexpectedly.

Cloudflare Tunnel

The server itself does not need to be directly exposed to the public internet. Cloudflare Tunnel connects the public domains to the services running on my server.

The informational website and radio player are separate services, even though they use the same main domain.

Browser compatibility

One of the most time-consuming parts of the project has been browser behaviour. Chrome and Safari can behave differently, particularly on mobile devices where background audio and power management are involved.

I test the player across desktop and mobile browsers and adjust the implementation when real-world behaviour exposes a problem.

Glossary

A few terms used on this website, explained briefly.

Stream

Audio delivered continuously over a long-lived HTTP connection instead of as a finished file that you download first.

Buffer

A small reserve of audio that the browser downloads ahead of time, so a short network hiccup does not cause a gap in the sound.

Reconnecting

Starting a new connection when the old one has been lost, for example after a phone changes network or wakes up from sleep.

Cloudflare Tunnel

A small program on the server opens an outgoing connection to Cloudflare. Visitors reach the services through Cloudflare, so the server does not have to accept direct incoming connections from the internet.

Subdomain

An address under the same domain. stayrich.nl is this information website, while radio.stayrich.nl is the separate address of the radio service.

Why I built it this way

The system is intentionally built from relatively simple components. I wanted to understand the entire chain rather than hide the project behind a third-party radio platform.

That also makes the project useful as a practical learning exercise in Linux, Python, networking and web development.