RoomAudioRenderer
function RoomAudioRenderer(_props): null;Defined in: packages/react/src/components/room/RoomAudioRenderer.tsx:38
The local agent owns its own audio player, so this renders nothing — its job is
to resume the Web Audio context on the first user gesture (autoplay policy).
Mount it once near the root of an <VoiceRoom>.
Parameters
| Parameter | Type |
|---|---|
_props | RoomAudioRendererProps |
Returns
null
Example
// Basic — mount audio rendering once in the room.
<VoiceRoom agent={agent}>
<RoomAudioRenderer />
</VoiceRoom>
// Advanced — pair room audio with a participant gallery.
function CallRoom() {
const tracks = useTracks([{ source: Track.Source.Camera, withPlaceholder: true }]);
return (
<VoiceRoom agent={agent}>
<GridLayout tracks={tracks}><ParticipantTile /></GridLayout>
<RoomAudioRenderer muted={isMuted} volume={0.8} />
</VoiceRoom>
);
}