Constructor
new RoomSettings(name)
Creates a new instance of the RoomSettings class.
Pass the instance to the CreateRoomRequest class constructor.
Pass the instance to the CreateRoomRequest class constructor.
Parameters:
| Name | Type | Description |
|---|---|---|
name | string | The name of the Room to be created. |
Members
allowOwnerOnlyInvitation :boolean
Indicates whether the Room allows Invitations to join the Room to be sent by any User or just by its owner.
Type:
- boolean
- Default Value
- true
events :RoomEvents
Subset of the configuration parameters indicating which Room-related events should be dispatched by the client.
Room events include: Users entering or leaving the Room, User count change and User Variables update. If set to null, the events configured on the server side are enabled (see the SmartFoxServer Administration Tool documentation).
Type:
- Default Value
- null
extension :RoomExtension
Subset of the configuration parameters indicating which Extension (if any) should be attached to the Room on the server side, and its settings.
Type:
- Default Value
- null
groupId :string
Identifier (name) of the Group to which the Room is assigned.
If the Group doesn't exist yet, a new one is created before assigning the Room to it.
Type:
- string
- Default Value
- "default"
isGame :boolean
Indicates whether the Room is a Game Room.
Type:
- boolean
- Default Value
- false
maxSpectators :number
Maximum number of Spectators allowed to join the Room (only for Game Rooms).
Type:
- number
- Default Value
- 0
maxUsers :number
Maximum number of Users allowed to join the Room.
In case of Game Rooms, this represents the maximum number of Players.
Type:
- number
- Default Value
- 10
maxVariables :number
Maximum number of Room Variables allowed for the Room.
Type:
- number
- Default Value
- 5
name :string
Name of the Room.
Type:
- string
password :string
Password to join the Room (optional).
If the password is set to an empty string, the Room won't be password protected.
Type:
- string
- Default Value
- (empty string)
permissions :RoomPermissions
Maximum number of Room Variables allowed for the Room.
Permissions include: name and password change, maximum Users change and public messaging. If set to null, the permissions configured on the server side are used (see the SmartFoxServer Administration Tool documentation).
Type:
- Default Value
- null
variables :Array.<SFSRoomVariable>
Maximum number of Room Variables allowed for the Room.
Type:
- Array.<SFSRoomVariable>
- Default Value
- (empty array)