setVoice
setVoice(
step,setVoiceOptions):void
Turns voice on or off for every player in the room from this step on,
such as voice in the lobby alone: off, the room pauses every microphone
and each page shows voice as off; on again, each microphone comes back
only where its player has it on. A player who joins while it is off
joins with it off. Calling it every step with the same value changes
nothing. A game whose room turns voice off, with defineRoom({ voice: false }), keeps it off in every phase. As Roblox’s per-player
VoiceChatService controls and Vivox’s channel leave, for the whole
room at once. Authoritative systems only: a predicted system re-runs,
so its step is refused.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
step |
AuthoritativeStep & UnpredictedStep |
setVoiceOptions |
SetVoiceOptions |
Returns
Section titled “Returns”void
Example
Section titled “Example”setVoice(step, { enabled: false }); // the round starts: voice off