Usage
Features
- Toggle the capture of a client's media input (microphone, camera, screen share)
- Select from five sizes:
icon,sm,md,lg, andxl - Select from three styles:
default,outline, andlivekit - Renders an audio visualizer when an audio track is provided
- Displays a select dropdown when multiple input devices are available
Installation
pnpm dlx shadcn@latest add @agents-ui/agent-track-control
Props
| Prop name | Type | Default |
|---|---|---|
kind | enum | – |
source | enum | – |
pressed? | boolean | – |
pending? | boolean | – |
disabled? | boolean | – |
className? | string | – |
audioTrack? | TrackReferenceOrPlaceholder | – |
onPressedChange? | function | – |
onMediaDeviceError? | function | – |
onActiveDeviceChange? | function | – |