Options
All
  • Public
  • Public/Protected
  • All
Menu

Live fluid object that synchronizes a named state and optional data value across clients.

remarks

The primary benefit of using the LiveState object in a Teams meeting, versus something like a SharedMap, is that you can restrict the roles of who's allowed to perform state changes.

Type Parameters

  • TData = undefined

    Optional data object that's synchronized with the state.

Hierarchy

Index

Constructors

  • Type Parameters

    • TData = undefined

    Parameters

    Returns LiveState<TData>

Properties

INITIAL_STATE: "" = ''

The objects initial state if not explicitly initialized.

TypeName: "@microsoft/live-share:LiveState" = ...

The objects fluid type/name.

factory: DataObjectFactory<LiveState<undefined>, DataObjectTypes> = ...

The objects fluid type factory.

Accessors

  • get data(): undefined | TData
  • get isInitialized(): boolean
  • get isStarted(): boolean
  • get state(): string

Methods

  • changeState(state: string, data?: TData): void
  • Changes to a new state with an optional data object.

    Parameters

    • state: string

      New state name.

    • Optional data: TData

      Optional. Data object to associate with the new state.

    Returns void

  • dispose(): void
  • initialize(allowedRoles?: UserMeetingRole[], state?: string, data?: TData): Promise<void>

Generated using TypeDoc