---
title: "setPlayer(_:muted:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkvoicechat/setplayer(_:muted:)"
---

# setPlayer(_:muted:)

Mutes a player in the chat, including the local player.

## Declaration

```swift
func setPlayer(_ player: GKPlayer, muted isMuted: Bool)
```

## Parameters

- `player`: The player that GameKit mutes or unmutes.
- `isMuted`: Determines whether to mute or unmute the player.

## Mentioned in

Adding voice chat to multiplayer games

## Discussion

Discussion If you mute another player, the local player doesn’t hear voice data from that player.

## See Also

### Controlling Chat Volume

- [volume](gamekit/gkvoicechat/volume.md)
