usePlayerVoice
usePlayerVoice(
player):UsePlayerVoiceResult
The local player’s volume and mute for player, another player entity,
for a game’s own player list, as Roblox’s and Discord’s lists show
each person’s voice beside their name. The Audio tab of Settings shows
the same values, and sets the volume and unmutes. A mute for a player not heard
yet applies once they are. A player with no network id, such as one
outside a room, reads as unheard, and mute does nothing.
const { isHeard, isMuted, mute } = usePlayerVoice(player);return isHeard && !isMuted && <button onClick={mute}>Mute</button>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
player |
Entity | null | undefined |