Make E2EEConfig required
Previously it could be either undefined or type None which meant the same thing: no need to have both, just make it required. This also means we can move the line to set e2ee enabled into a more sensible place rather than in the ActiveCall de-nulling wrapper.
This commit is contained in:
@@ -95,7 +95,7 @@ const POST_FOCUS_PARTICIPANT_UPDATE_DELAY_MS = 3000;
|
||||
|
||||
export interface ActiveCallProps
|
||||
extends Omit<InCallViewProps, "livekitRoom" | "connState"> {
|
||||
e2eeConfig?: E2EEConfig;
|
||||
e2eeConfig: E2EEConfig;
|
||||
}
|
||||
|
||||
export const ActiveCall: FC<ActiveCallProps> = (props) => {
|
||||
@@ -111,10 +111,6 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (props.e2eeConfig && !livekitRoom.isE2EEEnabled) {
|
||||
livekitRoom.setE2EEEnabled(!!props.e2eeConfig);
|
||||
}
|
||||
|
||||
return (
|
||||
<RoomContext.Provider value={livekitRoom}>
|
||||
<InCallView {...props} livekitRoom={livekitRoom} connState={connState} />
|
||||
|
||||
Reference in New Issue
Block a user