Skip to content
Sign in
VoiceVoice full screenMenu

Voice full screenPro

Full screen voice mode: the orb on the stage with rolling captions, a self view, screen sharing that moves the screen to the stage, and mute, camera, share, captions and End in one bar. Connecting, reconnecting, a dropped call and the ended summary each have their own stage.

ProA scripted call to a claims line with the self view on. Share the form, mute with M, toggle captions with C, tap the orb to cut in.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/voice-fullscreen

Usage

tsx
import { VoiceFullscreen } from "@/components/ui/chatcn/pro/voice-fullscreen"

<VoiceFullscreen
  position="fixed"
  state={call.state}
  segments={call.segments}
  inputLevel={mic.getLevel}
  outputLevel={agent.getLevel}
  startedAt={call.startedAt}
  agentName="Claims desk"
  cameraMedia={cameraStream}
  screenMedia={screenStream}
  onCameraChange={toggleCamera}
  onScreenShareChange={toggleShare}
  onEnd={call.end}
  onClose={() => setFullscreen(false)}
/>

Plain props in, events out: wire it to any realtime provider, or to useChatcnVoiceMock for demos. cameraMedia and screenMedia take a MediaStream or any node. The orb is a slot: pass any orb with the voice orb's props through orb, the particle orb by default. contained fills its parent; fixed covers the viewport as a modal dialog.

Examples

Sharing a screen

ProThe shared claim form takes the stage; the orb moves beside the captions.

Every state

ProConnecting, interim captions, muted, a blocked camera, reconnecting, a dropped call and ended.

Props

PropTypeNotes
state"idle" | "connecting" | "listening" | "thinking" | "speaking" | "interrupted" | "muted" | "reconnecting" | "error" | "ended"The orb's states plus the connection's
segmentsTranscriptSegment[]Feeds the captions. Interim words show in gray
inputLevel, outputLevelnumber | () => numberThe user's and the agent's levels
startedAt, endedAtnumberEpoch ms for the timer and the ended summary
agentName, agentDetail, userLabelstring, ReactNodeHeader and caption labels
orbComponentTypeAny orb with the voice orb's props. Default ParticleOrb
muted, captions, camera, screenSharebooleanEach controlled, with default* and on*Change
cameraMedia, screenMediaMediaStream | ReactNodeWhat the self view and the shared screen show
cameraStatus, cameraMessage"ready" | "starting" | "blocked"A spinner, or the fix, in the self view
onEnd, onStart, onReconnect, onInterrupt, onClose() => voidTap the orb to interrupt; onClose adds minimize and Escape
errorMessageReactNodeShown when the call drops. Say how to fix it
controlsobjectDevice menus and mic errors, passed to VoiceControls
position"contained" | "fixed"Default contained

Keyboard

KeyAction
MMute or unmute, unless typing
CCaptions on or off
EscapeLeave full screen, when onClose is set
TabThrough the header, the orb while it can be interrupted, then the bar

Accessibility

  • A region named by the agent, or a modal dialog with position="fixed".
  • State changes are announced in a polite live region; the ticking timer is not. Finished agent lines are announced once, never word by word.
  • Every control in the bar is a labeled toggle with aria-pressed. The dropped call message is an alert with the fix and a Reconnect button.

Motion

  • The self view and the shared screen enter with a 180 to 220 ms fade and a 4 px drop; under reduced motion they appear.
  • Captions keep a fixed height and fade older lines at the top edge, so speech never pushes the layout.