Table of Contents▼
• ... • • Comments • •

A World Radio in Pure Frontend: Stateful URLs, Zero Backend, and Why Software Got So Complicated

How easy it is to build a global internet radio player with zero backend—using localStorage, compressed stateful URLs, and mobile Media Session controls—and why modern software rarely needs the complexity we're sold.

Guy Mograbi
Guy Mograbi
Full Stack & Cloud Engineer

I’ve always wanted a simple internet radio player: pick a country, search for a station, star a few favorites, maybe drop in a custom stream URL or .m3u playlist, and hit play.

No account wall. No “sign in with Google to save your favorites.” No 40 MB app download.

So I built one—embedded right below—with zero backend servers, zero databases, and zero telemetry.


1. Radio: How Easy It Is (And the Frontend Strength Nobody Uses)

Building a global radio player in 2026 takes surprisingly little code:

  • Playback: The browser’s native <audio> element handles Icecast/Shoutcast MP3, AAC, and OGG streams directly—plus a tiny hls.js fallback for .m3u8 streams on browsers that don’t support HLS natively. Your server never touches a single byte of audio.
  • Global Directory: The open-source Radio Browser network exposes a free, CORS-enabled JSON API with tens of thousands of stations grouped by country (filtered to https:// streams so nothing breaks mixed-content rules).
  • Custom Stations & Playlists: Users can paste any https:// stream URL, or import a .json, .m3u, or .pls playlist from a CORS-friendly host (like GitHub Raw) or by pasting raw playlist text directly.

That’s it. No audio proxy, no transcoding fleet, no auth microservice.

Yet almost every commercial radio or media product refuses to stop there. Instead, they trade away the browser’s natural strengths for information collection or misguided UX—forcing you to create an account just to bookmark three stations, wrapping a simple audio stream inside an Electron/native shell, or routing every click through a backend database so they can build a listening profile.


2. UX: The Many Ways You Can “Deliver” a Product

When you stop assuming every feature needs a database row, you unlock much lighter, faster ways to deliver a product to users:

localStorage as a Personal Database

Your favorites and custom imported stations belong to you, on your device. Storing them in localStorage means instant reads, zero latency, zero server bills, and complete privacy.

Stateful URLs: Bookmarkable on Every Change

Every action you take in the player—switching tabs, picking a country, typing a search query, starring a station, or adding custom stream URLs—immediately updates the browser’s URL via history.replaceState:

  • Readable filters live in query parameters (?view=countries&country=JP&q=jazz).
  • Richer state (favorites, custom stations, and active station ID) is compressed client-side using the browser’s built-in CompressionStream('deflate-raw') and stored in the URL hash (#s=...).

Because the URL is the state, bookmarking the page or sending the link to a friend reproduces your exact setup—no “Share Playlist” backend endpoint required.

Crossover to Mobile Without an App Store

The web platform already bridges the gap to mobile hardware:

  • Responsive layout adapts cleanly from desktop to phone screens.
  • navigator.mediaSession integrates the <audio> stream with iOS Lock Screen, Android notifications, Bluetooth headphones, and car dashboards—displaying the station name, country, and native play/pause controls.
  • Bookmark / Add to Home Screen plus a stateful URL gives you an instant “installed” experience with zero App Store review cycles.

3. Do We Really Need More Than This?!

You have to wonder why so many software solutions are orders of magnitude more complex than this.

Years ago, there was a legitimate excuse: the web platform wasn’t strong enough. Browsers lacked reliable local persistence, native compression streams, media session hardware hooks, and fast JS runtimes—so teams reached for heavy backends and native wrappers out of necessity.

That limitation is gone. Modern browsers can stream media, compress state, talk to lock-screen hardware, persist data locally, and even run WebAssembly and WebGPU AI models without a server in sight.

So when a simple tool today demands an account, a cloud database, a native app install, and a tracking SDK just to play a stream and remember your favorites, you have to ask: is it a technical requirement, or is it just the desire to collect information about you?

Unclear. Either way, try the live radio below—and check the source code underneath to see how little it actually takes.

📻
Pick a station below to listen
100% frontend audio · zero tracking · Media Session ready
Loading stations... URL synced

The Code

</>
Source Code Explorer
10files · live from repository