This represents a client that can communicate with others in a room.
Constructors and accessors
Other related reference items
broken_host ( self ) : booleanIndicates whether or not the connection to the specified client has failed.
|
self : | 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. |
boolean |
Returns true if the connection has failed, or false otherwise. |
members ( self ) : string[]Returns a table that lists the IDs of all members in the room.
|
self : | 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. |
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. |
room_id ( self ) : stringReturns the ID of the room the specified client is connected to.
|
self : | 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. |
string |
The ID of the room to which the client is connected. |
select_in ( self, enable, peer_id )Specify whose voices you want to hear in the room that the specified client is connected to.
|
self : | 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. |
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.
select_out ( self, enable, peer_id )Specify who can receive your voice through this client.
|
self : | 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. |
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.