Switch listener streaming to MP3-only

This commit is contained in:
3nd3r
2026-01-03 08:14:03 -06:00
parent 111f4b347e
commit 2db40e4547
3 changed files with 28 additions and 244 deletions

View File

@@ -9,7 +9,7 @@ It supports:
- Local library playback (files in `music/`)
- Downloading audio from URLs (via `yt-dlp` when available, with fallback)
- Live streaming from the DJ browser to listeners using Socket.IO
- **Compatibility fallback**: if a listener browser cant play the WebM/Opus stream, it can fall back to an **MP3 stream** (`/stream.mp3`) generated server-side with **ffmpeg**.
- Live listening via an **MP3 stream** (`/stream.mp3`) generated server-side with **ffmpeg**.
---
@@ -161,22 +161,13 @@ If listeners cant connect, this is often the cause.
---
## Streaming formats & fallback
## Streaming
### Default stream
- DJ browser encodes live audio using `MediaRecorder` (usually WebM/Opus)
- Listeners receive chunks over Socket.IO and play them via MediaSource
### MP3 fallback (compatibility)
Some browsers/environments dont support WebM/Opus + MediaSource well.
In that case TechDJ can fall back to:
TechDJ serves the listener audio as an **MP3 HTTP stream**:
- MP3 stream endpoint: `http://<DJ_MACHINE_IP>:5001/stream.mp3`
This requires:
- `ffmpeg` installed on the DJ/server machine
This requires `ffmpeg` installed on the DJ/server machine.
### Debug endpoint