Merge remote-tracking branch 'origin/voip-team/rebased-multiSFU' into toger5/sticky-events-version

This commit is contained in:
Will Hunt
2025-10-15 15:27:34 +01:00
39 changed files with 902 additions and 666 deletions

View File

@@ -98,13 +98,37 @@ export async function makeTransport(
return transport;
}
export interface EnterRTCSessionOptions {
encryptMedia: boolean;
// TODO: remove this flag, the new membership manager is stable enough
useNewMembershipManager?: boolean;
// TODO: remove this flag, to-device transport is stable enough now
useExperimentalToDeviceTransport?: boolean;
/** EXPERIMENTAL: If true, will use the multi-sfu codepath where each member connects to its SFU instead of everyone connecting to an elected on. */
useMultiSfu?: boolean;
}
/**
* TODO! document this function properly
* @param rtcSession
* @param transport
* @param options
*/
export async function enterRTCSession(
rtcSession: MatrixRTCSession,
transport: LivekitTransport,
encryptMedia: boolean,
useExperimentalToDeviceTransport = false,
useMultiSfu = true,
options: EnterRTCSessionOptions = {
encryptMedia: true,
useExperimentalToDeviceTransport: false,
useMultiSfu: true,
},
): Promise<void> {
const {
encryptMedia,
useExperimentalToDeviceTransport = false,
useMultiSfu = true,
} = options;
PosthogAnalytics.instance.eventCallEnded.cacheStartCall(new Date());
PosthogAnalytics.instance.eventCallStarted.track(rtcSession.room.roomId);