IServiceAudienceEvents Interface

Packages > fluid-framework > IServiceAudienceEvents

Events that trigger when the roster of members in the Fluid session change. Only changes that would be reflected in the returned map of IServiceAudience’s getMembers method will emit events.

“membersChanged”

The membersChanged event is emitted when a member is either added or removed.

Listener signature

() => void;

“memberAdded”

The memberAdded event is emitted when a member joins the audience.

Listener signature

(clientId: string, member: M) => void;
  • clientId - A unique identifier for the client

  • member - The service-specific member object for the client

“memberRemoved”

The memberRemoved event is emitted when a member leaves the audience.

Listener signature

(clientId: string, member: M) => void;
  • clientId - A unique identifier for the client

  • member - The service-specific member object for the client

Signature:

export interface IServiceAudienceEvents<M extends IMember> extends IEvent 

Extends: