SteamVoipClient - stingray.SteamVoipClient object reference - Stingray Lua API Reference

stingray.SteamVoipClient object reference

Description

This represents a client that can communicate with others in a room.

Functions

Parameters

self :

stingray.SteamVoipClient

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

boolean

Returns true if the connection has failed, or false otherwise.

Parameters

self :

stingray.SteamVoipClient

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

string[]

A table that contains the ID of each peer in the room.

The [] notation indicates that this type is an array: a table in which the keys of the members are sequential integers, and the value of each element is an instance of the type shown.
Parameters

self :

stingray.SteamVoipClient

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

string

The ID of the room to which the client is connected.

Parameters

self :

stingray.SteamVoipClient

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

enable :

boolean

Determines whether or not voice communication is enabled. Use true to enable voice, or false to disable voice.

peer_id :

string?

The ID of the peer. If you specify a peer ID, only this peer is affected. If no peer ID is specified, all members in the room the client is connected to will be affected.

The ? notation indicates that this type is optional: there may be zero or one instances of it.
Returns
This function does not return any values.

Note: Note that if you have multiple clients, and a given peer is connected through more than one client, only one of them needs to be accepted for transmission for the transmission to occur. If you want to mute someone entirely, you must make sure that you call select_in() on all clients that peer is connected to.

Parameters

self :

stingray.SteamVoipClient

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

enable :

boolean

Determines whether or not voice communication is enabled. Use true to enable voice, or false to disable voice.

peer_id :

string?

The ID of the peer. If you specify a peer ID, only this peer is affected. If no peer ID is specified, all members in the room the client is connected to will be affected.

The ? notation indicates that this type is optional: there may be zero or one instances of it.
Returns
This function does not return any values.

Note: Note that if you have multiple clients, and a given peer is connected through more than one client, only one of them needs to be accepted for transmission for the transmission to occur. If you want to block someone from receiving your voice, you must make sure that you call select_out() on all clients that peer is connected to.