Default to dual peer connection for custom tab

This commit is contained in:
lukasIO 2025-11-20 15:50:27 +01:00
parent dc82cc23b9
commit ebaba5ad18
2 changed files with 10 additions and 3 deletions

View File

@ -21,6 +21,7 @@ export function VideoConferenceClientImpl(props: {
liveKitUrl: string;
token: string;
codec: VideoCodec | undefined;
singlePeerConnection: boolean | undefined;
}) {
const keyProvider = new ExternalE2EEKeyProvider();
const { worker, e2eePassphrase } = useSetupE2EE();
@ -43,7 +44,7 @@ export function VideoConferenceClientImpl(props: {
worker,
}
: undefined,
singlePeerConnection: true,
singlePeerConnection: props.singlePeerConnection,
};
}, [e2eeEnabled, props.codec, keyProvider, worker]);

View File

@ -7,9 +7,10 @@ export default async function CustomRoomConnection(props: {
liveKitUrl?: string;
token?: string;
codec?: string;
singlePC?: string;
}>;
}) {
const { liveKitUrl, token, codec } = await props.searchParams;
const { liveKitUrl, token, codec, singlePC } = await props.searchParams;
if (typeof liveKitUrl !== 'string') {
return <h2>Missing LiveKit URL</h2>;
}
@ -22,7 +23,12 @@ export default async function CustomRoomConnection(props: {
return (
<main data-lk-theme="default" style={{ height: '100%' }}>
<VideoConferenceClientImpl liveKitUrl={liveKitUrl} token={token} codec={codec} />
<VideoConferenceClientImpl
liveKitUrl={liveKitUrl}
token={token}
codec={codec}
singlePeerConnection={singlePC === 'true'}
/>
</main>
);
}