LiveKit docs › Hooks › useAudioPlayback

---

# useAudioPlayback

> ℹ️ **Note**
> 
> This feature is experimental and may change or be removed based on developer feedback and real-world usage.

In many browsers to start audio playback, the user must perform a user-initiated event such as clicking a button. The `useAudioPlayback` hook returns an object with a boolean `canPlayAudio` flag that indicates whether audio playback is allowed in the current context, as well as a `startAudio` function that can be called in a button `onClick` callback to start audio playback in the current context.

## Import

```typescript
import { useAudioPlayback } from "@livekit/components-react";

```

## Properties

- **`room`** _(Room)_ (optional): 

## Returns

```typescript
{
  canPlayAudio: boolean;
  startAudio: () => Promise<void>;
}

```

---

This document was rendered at 2026-06-07T11:33:14.526Z.
For the latest version of this document, see [https://docs.livekit.io/reference/components/react/hook/useaudioplayback.md](https://docs.livekit.io/reference/components/react/hook/useaudioplayback.md).

To explore all LiveKit documentation, see [llms.txt](https://docs.livekit.io/llms.txt).