Default to dual peer connection for custom tab (#496)

This commit is contained in:
lukasIO 2025-11-20 15:55:51 +01:00 committed by GitHub
parent dc82cc23b9
commit baa4e787a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View File

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

View File

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