Protocol: GKVoiceChatClient
Overview
The GKVoiceChatClient protocol is implemented to control the behavior of the GKVoiceChatService object. The voice chat client has a number of responsibilities:Returns a string that uniquely identifies the local user. (required)Received by the client when an attempt to establish a voice chat with another participant failed.Asks the client to accept or reject an invitation from a remote participant.Received by the client when a voice chat with another participant is established.Received by the client when a previously established voice chat has ended.A request for the client to send data to a participant. (required)Asks the client to send data to a participant that must get there quickly.
Instance Method Summary (collapse)
-
- participantID
Returns a string that uniquely identifies the local user.
-
- voiceChatService:didNotStartWithParticipantID:error:
Received by the client when an attempt to establish a voice chat with another participant failed.
-
- voiceChatService:didReceiveInvitationFromParticipantID:callID:
Asks the client to accept or reject an invitation from a remote participant.
-
- voiceChatService:didStartWithParticipantID:
Received by the client when a voice chat with another participant is established.
-
- voiceChatService:didStopWithParticipantID:error:
Received by the client when a previously established voice chat has ended.
-
- voiceChatService:sendData:toParticipantID:
A request for the client to send data to a participant.
-
- voiceChatService:sendRealTimeData:toParticipantID:
Asks the client to send data to a participant that must get there quickly.
Instance Method Details
- (String) participantID
Returns a string that uniquely identifies the local user. (required) The client decides the format and meaning of the participant identifier. For more information, see the Game Center Programming Guide.
- (Object) voiceChatService(voiceChatService, didNotStartWithParticipantID:participantID, error:error)
Received by the client when an attempt to establish a voice chat with another participant failed. Your application can implement this method to notify the user that an error occurred when establishing a connection.
- (Object) voiceChatService(voiceChatService, didReceiveInvitationFromParticipantID:participantID, callID:callID)
Asks the client to accept or reject an invitation from a remote participant. If this method is not implemented by the client, the voice chat service automatically accept requests from other participants.This method should call the service’s acceptCallID:error: method if it wants to accept the request or the denyCallID: to reject it.
- (Object) voiceChatService(voiceChatService, didStartWithParticipantID:participantID)
Received by the client when a voice chat with another participant is established. Your client can use this method to update the user interface to show that a connection has been established.
- (Object) voiceChatService(voiceChatService, didStopWithParticipantID:participantID, error:error)
Received by the client when a previously established voice chat has ended. Your application can implement this method to notify the user that an established voice connection has ended. This may occur when another participant ends the chat or if the network connection was lost.
- (Object) voiceChatService(voiceChatService, sendData:data, toParticipantID:participantID)
A request for the client to send data to a participant. (required) An implementation of this method must reliably transmit the data to the participant identified by participantID. When the client on the other end receives the data, it should forward it to the voice chat service by calling the service’s receivedData:fromParticipantID: method.
- (Object) voiceChatService(voiceChatService, sendRealTimeData:data, toParticipantID:participantID)
Asks the client to send data to a participant that must get there quickly. An implementation of this method maps the participantID string to a known participant and transmits the data to them. Data transmitted by this method can be sent unreliably. When the client on the other end receives this data, it should forward it to the voice chat service by calling the service’s receivedRealTimeData:fromParticipantID: method.