Skip to main content

Presence Interface

Presence represents known clients within a session and their custom states.

This API is provided as a beta preview and may change without notice.

To use, import via @fluidframework/presence/beta.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature

/** @sealed */
export interface Presence

Properties

Property Alerts Modifiers Type Description
attendees Beta readonly { readonly events: Listenable<AttendeesEvents>; getAttendees(): ReadonlySet<Attendee>; getAttendee(clientId: ClientConnectionId | AttendeeId): Attendee; getMyself(): Attendee; }
events Beta readonly Listenable<PresenceEvents> Events for Presence.
states Beta readonly { getWorkspace<StatesSchema extends StatesWorkspaceSchema>(workspaceAddress: WorkspaceAddress, requestedStates: StatesSchema, controls?: BroadcastControlSettings): StatesWorkspace<StatesSchema>; }

Property Details

attendees

This API is provided as a beta preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
readonly attendees: {
readonly events: Listenable<AttendeesEvents>;
getAttendees(): ReadonlySet<Attendee>;
getAttendee(clientId: ClientConnectionId | AttendeeId): Attendee;
getMyself(): Attendee;
};

Type: { readonly events: Listenable<AttendeesEvents>; getAttendees(): ReadonlySet<Attendee>; getAttendee(clientId: ClientConnectionId | AttendeeId): Attendee; getMyself(): Attendee; }

events

Events for Presence.

This API is provided as a beta preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
readonly events: Listenable<PresenceEvents>;

Type: Listenable<PresenceEvents>

states

This API is provided as a beta preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
readonly states: {
getWorkspace<StatesSchema extends StatesWorkspaceSchema>(workspaceAddress: WorkspaceAddress, requestedStates: StatesSchema, controls?: BroadcastControlSettings): StatesWorkspace<StatesSchema>;
};

Type: { getWorkspace<StatesSchema extends StatesWorkspaceSchema>(workspaceAddress: WorkspaceAddress, requestedStates: StatesSchema, controls?: BroadcastControlSettings): StatesWorkspace<StatesSchema>; }