:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/../../GodotApplePlugins/doc_classes/GKVoiceChat.xml. .. _class_GKVoiceChat: GKVoiceChat =========== **Inherits:** :ref:`RefCounted` **<** :ref:`Object` Represents a Game Center voice chat channel. .. rst-class:: classref-introduction-group Description ----------- Use :ref:`GKMatch.voice_chat()` to open a voice channel for a realtime match, then call :ref:`start()` / :ref:`stop()` and monitor :ref:`player_state_changed`. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-----------------------------+--------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`is_active` | ``false`` | +-----------------------------+--------------------------------------------------------+-----------+ | :ref:`String` | :ref:`name` | ``""`` | +-----------------------------+--------------------------------------------------------+-----------+ | :ref:`Array` | :ref:`players` | ``[]`` | +-----------------------------+--------------------------------------------------------+-----------+ | :ref:`float` | :ref:`volume` | ``0.0`` | +-----------------------------+--------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_voip_allowed`\ (\ ) |static| | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_player_muted`\ (\ player\: :ref:`GKPlayer`, muted\: :ref:`bool`\ ) | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`start`\ (\ ) | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`stop`\ (\ ) | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_GKVoiceChat_signal_player_state_changed: .. rst-class:: classref-signal **player_state_changed**\ (\ player\: :ref:`GKPlayer`, state\: :ref:`int`\ ) :ref:`🔗` Emitted when a player's voice chat state changes. ``state`` uses Apple's raw ``GKVoiceChat.PlayerState`` value. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GKVoiceChat_property_is_active: .. rst-class:: classref-property :ref:`bool` **is_active** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_is_active**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_is_active**\ (\ ) Whether this voice chat is currently active. .. rst-class:: classref-item-separator ---- .. _class_GKVoiceChat_property_name: .. rst-class:: classref-property :ref:`String` **name** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget - :ref:`String` **get_name**\ (\ ) Channel name. .. rst-class:: classref-item-separator ---- .. _class_GKVoiceChat_property_players: .. rst-class:: classref-property :ref:`Array` **players** = ``[]`` :ref:`🔗` .. rst-class:: classref-property-setget - :ref:`Array` **get_players**\ (\ ) Players currently participating in the channel. .. rst-class:: classref-item-separator ---- .. _class_GKVoiceChat_property_volume: .. rst-class:: classref-property :ref:`float` **volume** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_volume**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_volume**\ (\ ) Output volume for this channel. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_GKVoiceChat_method_is_voip_allowed: .. rst-class:: classref-method :ref:`bool` **is_voip_allowed**\ (\ ) |static| :ref:`🔗` Returns ``true`` when voice chat is allowed on the current platform/account. .. rst-class:: classref-item-separator ---- .. _class_GKVoiceChat_method_set_player_muted: .. rst-class:: classref-method |void| **set_player_muted**\ (\ player\: :ref:`GKPlayer`, muted\: :ref:`bool`\ ) :ref:`🔗` Mutes or unmutes ``player`` in this channel. .. rst-class:: classref-item-separator ---- .. _class_GKVoiceChat_method_start: .. rst-class:: classref-method |void| **start**\ (\ ) :ref:`🔗` Starts voice chat transmission. .. rst-class:: classref-item-separator ---- .. _class_GKVoiceChat_method_stop: .. rst-class:: classref-method |void| **stop**\ (\ ) :ref:`🔗` Stops voice chat transmission. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`