Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

RoomConnection Types

MediaStreamConstraints

MediaStream

MediaDeviceInfo

LocalMediaOptions: <Object>

Property
Description

audio:boolean

Enable audio

video:boolean

Enable video

WherebyClientOptions: <Object>

Property
Description

localMediaOptions: localMediaOptions

Options for starting local media

displayName?: string

Display name of the client

roomUrl?: string

Room url of the session

assistantKey?: string | null

If initializing Assistant the assistantKey is required

roomKey?: string | null

URL of the room to join

externalId?: string | null

A custom identifier for the participant. Gets saved in Insights data. Supports any English alphabet characters (A-Z).

isNodeSDK?: boolean

True if initializing in a Node environment

isAssistant

True if initializing an Assistant

RemoteParticipantState: <Object>

Property
Description

displayName: string

Display name of the remote participant

id: string

Id of the remote

participant

roleName: string

The role of the local participant. This will be one of the following values: none, visitor, granted_visitor, viewer, granted_viewer, host, recorder, streamer

stream?:MediaStream

Stream of the remote participant

isAudioEnabled:boolean

The remote participant has their camera enabled

isVideoEnabled:boolean

The remote participant has their microphone enabled

isLocalParticipant:boolean

For remote participants, this value is always false

presentationStream: MediaStream | null

Screenshare stream if the participant is presenting

externalId: string | null

A custom identifier for the participant.

stickyReaction?: StickyReaction

Whether the participant has hand raised

isDialIn: boolean

True if participant is a dial in agent

WaitingParticipantState: <Object>

Property
Description

id: string

Id of the participant in the waiting room

displayName?: string | null

Display name of the participant in the waiting room

ChatMessage: <Object>

Property
Description

id: string

Unique identifier for the chat message

senderId: string

Id of the participant who sent the chat message

parentId?: string

If present, indicates that the chat message is a reply to a chat message whose id matches the given parentId value here. If not present, then this chat message is not a reply to any other chat message(s) previously received

timestamp: string

Timestamp of when the message was sent

sig?: string

If the current participant is the owner of the chat message (i.e. they sent this chat message) then the service will return this property that can be used to e.g. remove this chat message at a later time (see removeChatMessage API)

text: string

Text content of the chat message to be displayed

removed: boolean

If true then this chat message should be considered removed from any ongoing chat display

LocalScreenshareState: <Object>

Property
Description

status: "inactive" | "starting" | "active" | "error"

Local screen sharing status

startedAt?: string

If status is "screensharing" then this field will show when the local screen share started. Otherwise this field will be undefined.

error?: string

If status is "error" then this field will provide an error object received from the service. Otherwise this field will be undefined.

LiveCaption: <Object>

Property
Description

resultId: string

Unique identifier for the current live caption result

participantId: string

Identifier of the participant

text: string

The text content of the live caption result (can be updated until the live caption is finalized)

timestamp: number

Timestamp of when the live caption was received

ClientView: <Object>

A client view can be either a participant or a screenshare.

Property
Description

id: string

Internal id

clientId: string

Id of the participant

displayName?: string

Display name of the participant or screenshare

stream?: MediaStream

Media stream of the client view

isLocalCliend: boolean

Is the client view owned by the local participant?

isAudioEnabled: boolean

The client view has their microphone enabled

isVideoEnabled: boolean

The client view has their camera enabled

isPresentation: boolean

The client view is a presentation (screenshare)

CloudRecordingState: <Object>

Property
Description

status: "requested" | "recording" | "error"

Cloud recording status

startedAt?: string

If status is "recording" then this field will show when the cloud recording started

error?: string

If status is "error" then this field will show the error message received from the service

LiveTranscriptionState: <Object>

Property
Description

status: "requested" | "transcribing" | "error"

Live transcription status

startedAt?: string

If status is "transcribing" then this field will show when the live transcription started. Otherwise this field will be undefined.

error?: string

If status is "error" then this field will show the error message received from the service. Otherwise this field will be undefined.

LiveCaptionsState: <Object>

Property
Description

status: "requested" | "captioning" | "error"

Live captions status

startedAt?: string

If status is "captioning" then this field will show when the live captions started. Otherwise this field will be undefined.

error?: string

If status is "error" then this field will show the error message received from the service. Otherwise this field will be undefined.

captionLog: Array<LiveCaption>

Zero or more live captions data objects received from the Whereby Live Captions service. Entries in this array are removed after 5 seconds of inactivity since their last update.

ScreenshareState: <Object>

Property
Description

participantId: string

Id of the participant owning the screenshare

id: string

Id of the screenshare

hasAudioTrack: boolean

stream?:MediaStream

Media stream of the screenshare

isLocal: boolean

Is the screenshare owned by the local participant?

LiveStreamState: <Object>

Property
Description

status: "streaming"

Live streaming is in progress

startedAt: number

When the live stream started

BreakoutState: <Object>

Timestamp fields are epoch milliseconds unless noted, so they can be compared directly against Date.now() to drive countdowns.

Type
Description

isAvailable: boolean

Breakout groups require a group (SFU) room. false in peer-to-peer rooms, where breakout actions are refused

error: string | null

Set when a breakout action was refused, for example starting a session in a peer-to-peer room

isActive: boolean

The state of the breakout session. If it's true, a breakout session is currently ongoing in the room

currentGroup: { id: string, name: string } | null

An object containing the information of the breakout group that the participant is currently in. null if the SDK participant is not in a group.

groups: { [groupId: string]: string } | null

The configured groups, as a map of group id to group name

enforceAssignment: boolean

When true, participants are meant to stay in the group they are assigned to. The SDK surfaces the flag but does not block joinBreakoutGroup, honour it in your UI

autoMoveToGroup: boolean

When true, assigned participants are moved into their group automatically when the session starts

moveToGroupGracePeriod: number | null

Seconds between the session starting and that automatic move. Defaults to 10

autoMoveToMain: boolean

When true, participants are moved back to the main room automatically when the session ends

moveToMainGracePeriod: number | null

Seconds between the session ending and that automatic move. Defaults to 30

breakoutTimerSetting: boolean

Whether the session runs on a timer

breakoutTimerDuration: number

Length of the timer in seconds. Defaults to 1800 (30 minutes)

startedAt: Date | null

When the breakout session was started

endTime: number | null

When the timer runs out, as a timestamp

moveToGroupAt: number | null

Timestamp of the upcoming automatic move into the group, or null when autoMoveToGroup is off

moveToMainAt: number | null

Timestamp of the upcoming automatic move back to the main room, or null when autoMoveToMain is off

groupedParticipants: { clients: ClientView[], group: { id: string, name: string } | null }[]

List of the groups in the current breakout session, including the participants in each group.

participantsInCurrentGroup: ClientView[]

Participants in the current breakout group. Empty list if the SDK participants is not currently in a group.

broadcastingParticipants: ClientView[]

Main-room participants currently being broadcast into every group. Only populated for participants who are inside a group

BreakoutSessionSettings: <Object>

The settings shared by startBreakoutSession and updateBreakoutSession. All fields are optional, anything you leave out keeps its current value.

Type
Description

enforceAssignment?: boolean

Signal that participants should stay in their assigned group instead of picking one

autoMoveToGroup?: boolean

Move assigned participants into their group automatically when the session starts

moveToGroupGracePeriod?: number | null

Seconds to wait before that automatic move. Defaults to 10 if you enable autoMoveToGroup without setting it

autoMoveToMain?: boolean

Move participants back to the main room automatically when the session ends

moveToMainGracePeriod?: number | null

Seconds to wait before that automatic move. Defaults to 30 if you enable autoMoveToMain without setting it

breakoutTimerSetting?: boolean

Run the session on a timer

breakoutTimerDuration?: number

Timer length in seconds. Defaults to 1800 (30 minutes) if you enable the timer without setting it

StartBreakoutSessionOptions: <Object>

BreakoutSessionSettings, plus:

Type
Description

groups: { [groupId: string]: string }

Required. The groups to create, as a map of group id to group name

assignments?: { [clientId: string]: string }

Which participants go where, as a map of clientId → groupId

UpdateBreakoutSessionOptions: <Object>

Same shape as StartBreakoutSessionOptions, except that groups is optional too. Every field you omit is left as it is.

ToggleAudioOnlyModeOptions: <Object>

Type
Description

autoDisableLocalCamera?: boolean

Also turn off the local camera when enabling audio-only mode. The camera is not turned back on when audio-only mode is disabled

CallQualityLevel: <string>

"ok" | "warning" | "critical"

RemoteParticipantQualityReport: <Object>

The call quality of each remote participant, keyed by clientId: { [clientId: string]: { quality: CallQualityLevel } }. The local participant is not included. Empty ({}) until the first quality scores arrive after joining a room, and reset to empty after leaving.

Type
Description

The participant's overall call quality: the worse of their video and audio quality

CPUQualityLevel: <string>

"ok" | "warning" | "critical"

LocalParticipantQualityReport: <Object>

The call quality of the local participant: { quality?: CallQualityLevel; cpu?: CPUQualityLevel }. Empty ({}) until the first quality score arrives after joining a room, and reset to empty after leaving.

Type
Description

The local participant's overall call quality: the worse of their video and audio quality

CPU pressure on the local device. Does not affect quality. Left out in browsers without the Compute Pressure API (currently all but Chromium-based browsers)

Breakout group helpers

Exported from @whereby.com/core for building the groups map:

Export
Description

createBreakoutGroups(count?)

Returns count groups ({ a: "Group A", … }), clamped to the supported range

defaultBreakoutGroupName(groupId)

The default display name for a group id, e.g. "Group A"

BREAKOUT_GROUPS_MIN_MAX

[2, 20], the minimum and maximum number of groups

DEFAULT_BREAKOUT_TIMER_DURATION

1800, the timer duration used when the timer is enabled without an explicit duration

ConnectionStatus: <string>

Value
Description

"ready"

Ready to join the room

"connecting"

Currently in the process of doing the initial connection in the room

"connected"

Connected in the room, this is the "stable" state

"room_locked"

Connection failed due to the room being locked, a knock is required to proceed

"knocking"

Waiting for the room host to respond to the knock request

"knock_on_hold"

The host put your knock request on hold. You are still in the waiting room and the host can accept or reject you later, so keep showing a waiting state rather than sending the participant away. If the host included a message, it is available as knockResponse on the room connection state.

"knock_rejected"

The host rejected your knock request. If the host included a message, it is available as knockResponse

"kicked"

The current participant was kicked from the room.

This can happen in the following scenarios:

  • when a meeting host ends the meeting for all participants in the room

  • when a meeting host kicks the current participant individually from the room

"leaving"

The current participant has invoked the leaveRoom action to exit the room.

"left"

The current participant has now successfully left the room and all other room participants have been notified.

"disconnected"

The current participant has been disconnected from the room due to an unplanned loss of network connection.

This can happen during temporary network outage (e.g. loss of network or switching networks). If/when the network connection returns the SDK will change the room connection status to reconnectingautomatically.

"reconnecting"

A lost internet connection has been re-established.

The SDK will now automatically re-connect the current participant to the previous room and the room connection state will change to either: a.) knocking if the room is locked, or; b.) connected if the room is unlocked.

JoinRoomStage: <string>

The step joinRoom() is waiting on. joinStage in the room connection state is one of these values, or null when no join is in progress. A join goes through the stages in this order.

Value
Description

"credentials"

Getting device credentials. A request that fails is retried every 2 seconds

"organization"

Fetching the organization the room belongs to

"local_media"

Starting the camera and microphone. The join waits here while the browser asks for permission

"signal_connect"

Connecting to Whereby's signal server

"identify_device"

Waiting for the signal server to identify the device

"join_room"

Asked to join the room, waiting for the server to reply

JoinRoomErrorNames: <string>

The errors joinRoom() rejects with when the SDK gives up on the join itself: "organization_fetch_failed" | "join_cancelled".

Value
Description

"organization_fetch_failed"

The organization the room belongs to couldn't be fetched

"join_cancelled"

The room was left (leaveRoom(), destroy(), or being kicked), or joinRoom() was called again, before the join finished

joinRoom() also rejects with the errors the server sends when it refuses the join, such as "room_full" or "room_join_permission_denied". Those aren't part of this type.

LocalParticipantState: <Object>

Property
Description

displayName: string

Display name of the local participant (you)

id:string

Local participant id

roleName:string

The role of the local participant. This will be one of the following values: none, visitor, granted_visitor, viewer, granted_viewer, host, recorder, streamer

stream?:MediaStream

When set, the media stream (audio & video) of

the local participant

isAudioEnabled:boolean

The local participant has their microphone enabled

isVideoEnabled:boolean

The local participant has their camera enabled

isLocalParticipant:true

Always set to true. Can be used to easily identify the local participant if in an array with eg remote participants

isScreensharing:boolean

True if the local participant is screen sharing

clientClaim?:string

breakoutGroupAssigned:string

The name of the breakout group the participant is assigned to (if any)

RoomJoinedEvent: <Object>

Property
Description

isLocked: boolean

True if room is locked

selfId: string

Id of the participant who joined the room

RoomJoinedSuccess: <Object>

Property
Description

room: object

Room state data on room joined

selfId: string

Id of the participant who joined the room

breakoutGroup: string | null

Name of breakout group that the participant joined, or null if user is not in a breakout group on room joined.

KnockResponse: <Object>

The host's response to your knock, delivered when they put you on hold or reject you. Available as knockResponse on the room connection state. It is null until a response arrives, and a host who responds without writing anything produces a response with no message, so always guard on knockResponse?.message rather than on knockResponse alone.

Type
Description

message?: string

The message the host wrote when calling holdWaitingParticipant or rejectWaitingParticipant. Absent when the host responded without a message

sender?: KnockResponseSender

Who the message came from. Populated with the host's display name for on-hold responses; rejections are delivered without sender details

KnockResponseSender: <Object>

Type
Description

displayName?: string | null

Display name of the host who responded

avatarUrl?: string | null

Avatar of the host who responded, when available

RoomIntegrationsState: <Object>

roomIntegrations on the room connection state. See Room Integrations.

Type
Description

hasFetched: boolean

true once the room's list of integrations has loaded

isFetching: boolean

true while the list is loading

error: RoomIntegrationErrorDetail | null

The last error from a fetch, start, stop or props update

enabled: RoomIntegration[]

Integrations switched on for the room, including ones the SDK can't run

embeddable: RoomIntegration[]

The subset of enabled that can run in an SDK app (YouTube and Miro)

running: RoomIntegrationSessionView[]

Sessions running in the main room or your current breakout group

RoomIntegration: <Object>

Type
Description

roomIntegrationId: string

Id to pass to startRoomIntegration

name: string

Machine name, for example "youtube" or "miro"

title: string

Display name, for example "YouTube"

description: string

Short description, for menus

type: string

The integration's category, for example "video"

icons: { small: string; large: string }

Icon URLs

link: { href: string; text: string }

The provider's website

contentTagName: string

Custom element name of the content

entrypoint: string

URL of the integration's script. Used by the Whereby app, not by the SDK

webview: string

URL of the content frame page. The picker is bootstrap.html next to it. Its origin is the one to check and post to

matcher: RegExp

Matches links this integration can show

isEmbeddable: boolean

true if the integration can run in an SDK app

RoomIntegrationSession: <Object>

Type
Description

roomIntegrationSessionId: string

Id of the running session

roomIntegrationId: string

The integration that's running

breakoutGroupId: string

The breakout group it runs in. "" in the main room

tagName: string

Custom element name of the content

shareUrl: string

The https URL of the shared content

props: RoomIntegrationProps

The content's current state

clientId: string

Id of the participant who started it

roomIntegrationSessionStartedAt: number | null

When it started, in epoch milliseconds

RoomIntegrationSessionView: <Object>

The entries in roomIntegrations.running. A RoomIntegrationSession, plus:

Type
Description

integration: RoomIntegration

The integration that's running

isPresenter: boolean

true if you started it

presenterDisplayName: string | null

Display name of the participant who started it. null if that's you, or if they've left

canStop: boolean

true if you started it or you're a host

RoomIntegrationProps: <Object>

RoomIntegrationErrorDetail: <Object>

Type
Description

code: RoomIntegrationError

"unknown_integration", "integration_not_enabled", "invalid_content", "not_allowed_to_stop", "not_in_a_room", "forbidden", "missing_parameters", "invalid_parameters", "internal_server_error" or "unknown". See Errors

message: string

A description for developers

RoomIntegrationContent: <Object>

Returned by roomIntegrationContent.youtube() and .miro(). RoomIntegrationPickerResult has the same shape.

Type
Description

tagName: string

Custom element name of the content

shareUrl: string

The https URL of the content

props: RoomIntegrationProps

The content's starting state

Last updated

Was this helpful?