room()
room()
Returns a Promise with a config
object containing information about the room that you're currently connected to, as well as domainConfig
properties describing the room's domain. See room configuration to learn more about what's in the config
property, and domain configuration for domainConfig
details.
To see only explicitly-set properties, ignoring any defaults, pass {includeRoomConfigDefaults: false}
to the method.
In the case that you're not yet connected to a room (for example, if you're waiting for a join()
to finish) but you have already specified a room URL via a factory or join property, the returned Promise will resolve with an object containing only that room URL.
You can also access room()
info after a preAuth
.
If you haven't specified a room URL yet, the returned Promise will resolve to null
.