playerStateUpdateHandler
Handles when a player in the chat changes state.
Declaration
var playerStateUpdateHandler: (String, GKVoiceChat.PlayerState) -> Void { get set }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:
playerIDThe player identifier for the player whose status changed.
stateThe new state of the player. See GKVoiceChat.PlayerState.