Valora
API Reference@valora-ai/reactindexFunctions

PreJoin

function PreJoin(__namedParameters): Element;

Defined in: packages/react/src/components/PreJoin.tsx:72

The PreJoin prefab component is normally presented to the user before he enters a room. This component allows the user to check and select the preferred media device (camera and microphone). On submit the user decisions

Parameters

ParameterType
__namedParametersPreJoinProps

Returns

Element

Example

// Basic — show the default pre-join form.
<PreJoin />

// Advanced — validate choices before connecting to the room.
function JoinFlow() {
  const [choices, setChoices] = React.useState<LocalUserChoices>();

  return choices ? (
    <VoiceRoom agent={agent}>
  ) : (
    <PreJoin
      defaults={savedChoices}
      onValidate={validateChoices}
      onSubmit={setChoices}
      onError={setJoinError}
    />
  );
}

On this page

Valora is local-first

No API key, no server — everything in this doc runs on-device.

Star on GitHub