review: comment and better type

This commit is contained in:
Valere
2026-01-29 14:58:54 +01:00
parent ca7c8a2f11
commit a7bd2d3668
2 changed files with 4 additions and 2 deletions

View File

@@ -16,9 +16,9 @@ import {
import { observeParticipantEvents } from "@livekit/components-core"; import { observeParticipantEvents } from "@livekit/components-core";
import { import {
Status as RTCSessionStatus, Status as RTCSessionStatus,
type LivekitTransport,
type LivekitTransportConfig, type LivekitTransportConfig,
type MatrixRTCSession, type MatrixRTCSession,
type Transport,
} from "matrix-js-sdk/lib/matrixrtc"; } from "matrix-js-sdk/lib/matrixrtc";
import { import {
BehaviorSubject, BehaviorSubject,
@@ -739,7 +739,7 @@ export function enterRTCSession(
// For backwards compatibility with Element Call versions that do not do Matrix 2.0, // For backwards compatibility with Element Call versions that do not do Matrix 2.0,
// we add the livekit alias to the transport. // we add the livekit alias to the transport.
let backwardCompatibleTransport: Transport; let backwardCompatibleTransport: LivekitTransport | LivekitTransportConfig;
if (matrixRTCMode === MatrixRTCMode.Matrix_2_0) { if (matrixRTCMode === MatrixRTCMode.Matrix_2_0) {
backwardCompatibleTransport = transport; backwardCompatibleTransport = transport;
} else { } else {

View File

@@ -43,6 +43,8 @@ export class ConnectionManagerData {
} }
private getKey(transport: LivekitTransportConfig): string { private getKey(transport: LivekitTransportConfig): string {
// This is enough as a key because the ConnectionManager is already scoped by room.
// The ConnectionManager should also be scoped by slotId when we have multi-slot support.
return transport.livekit_service_url; return transport.livekit_service_url;
} }