review: comment and better type
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user