Skip to content 

IAudience Interface

Packages > @fluidframework/container-definitions > IAudience

Audience represents all clients connected to the op stream, both read-only and read/write.

Signature:

export interface IAudience extends EventEmitter 

Extends: EventEmitter

Methods

List of methods of this class
Method Description
getMember(clientId) Get details about the connected client with the specified clientId, or undefined if the specified client isn't connected
getMembers() List all clients connected to the op stream, keyed off their clientId
on(event, listener)
on(event, listener)

Methods

getMember

Get details about the connected client with the specified clientId, or undefined if the specified client isn’t connected

Signature:

getMember(clientId: string): IClient | undefined;

Parameters

List of parameters
Parameter Type Description
clientId string

Returns:

IClient | undefined

getMembers

List all clients connected to the op stream, keyed off their clientId

Signature:

getMembers(): Map<string, IClient>;

Returns:

Map<string, IClient>

on

Signature:

on(event: "addMember", listener: (clientId: string, details: IClient) => void): this;

Parameters

List of parameters
Parameter Type Description
event "addMember"
listener (clientId: string, details: IClient) => void

Returns:

this

on

Signature:

on(event: "removeMember", listener: (clientId: string) => void): this;

Parameters

List of parameters
Parameter Type Description
event "removeMember"
listener (clientId: string) => void

Returns:

this