GitHub

Source

AudioTrack

The AudioTrack component is responsible for rendering participant audio tracks. This component must have access to the participant's context, or alternatively pass it a Participant as a property.

Import

import { AudioTrack } from "@livekit/components-react";

Usage

<ParticipantTile>
<AudioTrack trackRef={trackRef} />
</ParticipantTile>

Properties

muted?boolean

(Optional) Mutes the audio track if set to true.

onSubscriptionStatusChanged?(subscribed: boolean) => void

(Optional)

trackRef?TrackReference

(Optional) The track reference of the track from which the audio is to be rendered.

volume?number

(Optional) Sets the volume of the audio track. By default, the range is between 0.0 and 1.0.