import { videoCodecs } from 'livekit-client'; import { VideoConferenceClientImpl } from './VideoConferenceClientImpl'; import { isVideoCodec } from '@/lib/types'; export default function CustomRoomConnection(props: { searchParams: { liveKitUrl?: string; token?: string; codec?: string; }; }) { const { liveKitUrl, token, codec } = props.searchParams; if (typeof liveKitUrl !== 'string') { return

Missing LiveKit URL

; } if (typeof token !== 'string') { return

Missing LiveKit token

; } if (codec !== undefined && !isVideoCodec(codec)) { return

Invalid codec, if defined it has to be [{videoCodecs.join(', ')}].

; } return (
); }