IServiceAudienceEvents Interface
Packages > fluid-framework > IServiceAudienceEvents
Events that trigger when the roster of members in the Fluid session change.
Signature
export interface IServiceAudienceEvents<M extends IMember> extends IEvent
Extends: IEvent
Type Parameters
Parameter | Constraint | Description |
---|---|---|
M | IMember | A service-specific IMember implementation. |
Remarks
Only changes that would be reflected in the returned map of IServiceAudience ’s getMembers() method will emit events.
Call Signatures
CallSignature | Description |
---|---|
(event: "membersChanged", listener: () => void): void | Emitted when a member(s) are either added or removed. |
(event: "memberAdded", listener: MemberChangedListener<M>): void | Emitted when a member joins the audience. |
(event: "memberRemoved", listener: MemberChangedListener<M>): void | Emitted when a member leaves the audience. |
Call Signature Details
(event: “membersChanged”, listener: () => void): void
Emitted when a member (s) are either added or removed.
Signature
(event: "membersChanged", listener: () => void): void;
(event: “memberAdded”, listener: MemberChangedListener<M>): void
Emitted when a member joins the audience.
Signature
(event: "memberAdded", listener: MemberChangedListener<M>): void;
(event: “memberRemoved”, listener: MemberChangedListener<M>): void
Emitted when a member leaves the audience.
Signature
(event: "memberRemoved", listener: MemberChangedListener<M>): void;