You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We will stop making breaking changes to minor and patch versions for @microsoft/live-share, @microsoft/live-share-media, and @microsoft/live-share-canvas on May 24th, 2023. Thanks for your patience as we prepare for this major release!
LivePresence
Created LivePresence Connections api enabling viewing PresenceState and data on a per connection basis.
Removed presence.toArray() and presence.forEach(), in favor of a more standard presence.getUsers() API.
Changed .update() to be an async method. This will now throw an error if the local user does not have the required roles.
LiveState
Changed .set() to be an async method. This will now throw an error if the local user does not have the required roles.
LiveTimer
Changed .start(), play(), etc. to be async methods. This will now throw an error if the local user does not have the required roles.
LiveEvent
Changed .send() to be async. This will now throw an error if the local user does not have the required roles.
Changed .play(), pause(), etc. to be async methods. This will now throw an error if the local user does not have the required roles.
LiveShareRuntime
Created new LiveDataObject abstract class from which all Live Share DDS's now extend
Created new LiveShareRuntime class which is injected into all LiveDataObject instances when joining a container as a non-static reference.
getLiveShareContainerSchemaProxy API for injecting the LiveDataObject with liveRuntime into the static Fluid factories. Even though these factories & constructors are static, this is done in a way such that each Fluid container gets a separate proxy class for each LiveDataObject used. That allows you to have different LiveShareRuntime instances for each container, should you have multiple (useful for unit testing, for example).
Moved LiveShareClient.getTimestamp() to LiveShareRuntime, if using LiveShareClient.getTimestamp() in your app, please use the new timestampProvider which is returned when calling joinContainer on LiveShareClient.
Moved LiveShareClient.verifyRolesAllowed() to LiveShareRuntime
Moved LiveShareClient.getClientRoles() to LiveShareRuntime
Moved LiveShareClient.setTimestampProvider() to LiveShareRuntime
Moved LiveShareClient.setRoleVerifier() to LiveShareRuntime
Updated unit tests to use the LiveShareRuntime
AzureLiveShareHost
Implemented new AzureLiveShareHost class, which allows developers using AzureClient without LiveShareClient to still use LiveDataObject instances.
This work was done in particular so that LivePresence and LiveCanvas can still be used now that displayName is set by default. It uses IAzureAudience to still securely get displayName and userId from the AFR token.
Updated AzureTurboClient to do this by default using getLiveShareContainerSchemaProxy, mostly to give partners depending on this change an example they can reference.
LiveObjectSynchronizer
Refactored LiveObjectSynchronizer to be centralized without static properties, enabling pre-send validation of roles, removed the requirement to have both LiveEventScope and LiveObjectSynchronizer, and significantly reduced the amount of "connect" events being sent. This significantly reduce the performance of our backend service.
In testing the AzureLiveShareHost, I found out that the backwards-compat decorator would try to registerClientId("fakeId") even if we had a valid error (which is what we expect) for fakeId. I improved that behavior so that valid rejections (ideal behavior for "fakeId") are promptly returned w/o extra requests.
Fixed a bug with the BackwardsCompatibilityHostDecorator and LiveShareHostDecorator that caused the polyfill to be used when it shouldn't.
Made waitForResult util more flexible for better type validation, ability to have valid undefined results, ability to transform results, the ability to bypass the retry schedule for certain non-timeout error responses, and the ability to handle non Error type promise rejections (e.g., SdkError from teams-js). This allowed me to fix the above bug while also greatly simplifying the waitForResult implementations in our host decorators.
Fixed many duplicate warnings being logged if the BackwardsCompatibilityHostDecorator polyfill was being used for getClientInfo
Fixed bug where isTesting in LiveShareClient would be false if using TestLiveShareHost.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We will stop making breaking changes to
minor
andpatch
versions for@microsoft/live-share
,@microsoft/live-share-media
, and@microsoft/live-share-canvas
on May 24th, 2023. Thanks for your patience as we prepare for this major release!LivePresence
LivePresence
Connections api enabling viewing PresenceState and data on a per connection basis.presence.toArray()
andpresence.forEach()
, in favor of a more standardpresence.getUsers()
API..update()
to be an async method. This will now throw an error if the local user does not have the required roles.LiveState
.set()
to be an async method. This will now throw an error if the local user does not have the required roles.LiveTimer
.start()
,play()
, etc. to be async methods. This will now throw an error if the local user does not have the required roles.LiveEvent
.send()
to be async. This will now throw an error if the local user does not have the required roles.MediaPlayerSynchronizer & LiveMediaSessionCoordinator
.play()
,pause()
, etc. to be async methods. This will now throw an error if the local user does not have the required roles.LiveShareRuntime
LiveDataObject
abstract class from which all Live Share DDS's now extendLiveShareRuntime
class which is injected into allLiveDataObject
instances when joining a container as a non-static reference.getLiveShareContainerSchemaProxy
API for injecting theLiveDataObject
withliveRuntime
into the static Fluid factories. Even though these factories & constructors are static, this is done in a way such that each Fluid container gets a separate proxy class for eachLiveDataObject
used. That allows you to have differentLiveShareRuntime
instances for each container, should you have multiple (useful for unit testing, for example).LiveShareClient.getTimestamp()
toLiveShareRuntime
, if usingLiveShareClient.getTimestamp()
in your app, please use the newtimestampProvider
which is returned when callingjoinContainer
onLiveShareClient
.LiveShareClient.verifyRolesAllowed()
toLiveShareRuntime
LiveShareClient.getClientRoles()
toLiveShareRuntime
LiveShareClient.setTimestampProvider()
toLiveShareRuntime
LiveShareClient.setRoleVerifier()
toLiveShareRuntime
LiveShareRuntime
AzureLiveShareHost
AzureLiveShareHost
class, which allows developers usingAzureClient
withoutLiveShareClient
to still useLiveDataObject
instances.LivePresence
andLiveCanvas
can still be used now thatdisplayName
is set by default. It usesIAzureAudience
to still securely getdisplayName
anduserId
from the AFR token.AzureTurboClient
to do this by default usinggetLiveShareContainerSchemaProxy
, mostly to give partners depending on this change an example they can reference.LiveObjectSynchronizer
LiveObjectSynchronizer
to be centralized without static properties, enabling pre-send validation of roles, removed the requirement to have bothLiveEventScope
andLiveObjectSynchronizer
, and significantly reduced the amount of "connect" events being sent. This significantly reduce the performance of our backend service.Other changes
AzureLiveShareHost
, I found out that the backwards-compat decorator would try toregisterClientId("fakeId")
even if we had a valid error (which is what we expect) forfakeId
. I improved that behavior so that valid rejections (ideal behavior for "fakeId") are promptly returned w/o extra requests.BackwardsCompatibilityHostDecorator
andLiveShareHostDecorator
that caused the polyfill to be used when it shouldn't.waitForResult
util more flexible for better type validation, ability to have valid undefined results, ability to transform results, the ability to bypass the retry schedule for certain non-timeout error responses, and the ability to handle nonError
type promise rejections (e.g.,SdkError
from teams-js). This allowed me to fix the above bug while also greatly simplifying thewaitForResult
implementations in our host decorators.BackwardsCompatibilityHostDecorator
polyfill was being used forgetClientInfo
isTesting
inLiveShareClient
would be false if usingTestLiveShareHost
.This discussion was created from the release v1.0.0-preview.15 release - includes breaking changes!!!.
Beta Was this translation helpful? Give feedback.
All reactions