useSpeaking
useSpeaking(
player):boolean
Whether player is speaking in the room’s voice: the page’s own player
while their microphone sends their voice, and another while the page
plays the other player’s voice. It turns on with the first word and
holds a moment past the last, so a mark drawn from it does not flicker
between words, as Discord’s ring does. A player who controls nothing
speaks too: the voice belongs to the player, not
the player’s character.
const speaking = useSpeaking(player);return speaking && <Icon name="mic" />;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
player |
Entity | null | undefined |
Returns
Section titled “Returns”boolean