DailyAudioTrack

<DailyAudioTrack sessionId={sessionId} />

The DailyAudioTrack sets up an <audio> tag for a specific audio track, identified by a sessionId and type. Use this component to compose a custom audio arrangement in a Daily call.

Props

ParameterRequiredTypeDescription
sessionIdstringThe participant's session_id for which the audio track should be played.
onPlayFailedFunctionCallback when an <audio> tag fails to play().
type'audio' | 'screenAudio'The participant's track type to play. Defaults to 'audio'

Data attributes

DailyAudioTrack renders a couple of dynamic data attributes:

AttributeDescription
data-session-idContains the corresponding sessionId
data-audio-typeContains the corresponding type

Sample code

Related references