Skip to content

createRoomWidgetClient

createRoomWidgetClient(widgetApi, capabilities, roomId, opts, sendContentLoaded?): DigitalWorldClient

Defined in: src/matrix.ts:171

Construct a Digital World Client that works in a widget. This client has a subset of features compared to a full client. It uses the widget-api to communicate with the network. (widget <-> client <-> hub)

WidgetApi

The widget api to use for communication.

ICapabilities

The capabilities the widget client will request.

string

The room id the widget is associated with.

ICreateClientOpts

The configuration options for this client. These configuration options will be passed directly to DigitalWorldClient.

boolean = true

Whether to send a content loaded widget action immediately after initial setup. Set to false if the widget uses waitForIFrameLoad=true (in this case the client does not expect a content loaded action at all), or if the the widget wants to send the ContentLoaded action at a later point in time after the initial setup.

DigitalWorldClient

A new Digital World client with a subset of features.