usePlayerVoice
usePlayerVoice(
player):PlayerVoice
Her volume and mute for player, another player entity, for a game’s
own player list, as Roblox’s and Discord’s lists offer each person’s
volume beside their name. The Audio tab of Settings shows the same
values. A volume or mute set 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 its verbs do nothing.
const { heard, muted, setMuted } = usePlayerVoice(player);return heard && <button onClick={() => setMuted(!muted)}>Mute</button>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
player |
Entity | null | undefined |