Valora
API Reference@valora-ai/reactindexFunctions

DisconnectButton

function DisconnectButton(__namedParameters): Element;

Defined in: packages/react/src/components/controlbar/DisconnectButton.tsx:38

The DisconnectButton is a basic html button with the added ability to disconnect from a room. Normally this is the big red button that allows end users to leave the video or audio call.

Parameters

ParameterType
__namedParametersDisconnectButtonProps

Returns

Element

Example

// Basic — leave the current room.
<VoiceRoom agent={agent}>
  <DisconnectButton onLeave={() => room.disconnect()}>Leave room</DisconnectButton>
</VoiceRoom>

// Advanced — show connection state beside a leave action.
function LeaveControls() {
  return (
    <VoiceRoom agent={agent}>
      <ConnectionState />
      <DisconnectButton stopTracks>Leave room</DisconnectButton>
      <RoomAudioRenderer />
    </VoiceRoom>
  );
}

On this page

Valora is local-first

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

Star on GitHub