playerVoiceChatStateDidChangeHandler
A method that handles when a player’s voice chat changes state.
Declaration
var playerVoiceChatStateDidChangeHandler: (GKPlayer, GKVoiceChat.PlayerState) -> Void { get set }Mentioned in
Discussion
Set this property to update your interface when the state of any player in the chat changes, including the local player. For example, update the names or avatars when the players are connecting, speaking, or disconnecting.
The handler receives the following parameters:
playerThe player whose status changed.
stateThe new state of the player.