StartAudio
function StartAudio(__namedParameters): Element;Defined in: packages/react/src/components/controlbar/StartAudio.tsx:37
The StartAudio component is only visible when the browser blocks audio playback. This is due to some browser implemented autoplay policies. To start audio playback, the user must perform a user-initiated event such as clicking
Parameters
| Parameter | Type |
|---|---|
__namedParameters | StartAudioProps |
Returns
Element
Example
// Basic — let the user unlock blocked audio playback.
<VoiceRoom agent={agent}>
<StartAudio label="Click to allow audio playback" />
</VoiceRoom>
// Advanced — render the unlock affordance near room audio.
<VoiceRoom agent={agent}>
<div className="call-audio">
<RoomName />
<StartAudio label="Enable audio playback" />
</div>
<RoomAudioRenderer />
</VoiceRoom>