Skip to content

henrypoydar/public-radio-player

Repository files navigation

Public Radio Player

A minimal macOS menu bar app for streaming public radio to AirPlay speakers, isolated from your main audio output.

|preview|preview-output|

This is an unofficial, independent player and is not affiliated with or endorsed by any of the stations below. It only plays their public streams; all audio content remains the property of the respective broadcasters.

Please consider supporting these stations:

Features

  • Menu bar only - No dock icon, doesn't interfere with other apps
  • Four stations - KCRW (Los Angeles), WNYC (New York City), Radio France, and BBC
  • Eight streams - KCRW 89.9, Eclectic24, News24, WNYC FM 93.9, WNYC AM 820, New Sounds, FIP, Radio 4
  • Native AirPlay picker - Route audio to any AirPlay speaker
  • Isolated audio - Plays on selected AirPlay device while other apps use your default output
  • CLI control - Drive the player from the terminal with prp (list, status, play, pause, switch)

Requirements

  • macOS 13.0 or later
  • Xcode Command Line Tools (xcode-select --install)

Install (download)

The easiest way — no developer tools needed:

  1. Go to the Releases page and download PublicRadioPlayer.zip from the latest release.

  2. Unzip it and drag PublicRadioPlayer.app into your Applications folder.

  3. Because the app isn't signed by a paid Apple developer account, macOS blocks it on first launch. To get past this once:

    • Double-click the app. macOS will say it "cannot be opened."
    • Open System Settings → Privacy & Security, scroll down, and click Open Anyway next to the PublicRadioPlayer message.
    • Confirm with Open. After this, it launches normally every time.

    If you're comfortable in Terminal, you can skip the dialogs with one command:

    xattr -dr com.apple.quarantine /Applications/PublicRadioPlayer.app

To launch at login, add it via System Settings → General → Login Items.

Build

./build.sh

This compiles the Swift source into a universal (Apple Silicon + Intel) build/PublicRadioPlayer.app.

Run

open build/PublicRadioPlayer.app

Install (from source)

Copy your local build to Applications for permanent installation:

cp -r build/PublicRadioPlayer.app /Applications/

Usage

  1. Click the radio icon in the menu bar
  2. Select a station and stream
  3. Click Play
  4. Click the AirPlay button (top right) to choose your speaker

CLI

The app runs a small control server on 127.0.0.1:7997 (localhost only). The prp script in this repo is a thin client for it — symlink it onto your PATH:

ln -sf "$PWD/prp" /opt/homebrew/bin/prp
prp status              # play state + current channel
prp list                # all stations and channels
prp play                # start playback
prp pause               # pause
prp toggle              # toggle play/pause
prp switch <channel>    # e.g. prp switch "Radio 4"
prp help                # usage

The menu bar app must be running for the CLI to work.

preview-cli.mp4

Stream URLs

KCRW (Los Angeles)

Stream URL
KCRW 89.9 https://streams.kcrw.com/kcrw_mp3
Eclectic24 https://streams.kcrw.com/e24_mp3
News24 https://streams.kcrw.com/news24_mp3

WNYC (New York City)

Stream URL
WNYC FM 93.9 https://fm939.wnyc.org/wnycfm
WNYC AM 820 https://am820.wnyc.org/wnycam
New Sounds https://q2stream.wqxr.org/q2

Radio France

Stream URL
FIP https://icecast.radiofrance.fr/fip-midfi.mp3
RFI https://rfimonde64k.ice.infomaniak.ch/rfimonde-64.mp3

BBC

Stream URL
World Service resolved at launch via BBC media-selector
Radio 6 Music resolved at launch via radio-browser

BBC rotates the CDN pool numbers in its stream URLs. World Service is resolved from BBC's media-selector — the same API BBC Sounds uses — which always returns the current HLS URL, tracking pool, CDN, and profile changes. 6 Music has no non-UK media-selector entry, so its direct pool URL is refreshed at launch by radio-browser station UUID instead. In both cases the hardcoded URL in the source is only a fallback.

Project Structure

public-radio-player/
├── PublicRadioPlayer/
│   ├── main.swift            # App entry point
│   ├── AppDelegate.swift     # Menu bar UI, AirPlay picker
│   ├── AudioPlayer.swift     # AVPlayer wrapper, station/stream model
│   └── ControlServer.swift   # Localhost HTTP server for the CLI
├── prp                       # CLI client for the control server
├── build.sh                  # Build script
└── README.md

Troubleshooting

App doesn't appear in menu bar: Check if it's running with ps aux | grep PublicRadioPlayer. If not, try running from terminal to see errors:

./build/PublicRadioPlayer.app/Contents/MacOS/PublicRadioPlayer

AirPlay devices not showing: Ensure your AirPlay speakers are on the same network. The picker uses macOS's native AirPlay discovery.

No audio: Click the AirPlay button and verify a device is selected. Check System Settings > Sound to confirm the app isn't muted.

License

Released under the MIT License. The license covers this application's source code only — not the audio streams, which remain the property of the respective broadcasters.

About

A minimal macOS menu bar app for streaming public radio to AirPlay speakers

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors