ReadonlyconfigThe configuration of this room.
The current countdown value. 0 to hide
The current countdown interval function
The current game handler.
OptionalhostThe player object that has host permissions in this room.
Can be:
OptionalhostThe id of the current host or undefined if the room has no host.
ReadonlylistenerThe listener, handling incoming messages.
ReadonlylobbyThe lobby handler.
Map containing all players, online and offline. Key is connection id.
ReadonlyserverThe current state of the game.
List containing online, non-spectating players.
List containing ALL online players.
Constructs a JSON string representing a countdown message. The countdown message is sent to connected clients when the countdown is updated.
The countdown message
The current countdown number. 0 to hide.
Retrieves all valid player states from connected clients.
An array of valid PlayerMessage objects from all connected players.
Gets a player from the players map. If not found, create new player.
the connection to search for
Get all colors, which aren't used by any player.
A string array of unused colors or an empty array if all colors are used.
Called every second by the server
Performs one or more of the specified checks.
The player to perform the checks for.
The message that caused the check.
URL to load music from.
The new username.
The new playlist to add.
The playlist index to remove.
Whether to perform advanced filtering tactics when generating the songs array. Currently just ignores parens when filtering for identical song names.
The music start position.
Used as default value in PlayerPicksGame, used as forced position in MultipleChoiceGame.
Whether to prefer distractions by the same artist.
Whether to directly end the round after all players answered.
The game mode being played.
The amount of time a player should have to pick a song.
The amount of rounds to play.
The time per question in each round.
Optionalanswer?: stringProvided only for PlayerPicksGame. The string of the song name the player guessed.
OptionalanswerIndex?: numberProvided only for MultipleChoiceGame. The index of the selected answer.
Where to send the player to.
The name of the player that should get host.
The song the player picked in the choose step.
The name of the song artist.
A URL to the audio file of the song. Currently only audio previews from Apple Music and SoundCloud are allowed.
Cover URL of the song.
The URL users will be redirected to when clicking.
The name of the song.
The selected start pos for the song.
A map of all active (online, non-spectating) players. Key is server generated uuid, NOT connection id.
The current game state
The player's unique identifier generated by the server. Not connection id!
The current version of the server.
The count of filtered songs.
Optionalplaylists?: {Currently selected playlist(s)
The current countdown number. 0 to hide.
The current game phase.
Optionalquestion?: The round number.
The songs that were played in this round.
The added log message.
The log level of the added message.
The duration of the progressbar.
The number of seconds to offset the progress bar start point.
One of the following:
true, if ALL checks were successful, false otherwise.
Starts a countdown that is shown for all players.
The number to count down from.
A function to call as soon as the countdown finishes.
Stops a countdown if running.
Serializes this room instance to a PersistedRoomState object.
Transfers the host to another connection
the new host connection. Undefined if no one should be the host.
whether to broadcast an update (that also informs the new host that it got host).
StaticfromCreates a new ValidRoom object.
a reference to the SongGuessServer this room belongs to
the serialized PersistedServerState or PersistedRoomState to create this room from
A validated SongGuess room.