Skip to main content

Music Player

YouTube music player with 3D positional audio and playlists

This section

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

  1. Open the Music tab in CarPlay
  2. Paste a YouTube URL and press play
  3. The music plays via xsound with positional audio
  4. Other players within Config.Distance meters can hear the music
  5. 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

OptionDefaultDescription
Config.Distance30Sound hearing distance in meters
Config.YoutubeAPIKeyAPI keyYouTube Data API v3 key for fetching titles
Config.Modules.MusicPlayertrueShow music player module