Members
(readonly) roomCount :number
Current number of Rooms in the Room List.
Type:
- number
Methods
containsGroup(groupId) → {boolean}
Indicates whether the specified Group has been subscribed by the client.
Parameters:
| Name | Type | Description |
|---|---|---|
groupId | string | The name of the Group. |
Returns:
true if the client subscribed the passed Group.- Type:
- boolean
containsRoom(idOrName) → {boolean}
Indicates whether the specified Room exists in the Room List.
Parameters:
| Name | Type | Description |
|---|---|---|
idOrName | number | | The id or name of the SFSRoom object whose presence in the Room List should be checked. |
Returns:
true if the passed Room is found in the Room List.- Type:
- boolean
containsRoomInGroup(idOrName, groupId) → {boolean}
Indicates whether the Room List contains a Room belonging to the specified Group.
Parameters:
| Name | Type | Description |
|---|---|---|
idOrName | number | | The id or name of the SFSRoom object whose presence in the Room List should be checked. |
groupId | string | The name of the Group to which the specified Room must belong. |
Returns:
true if the Room List contains the passed Room and it belongs to the specified Group.- Type:
- boolean
getJoinedRooms() → {Array.<SFSRoom>}
Returns the list of Rooms currently joined by the client.
Returns:
The list of objects representing the Rooms currently joined by the client.
- Type:
- Array.<SFSRoom>
getRoomById(id) → {SFSRoom}
Retrieves a SFSRoom object by its id.
Parameters:
| Name | Type | Description |
|---|---|---|
id | number | The id of the Room. |
Returns:
An object representing the requested Room;
null if no SFSRoom object with the passed id can be found in the Room List.- Type:
- SFSRoom
getRoomByName(name) → {SFSRoom}
Retrieves a SFSRoom object by its name.
Parameters:
| Name | Type | Description |
|---|---|---|
name | string | The name of the Room. |
Returns:
An object representing the requested Room;
null if no SFSRoom object with the passed name can be found in the Room List.- Type:
- SFSRoom
getRoomGroups() → {Array.<string>}
Returns the names of Groups currently subscribed by the client.
At login time, the client automatically subscribes all the Room Groups specified in the Zone's Default Room Groups setting.
Returns:
A list of Group names.
- Type:
- Array.<string>
getRoomList() → {Array.<SFSRoom>}
Returns a list of Rooms currently "known" by the client.
The list contains all the Rooms that are currently joined and all the Rooms belonging to the Room Groups subscribed by the client.
At login time, the client automatically subscribes all the Room Groups specified in the Zone's Default Room Groups setting.
Returns:
The list of the available SFSRoom objects.
- Type:
- Array.<SFSRoom>
getRoomListFromGroup(groupId) → {Array.<SFSRoom>}
Retrieves the list of Rooms which are grouped under the specified Group.
Parameters:
| Name | Type | Description |
|---|---|---|
groupId | string | The identifier (name) of the Group. |
Returns:
The list of SFSRoom objects belonging to the passed Group.
- Type:
- Array.<SFSRoom>
getUserRooms(user) → {Array.<SFSRoom>}
Retrieves the list of Rooms joined by the specified User.
The list contains only those Rooms "known" by the Room Manager; the User could be joined in other Rooms the client is not aware of.
Parameters:
| Name | Type | Description |
|---|---|---|
user | SFSUser | The object representing the User to look for in the current Room List. |
Returns:
The list of Rooms joined by the passed User.
- Type:
- Array.<SFSRoom>