Voice
VIMP provides proximity routing and named channels. The server controls channel membership and speak/listen permissions; the client selects an available active channel and exposes local device state.
const dispatch = vimp.voice.createChannel('dispatch', {
spatial: false,
})
vimp.on('playerConnected', (player) => {
dispatch?.addPlayer(player, { canSpeak: true, canListen: true })
})
vimp.on('playerDisconnected', (player) => {
dispatch?.removePlayer(player)
})Set spatial: false for radio-like channels. A spatial channel may override maxDistance. Add players using explicit canSpeak and canListen permissions, and remove them when access expires.
On the client, observe voiceChannelsChanged, voiceChannelChanged, voiceStart, voiceStop, and voiceError. Use the stable error reason for localized UI and retain technicalMessage for diagnostics.
The default server codec bitrate is 24 kbit/s. Valid configuration requires:
streaming_visibility_radius >= 1while voice is enabled;0 <= full_volume_distance < max_distance <= shard_size;- bitrate from 6000 through 128000;
- expected packet loss from 0 through 100;
- positive capacity limits and at least 50 packets per second.
Muting another player and changing their local volume are client preferences; server voiceMuted and voiceDeafened are authoritative controls.