live-share-sdk icon indicating copy to clipboard operation
live-share-sdk copied to clipboard

[Feature Request]: Support limiting LivePresence to specific roles

Open eoinobrien opened this issue 2 years ago • 2 comments

Please review FAQ and Known issues before filing a new item!

  • [x] I have reviewed the FAQ and known issues and did not find my topic

Please note: any submissions with insufficient reproducible information will be marked as 'Waiting for customer input' and may be closed is there is no response

Describe your user scenario It would be great if EphemeralPresence could support limiting events to specific roles, like other Ephemeral data structures.

One sceanrio I am using is using EphemeralPresence not for Presence, but for the ability to limit the data object to a single object per user. Specifically, I am sharing the user's cursor location to all the clients so that I can render the location across the board. In a 100 person meeting I don't need every viewer's cusor location, just those who are organisers or presenters.

Describe the solution you'd like EphemeralPresence to support limiting events to specific roles. I think it woul also be great to align the start() or initialize() functions across the data structures.

Describe alternatives you've considered Using the getRoles API to filter on the recievers side. But this seems like a lot of wasted effort and AFR data transfers for something that is immediately dumped

Additional context

eoinobrien avatar Aug 17 '22 15:08 eoinobrien

@Stevenic this actually would have been a more efficient way to use presence in the way I was using it for to determine eligible presenters. By doing this, developers could effectively track users by role type without calling getRoles for each user (e.g., separate eligiblePresentersPresence and attendeesPresence).

Eoin's scenario of using presence for cursors is in line with what competitors are doing, as well.

ryanbliss avatar Aug 17 '22 16:08 ryanbliss

It seems like it would be just as easy to use LiveState to share cursor positions... I personally feel like this overly complicates LivePresence. If you couldn't just use a different DDS I'd be more inclined to support adding this feature.

Stevenic avatar Oct 18 '22 18:10 Stevenic

This is now supported as of #562

ryanbliss avatar May 15 '23 16:05 ryanbliss