GridClient
const grid = client.getGrid()RoomConnectionClient manages entire room connection. It exposes state subscriptions and provides actions to manage and observe remoteParticipants and in room actions. Room connection s retrieved from the WherebyClient.
Utilities
getState
GridState
Returns the entire grid state
destroy
void
Destroy the RoomConnectionClient instance.
State Subscriptions
All subscribe methods follow this format:
Call signature:
subscribeX(callback: (payload: T) => void: () => voidContract: Invokes a callback on initial subscription and whenever the state changes.
Returns: an unsubscribe function
Methods
subscribeClientViews
clientViews: ClientView[]
Emits client views
subscribeSpotlightedParticipants
spotlighted:ClientView[]
Emits spotlighted client views
subscribeNumberOfClientViews
num:number
Emits number of client views
subscribeRunningRoomIntegrations
sessions: RoomIntegrationSessionView[]
Emits the running room integrations in the main room or your current breakout group. Only called on changes, so read getState().runningRoomIntegrations for the current value
Actions
spotlightParticipant
id: string
void
Spotlights the specified participant
removeSpotlight
id: string
void
Removes spotlight on specified participant (if spotlighted)
Events
GridClient extends EventEmitter . You can listen to lifecycle and state change events directly:
CLIENT_VIEW_CHANGED
grid:client-view-changed
clientViews: ClientView[]
Client view changes
CLIENT_VIEW_SPOTLIGHTS_CHANGED
grid:client-view-spotlights-changed
clientViews: ClientView[]
Client is spotlighted
NUMBER_OF_CLIENT_VIEWS_CHANGED
grid:number-of-client-views-changed
numClients: number
Number of client views change
RUNNING_ROOM_INTEGRATIONS_CHANGED
grid:running-room-integrations-changed
sessions: RoomIntegrationSessionView[]
A room integration starts or stops, or anything about a running one changes, such as its props
Last updated
Was this helpful?

