Only remove livekit_alias in sticky events
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
|||||||
Status as RTCSessionStatus,
|
Status as RTCSessionStatus,
|
||||||
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,
|
||||||
@@ -735,11 +736,25 @@ export function enterRTCSession(
|
|||||||
const multiSFU =
|
const multiSFU =
|
||||||
matrixRTCMode === MatrixRTCMode.Compatibility ||
|
matrixRTCMode === MatrixRTCMode.Compatibility ||
|
||||||
matrixRTCMode === MatrixRTCMode.Matrix_2_0;
|
matrixRTCMode === MatrixRTCMode.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.
|
||||||
|
let backwardCompatibleTransport: Transport;
|
||||||
|
if (matrixRTCMode === MatrixRTCMode.Matrix_2_0) {
|
||||||
|
backwardCompatibleTransport = transport;
|
||||||
|
} else {
|
||||||
|
backwardCompatibleTransport = {
|
||||||
|
livekit_alias: rtcSession.room.roomId,
|
||||||
|
...transport,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Multi-sfu does not need a preferred foci list. just the focus that is actually used.
|
// Multi-sfu does not need a preferred foci list. just the focus that is actually used.
|
||||||
// TODO where/how do we track errors originating from the ongoing rtcSession?
|
// TODO where/how do we track errors originating from the ongoing rtcSession?
|
||||||
|
|
||||||
rtcSession.joinRTCSession(
|
rtcSession.joinRTCSession(
|
||||||
ownMembershipIdentity,
|
ownMembershipIdentity,
|
||||||
multiSFU ? [] : [transport],
|
multiSFU ? [] : [backwardCompatibleTransport],
|
||||||
multiSFU ? transport : undefined,
|
multiSFU ? transport : undefined,
|
||||||
{
|
{
|
||||||
notificationType,
|
notificationType,
|
||||||
|
|||||||
Reference in New Issue
Block a user