---
title: playerStateUpdateHandler
framework: gamekit
role: symbol
role_heading: Instance Property
path: gamekit/gkvoicechat/playerstateupdatehandler
---

# playerStateUpdateHandler

Handles when a player in the chat changes state.

## Declaration

```swift
var playerStateUpdateHandler: (String, GKVoiceChat.PlayerState) -> Void { get set }
```

## Discussion

Discussion Your game sets this property with a block that GameKit calls when the state of any participant in the chat changes (including the local player). The block receives the following parameters:

## See Also

### Deprecated Methods and Properties

- [playerIDs](gamekit/gkvoicechat/playerids.md)
- [setMute(_:forPlayer:)](gamekit/gkvoicechat/setmute(_:forplayer:).md)
