enable encryption in per sender case
Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
@@ -344,6 +344,7 @@ export const GroupCallView: FC<Props> = ({
|
|||||||
window.setTimeout(resolve, 10);
|
window.setTimeout(resolve, 10);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TODO-MULTI-SFU find a solution if this is supposed to happen here or in the view model.
|
||||||
leaveRTCSession(
|
leaveRTCSession(
|
||||||
rtcSession,
|
rtcSession,
|
||||||
cause,
|
cause,
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { observeParticipantEvents } from "@livekit/components-core";
|
|||||||
import {
|
import {
|
||||||
ConnectionState,
|
ConnectionState,
|
||||||
type BaseKeyProvider,
|
type BaseKeyProvider,
|
||||||
|
type E2EEOptions,
|
||||||
ExternalE2EEKeyProvider,
|
ExternalE2EEKeyProvider,
|
||||||
type Room as LivekitRoom,
|
type Room as LivekitRoom,
|
||||||
type LocalParticipant,
|
type LocalParticipant,
|
||||||
@@ -437,6 +438,13 @@ export class CallViewModel extends ViewModel {
|
|||||||
this.options.encryptionSystem,
|
this.options.encryptionSystem,
|
||||||
this.matrixRTCSession,
|
this.matrixRTCSession,
|
||||||
);
|
);
|
||||||
|
private readonly e2eeLivekitOptions = (): E2EEOptions | undefined =>
|
||||||
|
this.livekitE2EEKeyProvider
|
||||||
|
? {
|
||||||
|
keyProvider: this.livekitE2EEKeyProvider,
|
||||||
|
worker: new E2EEWorker(),
|
||||||
|
}
|
||||||
|
: undefined;
|
||||||
|
|
||||||
private readonly localFocus = makeFocus(this.matrixRTCSession);
|
private readonly localFocus = makeFocus(this.matrixRTCSession);
|
||||||
|
|
||||||
@@ -450,12 +458,7 @@ export class CallViewModel extends ViewModel {
|
|||||||
this.membershipsAndFocusMap$,
|
this.membershipsAndFocusMap$,
|
||||||
this.mediaDevices,
|
this.mediaDevices,
|
||||||
this.muteStates,
|
this.muteStates,
|
||||||
this.livekitE2EEKeyProvider
|
this.e2eeLivekitOptions(),
|
||||||
? {
|
|
||||||
keyProvider: this.livekitE2EEKeyProvider,
|
|
||||||
worker: new E2EEWorker(),
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -511,12 +514,7 @@ export class CallViewModel extends ViewModel {
|
|||||||
this.matrixRTCSession.room.client,
|
this.matrixRTCSession.room.client,
|
||||||
this.scope,
|
this.scope,
|
||||||
this.membershipsAndFocusMap$,
|
this.membershipsAndFocusMap$,
|
||||||
this.livekitE2EEKeyProvider
|
this.e2eeLivekitOptions(),
|
||||||
? {
|
|
||||||
keyProvider: this.livekitE2EEKeyProvider,
|
|
||||||
worker: new E2EEWorker(),
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
logger.log(
|
logger.log(
|
||||||
@@ -1813,20 +1811,24 @@ export class CallViewModel extends ViewModel {
|
|||||||
void enterRTCSession(
|
void enterRTCSession(
|
||||||
this.matrixRTCSession,
|
this.matrixRTCSession,
|
||||||
localFocus,
|
localFocus,
|
||||||
this.options.encryptionSystem.kind !== E2eeType.PER_PARTICIPANT,
|
this.options.encryptionSystem.kind !== E2eeType.NONE,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.join$.pipe(this.scope.bind()).subscribe(() => {
|
this.join$.pipe(this.scope.bind()).subscribe(() => {
|
||||||
leaveRTCSession(
|
// TODO-MULTI-SFU: this makes no sense what so ever!!!
|
||||||
this.matrixRTCSession,
|
// need to look into this again.
|
||||||
"user", // TODO-MULTI-SFU ?
|
// leaveRTCSession(
|
||||||
// Wait for the sound in widget mode (it's not long)
|
// this.matrixRTCSession,
|
||||||
Promise.resolve(), // TODO-MULTI-SFU
|
// "user", // TODO-MULTI-SFU ?
|
||||||
//Promise.all([audioPromise, posthogRequest]),
|
// // Wait for the sound in widget mode (it's not long)
|
||||||
).catch((e) => {
|
// Promise.resolve(), // TODO-MULTI-SFU
|
||||||
logger.error("Error leaving RTC session", e);
|
// //Promise.all([audioPromise, posthogRequest]),
|
||||||
});
|
// ).catch((e) => {
|
||||||
|
// logger.error("Error leaving RTC session", e);
|
||||||
|
// });
|
||||||
});
|
});
|
||||||
|
|
||||||
// Pause upstream of all local media tracks when we're disconnected from
|
// Pause upstream of all local media tracks when we're disconnected from
|
||||||
|
|||||||
Reference in New Issue
Block a user