@microsoft/live-share package
Classes
AzureLiveShareHost |
This host enables using Live Share through your own |
DynamicObjectRegistry |
Static registry class for loadable projects for use in frameworks like |
HostTimestampProvider |
Timestamp Provider that calls the Live Share Host to lookup the current time. |
LiveDataObject |
Extends Fluid's DataObject class. Intended for use with Live Share custom DDS's that rely on a |
LiveEvent |
Live fluid object that broadcasts an event to other clients and a set of static event related helpers. remarksApplications should call |
LiveEventScope |
Object responsible for sending and receiving live share events. |
LiveEventSource |
Broadcasts live share events to all clients and can be received by an |
LiveEventTarget |
Receives events broadcast by an |
LiveEventTimer |
Periodically broadcasts an event to listening |
LiveFollowMode |
Live object that allows users to present and/or follow other users. Provides a state value, which reflects the relevant value to reference (e.g., the presenting user's state value). |
LivePresence |
Live fluid object that synchronizes presence information for the user with other clients. |
LivePresenceUser |
A user that presence is being tracked for. |
LiveShareClient |
Client used to connect to fluid containers within a Microsoft Teams context. |
LiveShareRuntime |
Runtime for LiveDataObject, which is used to do things like validate roles, get a timestamp |
LiveState |
Live fluid object that synchronizes a named state and optional data value across clients. |
LiveTelemetryLogger |
Wraps the configured logger for the runtime and ensures that certain mandatory properties are included on outgoing telemetry events. |
LiveTimer |
Extends Fluid's DataObject class. Intended for use with Live Share custom DDS's that rely on a |
LocalTimestampProvider |
Implements a local timestamp provider for testing purposes. |
TestLiveShareHost |
Live Share Host implementation used for local testing. |
TimestampProvider |
Default |
Interfaces
IClientInfo |
Returned from |
IClientTimestamp |
Base interface for all client timestamp comparisons. |
IContainerRuntimeSignaler |
Duck type of something that provides the expected signalling functionality at the container level. |
IEvent |
Base interface for all event objects. |
IFluidContainerInfo |
Returned from |
IFluidTenantInfo |
Returned from |
IFollowModePresenceUserData |
The presence data for a user's personal follow mode state. |
IFollowModeState |
Information about the state of the local user's follow mode. |
ILiveEvent |
Base type for all incoming live share events of a certain type |
ILiveEventEvents | |
ILiveFollowModeEvents | |
ILivePresenceEvents | |
ILiveShareClientOptions |
Options used to configure the |
ILiveShareHost |
Interface for hosting a Live Share session within a client like Teams. |
ILiveShareJoinResults |
Response object from |
ILiveStateEvents | |
ILiveTelemetryProperties |
Properties included on all events sent by |
ILiveTimerEvents | |
INtpTimeInfo |
Returned from |
IRuntimeSignaler |
Duck type of something that provides the expected signalling functionality: A way to verify we can signal, a way to send a signal, and a way to listen for incoming signals |
ITimerConfig | |
ITimerConfigData |
Type Aliases
FollowModePresenceUser |
Convenience type for a LivePresenceUser in LiveFollowMode |
GetLocalUserCanSend |
Callback function used to validate whether or not the local user can send an update for this object. |
LiveEventListener |
Live event callback. |
UpdateSynchronizationState |
Callback function used to the receive the state update sent by a remote live object. |
Enums
ContainerState |
State of the current Live Share sessions backing fluid container. |
FollowModeType |
The follow mode type. |
LiveDataObjectInitializeState |
The initialization state for the |
LiveEventEvents |
Events supported by |
LiveFollowModeEvents |
Events supported by |
LivePresenceEvents |
Events supported by |
LiveStateEvents |
Events supported by [LiveState` object. |
LiveTimerEvents |
Events supported by |
PresenceState |
List of possible presence states. |
UserMeetingRole |
Allowed roles during a meeting. |
Functions
get |
Inject Live Share dependencies into your Fluid container schema. This should only be done once, right before connecting to a container. |
get |
|
get |
Inject Live Share dependencies to relevant |
Function Details
getLiveContainerSchema(ContainerSchema, LiveShareRuntime)
Inject Live Share dependencies into your Fluid container schema. This should only be done once, right before connecting to a container.
function getLiveContainerSchema(schema: ContainerSchema, liveRuntime: LiveShareRuntime): ContainerSchema
Parameters
- schema
-
ContainerSchema
Fluid ContainerSchema you would like to inject the runtime into
- liveRuntime
- LiveShareRuntime
LiveShareRuntime instance
Returns
ContainerSchema
ContainerSchema with injected dependencies
Remarks
Needed because Fluid uses static factories to construct data objects internally, and LiveDataObject
instances require access to the LiveShareRuntime
before use.
Users should not use this method if you are connecting to a container using LiveShareClient
.
This is intended to be used when you are using another Fluid client, such as AzureClient
.
getLiveContainerSchemaProxy(ContainerSchema, LiveShareRuntime)
function getLiveContainerSchemaProxy(schema: ContainerSchema, liveRuntime: LiveShareRuntime): ContainerSchema
Parameters
- schema
-
ContainerSchema
- liveRuntime
- LiveShareRuntime
Returns
ContainerSchema
getLiveDataObjectClass<TClass>(LoadableObjectClass<any>, LiveShareRuntime, Map<string, LoadableObjectClass<any>>)
Inject Live Share dependencies to relevant LiveDataObject
derived classes.
Regular DataObject
classes are not injected.
function getLiveDataObjectClass<TClass>(ObjectClass: LoadableObjectClass<any>, liveRuntime: LiveShareRuntime, injectedClasses?: Map<string, LoadableObjectClass<any>>): LoadableObjectClass<TClass>
Parameters
- ObjectClass
-
LoadableObjectClass<any>
a LoadableObjectClass
instance to inject with the liveRuntime
provided, if needed.
- liveRuntime
- LiveShareRuntime
the LiveShareRuntime
instance to inject into provided LiveDataObject
instances.
- injectedClasses
-
Map<string, LoadableObjectClass<any>>
Optional. Map of classes that have already been injected. Default value is an empty map.
Returns
LoadableObjectClass<TClass>
the new LoadableObjectClass
if injected, or the same ObjectClass
passed in if not.
Remarks
Can be used to follow the pattern of this package's unit tests for custom LiveDataObject
implementations.