Skip to content

Radio

Radio

Live radio stations hosted by players. Hosts create a station, pick a category, play YouTube music via olisound spatial audio, and listeners tune in. Supports private (headphone) and public (spatial) modes.

Database Tables

None (radio state is held in-memory only).

Server Callbacks

CallbackPurpose
gcphone:radio:getStationsLists all active radio stations
gcphone:radio:createStationCreates a new station (name, category, private flag)
gcphone:radio:joinStationJoins a station as listener
gcphone:radio:leaveStationLeaves a station
gcphone:radio:endStationHost ends and destroys the station
gcphone:radio:getStationInfoGets station details and listener count
gcphone:radio:searchMusicYouTube search via youtube-sr
gcphone:radio:playMusicHost plays a track on the station (olisound)
gcphone:radio:stopMusicHost stops current track
gcphone:radio:setMusicVolumeAdjusts volume and distance

Config Options

lua
Config.Features.Radio = true

Config.Radio = {
    MaxStationNameLength = 50,
    MaxDescriptionLength = 200,
    MaxStationsPerHost = 1,
    Categories = {
        { id = 'music', label = 'Musica', icon = '🎵' },
        { id = 'news', label = 'Noticias', icon = '📰' },
        { id = 'talk', label = 'Talk Show', icon = '🎙️' },
        { id = 'emergency', label = 'Emergencia', icon = '🚨' },
        { id = 'community', label = 'Comunidad', icon = '👥' },
        { id = 'other', label = 'Otro', icon = '📻' },
    },
}

Dependencies

  • olisound -- required for spatial audio playback
  • youtube-sr -- YouTube search (included in server/js/node_modules, no install needed)

Released under GPL-3.0 License