LiveShareClient class

Client used to connect to fluid containers within a Microsoft Teams context.

Constructors

LiveShareClient(ILiveShareHost, ILiveShareClientOptions)

Creates a new LiveShareClient instance.

Properties

canSendBackgroundUpdates

Setting for whether LiveDataObject instances using LiveObjectSynchronizer can send background updates. Default value is true.

isTesting

If true the client is configured to use a local test server.

maxContainerLookupTries

Number of times the client should attempt to get the ID of the container to join for the current context.

Methods

joinContainer(ContainerSchema, (container: IFluidContainer) => void)

Connects to the fluid container for the current teams context.

Constructor Details

LiveShareClient(ILiveShareHost, ILiveShareClientOptions)

Creates a new LiveShareClient instance.

new LiveShareClient(host: ILiveShareHost, options?: ILiveShareClientOptions)

Parameters

host
ILiveShareHost

Host for the current Live Share session.

options
ILiveShareClientOptions

Optional. Configuration options for the client.

Property Details

canSendBackgroundUpdates

Setting for whether LiveDataObject instances using LiveObjectSynchronizer can send background updates. Default value is true.

boolean canSendBackgroundUpdates

Property Value

boolean

isTesting

If true the client is configured to use a local test server.

boolean isTesting

Property Value

boolean

maxContainerLookupTries

Number of times the client should attempt to get the ID of the container to join for the current context.

maxContainerLookupTries: number

Property Value

number

Method Details

joinContainer(ContainerSchema, (container: IFluidContainer) => void)

Connects to the fluid container for the current teams context.

function joinContainer(fluidContainerSchema: ContainerSchema, onContainerFirstCreated?: (container: IFluidContainer) => void): Promise<ILiveShareJoinResults>

Parameters

fluidContainerSchema

ContainerSchema

Fluid objects to create.

onContainerFirstCreated

(container: IFluidContainer) => void

Optional. Callback that's called when the container is first created.

Returns

the results of join container.

Remarks

The first client joining the container will create the container resulting in the onContainerFirstCreated callback being called. This callback can be used to set the initial state of of the containers object prior to the container being attached.