-
-
Notifications
You must be signed in to change notification settings - Fork 648
[MatrixRTC] Implement MSC4143 slots #5056
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
base: develop
Are you sure you want to change the base?
Conversation
| case MembershipKind.RTC: | ||
| return data.rtc_transports[0]; | ||
| case "session": | ||
| switch (data.focus_active.focus_selection) { | ||
| case "multi_sfu": | ||
| return data.foci_preferred[0]; | ||
| case "oldest_membership": | ||
| if (CallMembership.equal(this, oldestMembership)) return data.foci_preferred[0]; | ||
| if (oldestMembership !== undefined) return oldestMembership.getTransport(oldestMembership); | ||
| break; | ||
| case MembershipKind.Session: | ||
| if (data.focus_active.focus_selection === "oldest_membership") { | ||
| // For legacy events we only support "oldest_membership" | ||
| if (CallMembership.equal(this, oldestMembership)) return data.foci_preferred[0]; | ||
| if (oldestMembership !== undefined) return oldestMembership.getTransport(oldestMembership); | ||
| } | ||
| break; | ||
| } | ||
| return undefined; | ||
| } |
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.
In general the changes to the call membership are much more straight forward than what I anticipated. this seems to be the main functional change.
Is there anything else in the code that gets more complicated because of this?
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.
Not really, I only removed things which didn't break other files or ECall / EWeb. I think the conflicts with the other PRs may be high.
| const content = e.getContent<RtcMembershipData>(); | ||
| // Ensure the slot ID of the membership matches the state | ||
| if (content.slot_id !== slotId) { | ||
| console.log("Invalid slot ID", content.slot_id, slotId); | ||
| return false; | ||
| } | ||
| if (content.application.type !== slotDescription.application) { | ||
| console.log("Invalid application.type", content.application.type, slotDescription.application); | ||
| return false; | ||
| } | ||
| return true; |
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.
Is this all covered by:
if (!deepCompare(membership.slotDescription, slotDescription))
which is done later?
Checklist
public/exportedsymbols have accurate TSDoc documentation.