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 her volumes and mutes for a rejoin of the same room, and lets them go for another, where a key names someone else.
heard string[] The keys of the players she hears, as their player entities dump under, sorted.
inputDecibels number Her 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 keys of the players she muted for herself.
mutePlayer (key, 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, and VoiceOff.Phase while an authoritative system has it off, where her 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> Her volume for each player she hears, 0 to 200, by player key: 100 where she set none, and past 100 louder than they send.
room string | null The room those keys name players in: its address.
setPlayerVolume (key, volume) => void -
speakers string[] Those of them speaking now, each held a moment past their last word, sorted.
talking boolean Whether her microphone sends her speaking now, held a moment past her last word.
unavailable boolean Whether the room runs no voice, as a development room does: voice runs once the game plays on the platform.