Create a room

Create a room

The createRoom function exposed by the SDK allows you to open a room creation dialog and prepopulate the room settings, room participants, and an initial message. The user can then update the prepopulated information and create the room in one click.

Alternatively, it is also possible to create a room silently, without showing a creation dialog, by setting the silent parameter. Please note that the Custom pricing tier is required for silent room creation. Note that if some of the members of the room are from a different company (External) and not connected with the logged in user, these unconnected users may not be added into the room if they are not configured to automatically accept connection requests.

In Focus mode, if a selector is provided, the SDK will create a new iFrame and show the room creation dialog in it.

If the selector parameter is not provided, or if in Collaboration mode, the dialog will be opened in the main iFrame (the one that was created with the render function).

Parameters

ECPCreateRoomOptions contains the list of room settings that will be preselected, and is defined as below:

{
  public?: boolean;
  external?: boolean;
  multilateral?: boolean;
  allowHistoryBrowsing?: boolean;
  allowMessageCopy?: boolean;
  allowSendMessages?: boolean;
  allowAddUser?: boolean;
  discoverable?: boolean;
  message?: string | SharedMessage;
  silent?: boolean;
}

The format of the message is the same as the one described for the sendMessage method, with the exception of attachments, which are not yet supported.

The room settings preset can be automatically overridden in several situations:

  • Manually by the user, in the room creation dialog

  • Automatically because of the user entitlements or other admin controlled settings

  • Automatically if the preset settings are not compatible with one another. For example, if an external participant is prepopulated in the list of recipients, the room automatically becomes external.

The behavior is consistent with the room creation UI in the Symphony web app.

Returned promise

The Create room function returns a JavaScript Promise that will resolve once the action has been completed. The promise has the following interface:

- Success

- Error

Last updated