Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

VoiceSessionState

Property Type Description
access MicrophoneAccess -
enterRoom (room) => void Keeps the listener’s volumes and mutes for a rejoin of the same room, and lets them go for another, where a dump key names someone else.
heard string[] The dump keys of the players the listener hears, as their player entities dump under, sorted.
inputDecibels number The player’s microphone’s level, in dBFS, about 20 times a second while it is captured: what the Microphone volume row’s meter shows.
mutedPlayers string[] The dump keys of the players the listener muted for the listener alone.
mutePlayer (dumpKey, muted) => void -
off VoiceOff | null Why the game has voice off, as the room says: VoiceOff.Game for a game whose room turns it off, where the page opens no voice. VoiceOff.Phase while an authoritative system has it off, where the player’s microphone is not captured until it turns on. Null while voice runs, and outside a room.
open boolean Whether the room opened voice for this page.
playerVolumes Record<string, number> The listener’s volume for each player the listener hears, 0 to 200, by dump key: 100 where the listener set none, and past 100 louder than they send.
room string | null The room those dump keys name players in: its address.
setPlayerVolume (dumpKey, volume) => void -
speakers string[] Those of them speaking now, each held a moment past their last word, sorted.
talking boolean Whether the player’s microphone sends the player speaking now, held a moment past the player’s last word.
unavailable boolean Whether the room runs no voice, as a development room does: voice runs once the game plays on the platform.