IAudienceOwner Interface
Manages the state and the members for IAudience
To use, import via @fluidframework/container-definitions/legacy
.
For more information about our API support guarantees, see here.
Signature
export interface IAudienceOwner extends IAudience
Extends: IAudience
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
addMember(clientId, details) | Alpha |
void | Adds a new client to the audience |
removeMember(clientId) | Alpha |
boolean | Removes a client from the audience. Only emits an event if a client is actually removed |
setCurrentClientId(clientId) | Alpha |
void | Notifies Audience that current clientId has changed. See getSelf() and IAudienceEvents's "selfChanged" event for more details. |
Method Details
addMember
Adds a new client to the audience
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
addMember(clientId: string, details: IClient): void;
Parameters
Parameter | Type | Description |
---|---|---|
clientId | string | |
details | IClient |
removeMember
Removes a client from the audience. Only emits an event if a client is actually removed
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
removeMember(clientId: string): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
clientId | string |
Returns
if a client was removed from the audience
Return type: boolean
setCurrentClientId
Notifies Audience that current clientId has changed. See getSelf() and IAudienceEvents's "selfChanged" event for more details.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
setCurrentClientId(clientId: string): void;
Parameters
Parameter | Type | Description |
---|---|---|
clientId | string |