Members
DEFAUL_GROUP_ID
(readonly) capacity :number
- number
(readonly) groupId :string
Each Group is identified by a unique string (its name) and it represents a different "container" for Rooms.
Room Groups enable developers to organize Rooms under different types or categories and let clients select onl those Groups they are interested in, in order to receive their events only. This is done via SubscribeRoomGroupRequest and UnsubscribeRoomGroupRequest.
- string
- Default Value
- default
(readonly) id :number
The id is unique and it is generated by the server when the Room is created.
- number
(readonly) isAudioStreamingAllowed :boolean
- boolean
(readonly) isGame :boolean
- boolean
(readonly) isHidden :boolean
This is a utility flag that can be used by developers to hide certain Rooms from the interface of their application.
- boolean
(readonly) isJoined :boolean
- boolean
(readonly) isPasswordProtected :boolean
This flag depends on the Room password set when the Room is created or by means of the ChangeRoomPasswordStateRequest.
- boolean
(readonly) maxSpectators :number
- number
(readonly) maxUsers :number
In case of Game Rooms, this is also the maximum number of Players.
- number
(readonly) name :string
Two Rooms in the same Zone cannot have the same name.
- string
(readonly) playerList :Array.<SFSUser>
- Array.<SFSUser>
(readonly) roomManager :SFSRoomManager
(readonly) spectatorCount :number
- number
(readonly) spectatorList :Array.<SFSUser>
- Array.<SFSUser>
(readonly) userCount :number
In case of Game Rooms, this is also the number of Players.
- number
(readonly) userList :Array.<SFSUser>
- Array.<SFSUser>
Methods
containsUser(user) → {boolean}
| Name | Type | Description |
|---|---|---|
user | SFSUser | The object representing the User whose presence in the Room must be checked. |
true if the User is inside the Room.- Type:
- boolean
containsVariable(varName) → {boolean}
| Name | Type | Description |
|---|---|---|
varName | string | The name of the Room Variable whose existance must be checked. |
true if a Room Variable with the passed name is found.- Type:
- boolean
getUserById(id) → {SFSUser}
| Name | Type | Description |
|---|---|---|
id | number | The id of the User to be found. |
null if no User with the passed id can be found in the Room.- Type:
- SFSUser
getUserByName(name) → {SFSUser}
| Name | Type | Description |
|---|---|---|
name | string | The name of the User to be found. |
null if no User with the passed name can be found in the Room.- Type:
- SFSUser
getVariable(varName) → {SFSRoomVariable}
| Name | Type | Description |
|---|---|---|
varName | string | The name of the Room Variable to be retrieved. |
null if no Room Variable with the passed name belongs to the Room.- Type:
- SFSRoomVariable
getVariables() → {Array.<SFSRoomVariable>}
- Type:
- Array.<SFSRoomVariable>
toString() → {string}
- Type:
- string