-
-
Notifications
You must be signed in to change notification settings - Fork 595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the js-sdk compatible with MSC preferred foci and active focus. #4195
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'm a bit lost here. This looks like way more than a refactor, this looks like a fundamental format change and trying to be backwards comapt. The description seems to suggest the only change is adding foci_preferred
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial review
47e34ed
to
3f04658
Compare
52ee79d
to
1e6ddb7
Compare
e5a0948
to
4aea723
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some optional requests, but this looks good overall!
8b3d6aa
to
8e564f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's a typo in the PR description where you've said foci_active []
where you mean focus_active
? This makes it quite a confusing read. ;)
Other than that, I think it looks plausible, although having all this to support both systems at once is heart rending. This might be more an MSC comment but what's the reason for needing to change foci_active to focus_active rather than leave it as an array?
oh, also - I still vote to fix the title: 'refactor' to me means, "cleaner code with same functionality" which this isn't. In fact, documenting the reasons for changing in general would be a good thing. |
@dbkr I updated the description and the title. Thanks.
An array forces us to specify how to deal with active elements of different types. This is either very complicated and/or has to be done on a per focus type bases. (It is not clear what use-cases this will have an how it will be used/ how we define how to interpret an array of active_foci. It could be to transition between infrastructure types or to have redundancy. In both cases all participants need to sync and map streams in both systems -> we need to expose this somehow outside the infrastructure itself... This all becomes more complicated than what we want matrixRTC to be.)
in this case it was easy enough and we are able to merge this into the js sdk without making breaking everything. This way we can merge this and work on the reliable memberships with one aspect less to worry about since the js sdk will work with both formats. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
The call.member events are refactored in a backwards compatible way to not only have one array:
foci_active: Focus[]
but instead one array:foci_preferred: Focus[]
and a single:
focus_active: Focus
Foci active should just be one field describing what you are currently using. In a fully cascading world this is your own foci. In the livekit scenario this describes how you connect to the correct livekit session. (using the oldest session member should be the default, but if someone is using sth else everyone should connect to the other livekit session as well. Not yet implemented)
foci_preferred
is whatfoci_active
has been. The list of possible foci this user knows about or can use.fixes element-hq/element-call#1737
Signed-off-by: Timo K [email protected]
Checklist
public
/exported
symbols have accurate TSDoc documentation.