IServiceAudience Interface

Packages > fluid-framework > IServiceAudience

Base interface to be implemented to fetch each service’s audience. The generic M allows consumers to further extend the client object with service-specific details about the connecting client, such as device information, environment, or a username.

Signature:

export interface IServiceAudience<M extends IMember> extends IEventProvider<IServiceAudienceEvents<M>> 

Extends: IServiceAudienceEvents

Methods

List of methods of this class
Method Description
getMembers() Returns an map of all users currently in the Fluid session where key is the userId and the value is the member object. The implementation may choose to exclude certain connections from the returned map. E.g. ServiceAudience excludes non-interactive connections to represent only the roster of live users.
getMyself() Returns the current active user on this client once they are connected. Otherwise, returns undefined.

Methods

getMembers

Returns an map of all users currently in the Fluid session where key is the userId and the value is the member object. The implementation may choose to exclude certain connections from the returned map. E.g. ServiceAudience excludes non-interactive connections to represent only the roster of live users.

Signature:

getMembers(): Map<string, M>;

Returns:

getMyself

Returns the current active user on this client once they are connected. Otherwise, returns undefined.

Signature:

getMyself(): M | undefined;

Returns: