ParticipantAudioTile
function ParticipantAudioTile(__namedParameters): Element;Defined in: packages/react/src/components/participant/ParticipantAudioTile.tsx:54
The ParticipantAudioTile component is the base utility wrapper for displaying a visual representation of a participant. This component can be used as a child of the TileLoop or independently if a participant is passed as a
Parameters
| Parameter | Type |
|---|---|
__namedParameters | ParticipantAudioTileProps |
Returns
Element
Example
// Basic — render the participant audio tile from context.
<ParticipantAudioTile name="Ava Chen" />
// Advanced — render one audio tile per participant and handle clicks.
function AudioParticipants() {
const participants = useParticipants();
return (
<VoiceRoom agent={agent}>
<ParticipantLoop participants={participants}>
<ParticipantAudioTile onParticipantClick={handleParticipantClick} />
</ParticipantLoop>
</VoiceRoom>
);
}