microsoft / live-share-sdk

A framework for building collaborative Microsoft Teams and M365 experiences.
Other
94 stars 29 forks source link

[Bug]: Suspensions do not work when `canSendPositionUpdates` is false for `LiveMediaSessionCoordinator` #736

Closed ryanbliss closed 7 months ago

ryanbliss commented 7 months ago

Describe the bug

When activating a suspension in LiveMediaSessionCoordinator while canSendPositionUpdates is set to false, the createPositionUpdateEvent function in GroupCoordinatorState cannot update the local user's state to suspended. Thus, it will snap them to the group state still.

To Reproduce

Not sure if createPositionUpdateEvent is actually source of problem, but I did confirm that wasn't happening when it normally would, so I suspect it is related.

This branch of this sample repo makes it easy to test: https://github.com/ryanbliss/live-share-react-media-template/tree/ryanbliss/large-meeting-optimized. To force canSendPositionUpdates to false, set ?isShareInitiator=false in the URL before the #{containerId}, and ensure that client is not in control.

Expected behavior