A super fast and lightweight cross-platform desktop app for streaming Sveriges Radio live channels and podcasts, built with Rust, Slint, Symphonia and Rodio.
- Stream all Sveriges Radio live channels
- Gapless and super fast audio playback
- Real-time "Now Playing" information with playback progess tracking
- Quick channel browsing
- Browse and listen to programs and podcasts
- Hybrid streaming and caching for optimal performance
- Native macOS .app bundle (~5MB)
- Linux binary with minimal dependencies
- Windows executable
The code is extensively commented and easy for new Rust developers to get into, possibly coming from Python or JavaScript.
Working:
- Gapless streaming using Symphonia decoder
- Fetch and display all Sveriges Radio channels from API
- Real-time "Now Playing" program information (auto-updates every 30s)
- Stockholm timezone support (handles CET/CEST automatically)
- Browse and play podcast episodes (25 most recent, server-side sorted)
- Tabbed UI for Live channels, Podcasts, and News
- Collapsible groups for P4 Local News and Ekot News
- Cross-platform builds (macOS, Linux, Windows)
- Optimized release builds (~5MB total size)
- Thread-safe async streaming architecture
| Stage | Description |
|---|---|
| M1 | Minimum UI & single stream playback |
| M2 | Full channel list browsing |
| M3 | Gapless streaming, macOS build |
| M4 | Podcast browsing & playback, Linux & Windows build |
| M5 | Polished UI & improved packaging |
- Go to Releases
- Download
SR-Player-vX.X.X-macos.zip - Unzip and drag
SR Player.appto Applications - Right-click and select "Open" (first time only, due to macOS Gatekeeper)
- Go to Releases
- Download
sr-player-vX.X.X-linux.tar.gz - Extract:
tar -xzf sr-player-vX.X.X-linux.tar.gz - Run:
./sr-player
Linux Dependencies:
# Debian/Ubuntu
sudo apt-get install libasound2 libxcb-render0 libxcb-shape0 libxcb-xfixes0 libxkbcommon0 libfontconfig1
# Fedora/RHEL
sudo dnf install alsa-lib libxcb libxkbcommon fontconfig- Go to Releases
- Download
sr-player-vX.X.X-windows.zip - Extract the ZIP file
- Run
sr-player.exe
Development Mode:
# Build and run
cargo runSyntax highlighting in VSCode for Slint
Production Builds:
macOS (App Bundle):
# Install cargo-bundle (first time only)
cargo install cargo-bundle
# Build optimized .app bundle
cargo bundle --release
# Result: target/release/bundle/osx/SR Player.appLinux:
# Build optimized binary
cargo build --release
# Result: target/release/sr-playerWindows:
# Build optimized binary
cargo build --release
# Result: target/release/sr-player.exeThe release build is configured for minimal size in Cargo.toml:
[profile.release]
strip = true # Strip debug symbols (~60% size reduction)
opt-level = "z" # Optimize for size
lto = true # Link-time optimization
codegen-units = 1 # Better optimization
panic = "abort" # Remove unwinding machinerySize breakdown:
- Before optimization: ~15MB (14MB binary + 1MB icon)
- After optimization: ~3-5MB total
- Comparison: Electron app (80-150MB)
Gapless Streaming:
- HTTP Stream → Custom MediaSource → Symphonia Decoder → Rodio Sink
- Supports both live radio streams (AAC) and podcast episodes (MP3)
- Dedicated audio thread for thread-safe non-Send types
- Async HTTP streaming with tokio
- Eliminates gaps between audio chunks
Episode Playback:
- HybridPlayer for intelligent streaming and caching
- FilePlayer with minimp3 decoder for seekable local playback
- Background downloading with progress tracking
- Send-safe wrappers for cross-thread communication
- Automatic cache management
UI Framework:
- Slint 1.9 for native cross-platform UI
- Declarative component-based architecture
- Compiles to native code (no web runtime)
API Integration:
- Sveriges Radio Open API for channels, schedules, programs, and podcasts
- Episodes endpoint (not podfiles) for reliable server-side sorting
- Async data fetching with lazy loading for performance
- Image decoding and display for program artwork
- Automatic timezone conversion (UTC → Stockholm)
MPL-2.0 for open development compatibility.
Uses Sveriges Radio API under Creative Commons Attribution stipulations.
