Skip to content

MSC4195: LiveKit transport for MatrixRTC - #4195

Open
hughns wants to merge 121 commits into
matrix-org:mainfrom
hughns:hughns/matrixrtc-livekit
Open

MSC4195: LiveKit transport for MatrixRTC#4195
hughns wants to merge 121 commits into
matrix-org:mainfrom
hughns:hughns/matrixrtc-livekit

Conversation

@hughns

@hughns hughns commented Sep 16, 2024

Copy link
Copy Markdown
Member

Rendered


SCT Stuff:

FCP tickyboxes

MSC checklist


Server

Note

For backwards compatibility, the endpoint also returns livekit_service_url. The stems from a previous iteration of the proposal and has been fully replaced by url in the current text.

Note

For backwards compatibility with implementations of previous versions of this MSC, https://github.com/element-hq/lk-jwt-service exhibits the following differences with respect to the proposal text:

  • The legacy endpoints /sfu/get, /get_token and /delegate_delayed_leave are still included. These have been replaced by proper Client-Server and Server-Server endpoints in the proposal which are also implemented in https://github.com/element-hq/lk-jwt-service.
  • The device ID is still included in the LiveKit participant identity derivation. On requests, the ID is supplied as claimed_device_id wrapped together with the member ID in a member object. The proposal has eliminated claimed_device_id and replaced the member object with member_id.
  • The delay_timeout request parameter is still included in the /delegate_delayed_leave endpoint. This parameter has been removed from the proposal because it can be inferred from the delayed event ID.
  • Extended tokens do not contain the grant to create LiveKit rooms. Instead the service creates rooms itself (using its own token). This is because client implementations are not yet updated to perform the room creation themselves.

Furthermore, https://github.com/element-hq/lk-jwt-service doesn't currently implement kicking participants from the SFU on room leaves.

Client

Note

Similar to what's mentioned above, the client implementations also still support the legacy livekit_service_url property in transports objects in membership events.

@hughns hughns changed the title MatrixRTC using LiveKit backend MSC4195: MatrixRTC using LiveKit backend Sep 16, 2024
@turt2live turt2live added A-VOIP Any VoIP or MatrixRTC related proposals proposal A matrix spec change proposal. Process state. A-Client Server Client-Server API kind:core MSC which is critical to the protocol's success needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Sep 25, 2024
@hughns
hughns force-pushed the hughns/matrixrtc-livekit branch from 054a23c to 6072744 Compare December 17, 2024 07:22
Comment thread proposals/4195-matrixrtc-livekit.md
Comment thread proposals/4195-matrixrtc-livekit.md Outdated
@ara4n ara4n added the matrix-2.0 Required for Matrix 2.0 (note: do not rename - used in reports/links) label Sep 5, 2025
@github-project-automation github-project-automation Bot moved this to Tracking for review in Spec Core Team Workflow Sep 5, 2025
@fkwp fkwp changed the title MSC4195: MatrixRTC using LiveKit backend MSC4195: MatrixRTC Transport using LiveKit Backend Oct 14, 2025
@fkwp
fkwp marked this pull request as ready for review October 14, 2025 13:16
@Johennes
Johennes requested a review from turt2live September 2, 2026 15:59
Comment thread proposals/4195-matrixrtc-livekit.md Outdated
Comment thread proposals/4195-matrixrtc-livekit.md Outdated
Comment thread proposals/4195-matrixrtc-livekit.md Outdated

@turt2live turt2live left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall this looks good to me at a high level. I haven't reviewed the LiveKit components in exhaustive detail - I'm more focusing on checklist/process requirements.

Comment thread proposals/4195-matrixrtc-livekit.md Outdated
Comment thread proposals/4195-matrixrtc-livekit.md Outdated
Comment thread proposals/4195-matrixrtc-livekit.md Outdated
Comment thread proposals/4195-matrixrtc-livekit.md Outdated
Comment thread proposals/4195-matrixrtc-livekit.md Outdated
Comment thread proposals/4195-matrixrtc-livekit.md Outdated
@turt2live

Copy link
Copy Markdown
Member

MSCs proposed for Final Comment Period (FCP) should meet the requirements outlined in the checklist prior to being accepted into the spec. This checklist is a bit long, but aims to reduce the number of follow-on MSCs after a feature lands.

SCT members: please check off things you check for, and raise a concern against FCP if the checklist is incomplete. If an item doesn't apply, prefer to check it rather than remove it. Unchecking items is encouraged where applicable.

MSC authors: feel free to ask in a thread on your MSC or in the#matrix-spec:matrix.org room for clarification of any of these points.

  • Are appropriate implementation(s) specified in the MSC’s PR description?
  • Are all MSCs that this MSC depends on already accepted?
  • For each new endpoint that is introduced:
    • Have authentication requirements been specified?
    • Have rate-limiting requirements been specified?
    • Have guest access requirements been specified?
    • Are error responses specified?
      • Does each error case have a specified errcode (e.g. M_FORBIDDEN) and HTTP status code?
        • If a new errcode is introduced, is it clear that it is new?
  • Will the MSC require a new room version, and if so, has that been made clear?
    • Is the reason for a new room version clearly stated? For example, modifying the set of redacted fields changes how event IDs are calculated, thus requiring a new room version.
  • Are backwards-compatibility concerns appropriately addressed?
  • Are the endpoint conventions honoured?
    • Do HTTP endpoints use_underscores_like_this?
    • Will the endpoint return unbounded data? If so, has pagination been considered?
    • If the endpoint utilises pagination, is it consistent with the appendices?
  • An introduction exists and clearly outlines the problem being solved. Ideally, the first paragraph should be understandable by a non-technical audience.
  • All outstanding threads are resolved
    • All feedback is incorporated into the proposal text itself, either as a fix or noted as an alternative
  • While the exact sections do not need to be present, the details implied by the proposal template are covered. Namely:
    • Introduction
    • Proposal text
    • Potential issues
    • Alternatives
    • Dependencies
  • Stable identifiers are used throughout the proposal, except for the unstable prefix section
    • Unstable prefixes consider the awkward accepted-but-not-merged state
    • Chosen unstable prefixes do not pollute any global namespace (use “org.matrix.mscXXXX”, not “org.matrix”).
  • Changes have applicable Sign Off from all authors/editors/contributors
  • There is a dedicated "Security Considerations" section which detail any possible attacks/vulnerabilities this proposal may introduce, even if this is "None.". See RFC3552 for things to think about, but in particular pay attention to the OWASP Top Ten.

@turt2live

Copy link
Copy Markdown
Member

@mscbot fcp merge
@mscbot concern Dependency - MatrixRTC (concurrent FCP permitted)
@mscbot concern Editorial - Links to branch names are prone to breaking
@mscbot concern Checklist - Authentication, rate-limiting, and guest accessibility requirements need clarifying on endpoints
@mscbot concern Transport explicitly needs to be optional (add MAY), but endpoints MUST be implemented with transport support

@mscbot

mscbot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Team member @mscbot has proposed to merge this. The next step is review by the rest of the tagged people:

Concerns:

  • Dependency - MatrixRTC (concurrent FCP permitted)
  • Editorial - Links to branch names are prone to breaking
  • Checklist - Authentication, rate-limiting, and guest accessibility requirements need clarifying on endpoints
  • Transport explicitly needs to be optional (add MAY), but endpoints MUST be implemented with transport support

Once at least 75% of reviewers approve (and there are no outstanding concerns), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for information about what commands tagged team members can give me.

@mscbot mscbot added proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the FCP. Process state. disposition-merge Process state. unresolved-concerns This proposal has at least one outstanding concern. Process state. labels Sep 8, 2026
@turt2live turt2live removed the blocked Something needs to be done before action can be taken on this PR/issue. label Sep 8, 2026
@turt2live turt2live moved this from Proposed for FCP readiness to Ready for FCP ticks in Spec Core Team Workflow Sep 8, 2026
@turt2live turt2live added the 00-weekly-pings Tracking for weekly pings in the SCT office. 00 to make it first in the labels list. label Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00-weekly-pings Tracking for weekly pings in the SCT office. 00 to make it first in the labels list. A-Client Server Client-Server API A-VOIP Any VoIP or MatrixRTC related proposals disposition-merge Process state. kind:core MSC which is critical to the protocol's success matrix-2.0 Required for Matrix 2.0 (note: do not rename - used in reports/links) proposal A matrix spec change proposal. Process state. proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the FCP. Process state. unresolved-concerns This proposal has at least one outstanding concern. Process state.

Projects

Status: Ready for FCP ticks

Development

Successfully merging this pull request may close these issues.