LivePresenceUser class

A user that presence is being tracked for.

Properties

data

Optional data shared by the user. Returns data from connection with most recent event. Client connection specific data is available from each connection.

displayName
isLocalUser

If true the user is the local user.

roles

Returns the user's meeting roles.

state

Users current state.

userId

ID of the user. Can be undefined when first initialized.

Methods

getConnection(string)

Returns the user's connection associated with clientId. See <xref:LivePresenceConnection>

getConnections(PresenceState)

Returns the user's connections. See <xref:LivePresenceConnection>

isFromClient(string)

Returns true if the presence object is from the specified client.

Property Details

data

Optional data shared by the user. Returns data from connection with most recent event. Client connection specific data is available from each connection.

undefined | TData data

Property Value

undefined | TData

displayName

undefined | string displayName

Property Value

undefined | string

isLocalUser

If true the user is the local user.

boolean isLocalUser

Property Value

boolean

roles

Returns the user's meeting roles.

UserMeetingRole[] roles

Property Value

state

Users current state.

PresenceState state

Property Value

userId

ID of the user. Can be undefined when first initialized.

string userId

Property Value

string

Method Details

getConnection(string)

Returns the user's connection associated with clientId. See <xref:LivePresenceConnection>

function getConnection(clientId: string): undefined | LivePresenceConnection<TData>

Parameters

clientId

string

The ID of the client to lookup.

Returns

undefined | LivePresenceConnection<TData>

getConnections(PresenceState)

Returns the user's connections. See <xref:LivePresenceConnection>

function getConnections(filter?: PresenceState): LivePresenceConnection<TData>[]

Parameters

filter
PresenceState

Returns

LivePresenceConnection<TData>[]

isFromClient(string)

Returns true if the presence object is from the specified client.

function isFromClient(clientId: string): boolean

Parameters

clientId

string

The ID of the client to lookup.

Returns

boolean