Platforms to show: All Mac Windows Linux Cross-Platform

Back to GKVoiceChatMBS class.

GKVoiceChatMBS.active as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A Boolean value that states whether the channel is sampling the microphone.

When active is true, the voice chat samples the microphone and transmits the voice data to other players connected to the channel. Default value is false.

Only one GKVoiceChat object is allowed to sample the microphone at any given time. When your game sets the active property to true on a voice chat object, the previous voice chat object that owned the microphone (if there was one) sets its active property to false.

Available in OS X v10.8 and later.
(Read and Write computed property)

GKVoiceChatMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The constructor for a new voice chat.

GKVoiceChatMBS.enablePlayerStateUpdate(tag as Variant = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Enables player state update event in GameKitMBS class.

You enable GameKit.playerStateUpdate event to be called when the state of any participant in the chat changes (including the local player). The event receives the following parameters:

player: The player identifier for the player whose status changed.
state: The new state of the player.

GKVoiceChatMBS.name as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The name of the voice chat (read-only).

GKVoiceChatMBS.playerIDs as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
An array of player identifiers for the players connected to the channel. (read-only)

GKVoiceChatMBS.setMute(mute as boolean, playerID as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Mutes a participant in the chat.

isMuted: Determines whether the player is to be muted or not.
player: The player identifier string for a player in the match.

While a player is muted, the local player does not hear voice data transmitted by that player.

GKVoiceChatMBS.start

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Starts communication with other participants in the voice chat.

When start is called, the voice chat connects to the channel and notifies other connected players that the local player joined the chat. When the voice chat object is connected, it plays voice data from other participants in the channel. It sends voice data to other participants when its active property is true.

A device only connects to the channel when the device has a microphone and is connected via wi-fi. However, your game may configure and start a voice chat channel when the device is not currently capable of using voice chat. If conditions change to allow voice chat—for example, the device connects to a wi-fi network—the GKVoiceChat object automatically connects to the channel.

GKVoiceChatMBS.stop

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Ends communication with other participants in the voice chat.

When stop is called, the voice chat object disconnects from the other players. You should call stop on a channel before releasing it.

GKVoiceChatMBS.volume as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The volume level for the voice channel.

All voice data received from other participants is mixed and then scaled by the volume property. The volume property has a range between 0.0 and 1.0, inclusive. A volume level of 0.0 means the entire channel is muted; a value of 1.0 plays voice samples at full volume. The default value is 1.0.
(Read and Write computed property)

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


The biggest plugin in space...