Music Player
YouTube music playback via xsound with 3D positional audio. Players nearby can hear music from your vehicle with distance-based volume fading.
Features
- YouTube Playback: Paste a YouTube URL to play music
- 3D Positional Audio: Sound originates from the vehicle's position via xsound
- Distance Fading: Full volume inside the vehicle, fades linearly with distance outside
- Playlists: Create custom playlists, add songs, play all
- Liked Songs: Save favorite songs to a persistent collection
- Resume Playback: Automatically resumes from last position (10-minute TTL per vehicle)
- Volume Sync: Volume changes are synced to all nearby players
- Loop Mode: Toggle loop for continuous playback
How It Works
- Open the Music tab in CarPlay
- Paste a YouTube URL and press play
- The music plays via xsound with positional audio
- Other players within
Config.Distancemeters can hear the music - Volume fades based on distance from the vehicle
Data Persistence
All music data is stored per-player in the database:
- Playlists: JSON array of playlist objects
- Liked Songs: JSON array of liked song objects
- Volume: Integer value (0-100)
Configuration
| Option | Default | Description |
|---|---|---|
Config.Distance | 30 | Sound hearing distance in meters |
Config.YoutubeAPIKey | API key | YouTube Data API v3 key for fetching titles |
Config.Modules.MusicPlayer | true | Show music player module |
