Skip to content

Conversation

toger5
Copy link
Contributor

@toger5 toger5 commented Sep 30, 2025

What changed

  • New event type:
    • Add m.rtc.member event type.
    • Add tests covering m.rtc.member.
  • CallMembership:
    • CallMembership can now be constructed from m.rtc.member and exposes the same API shape as m.call.member to the RTC session.
    • Move “oldest member” selection logic into CallMembership (was previously in the membership manager). This removes unnecessary coupling: the RTCSession passes the context required by CallMembership directly.
  • Membership manager (RTC session):
    • Add useRtcMemberFormat to control sending m.rtc.member instead of m.call.member.
      • Note: this may be merged with useStickyEvent in a follow-up when we consolidate the rollout.
  • Naming cleanups:
    • Rename “focus” to “transport”.
    • Rename “session” to “slot”.
  • Active (in use) transport resolution:
    • Remove getFocusInUse.
    • Rename MatrixRTCSession.getActiveFocusMatrixRTCSession.resolveActiveFocus.
    • Use the new CallMembership API to compute the active transport (BREAKING).
  • Joining a session:
    • Change the second argument from activeFocus: Focus to multi_sfu_focus: Transport.
    • Passing a defined multi_sfu_focus implies multi-SFU mode; undefined falls back to the oldest-membership selection.

Breaking changes

  • MatrixRTCSession:
    • Remove getFocusInUse().
    • Rename getActiveFocus() to resolveActiveFocus().
  • Join API:
    • Old: join(sessionId, activeFocus: Focus)
    • New: join(sessionId, multi_sfu_focus?: Transport)
      • Defined multi_sfu_focus → use multi-SFU with the provided transport.
      • undefined → legacy behavior using the oldest membership.

Todos for consumers updating the PR (currently only known: Element Call):

  • Replace calls to getActiveFocus() with resolveActiveFocus().
  • Remove any usage of getFocusInUse().
  • Update callers of join(...) to pass multi_sfu_focus only when opting into multi-SFU.

Backward compatibility and rollout

  • Reading: CallMembership can handle both m.call.member and m.rtc.member, so existing rooms continue to work.
  • Emitting: gated by useRtcMemberFormat:
    • false (default): continue to emit m.call.member.
    • true: emit m.rtc.member.
  • Multi-SFU usage is opt-in via the new join(sessionId, multi_sfu_focus?: Transport) signature.

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

@toger5 toger5 changed the title Voip team/multi sfu [MatrixRTC] multi SFU support + m.rtc.member event support Sep 30, 2025
@toger5 toger5 changed the title [MatrixRTC] multi SFU support + m.rtc.member event support [MatrixRTC] multi SFU support + m.rtc.member event type support Sep 30, 2025
@toger5 toger5 added the T-Feature Request to add a new feature which does not exist right now label Sep 30, 2025
 - rename Focus -> Transport
 - add RtcMembershipData (next to `sessionMembershipData`)
 - make `new CallMembership` initializable with both
 - move oldest member calculation into CallMembership

Signed-off-by: Timo K <[email protected]>
@toger5 toger5 added T-Enhancement and removed T-Feature Request to add a new feature which does not exist right now labels Sep 30, 2025
Signed-off-by: Timo K <[email protected]>
Signed-off-by: Timo K <[email protected]>
Copy link
Member

@robintown robintown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks like a good first shippable iteration!

Signed-off-by: Timo K <[email protected]>
@robintown robintown dismissed Half-Shot’s stale review October 8, 2025 17:35

Both Timo and I have given our takes on all outstanding comments and I agree that they've been properly addressed.

toger5 and others added 2 commits October 8, 2025 19:43
@toger5 toger5 enabled auto-merge October 8, 2025 17:46
@toger5 toger5 added this pull request to the merge queue Oct 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 8, 2025
@toger5 toger5 added this pull request to the merge queue Oct 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 8, 2025
Signed-off-by: Timo K <[email protected]>
@toger5 toger5 added this pull request to the merge queue Oct 8, 2025
Merged via the queue into develop with commit fd949fe Oct 8, 2025
32 checks passed
@toger5 toger5 deleted the voip-team/multi-SFU branch October 8, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants