# Audio track

Audio track state and actions for the player store

Tracks available audio tracks and selects the enabled track.

## Import

```ts
import { audioTrackFeature } from '@videojs/html';
```

The `videoFeatures` [feature bundle](https://videojs.org/docs/framework/html/guides/presets) includes this feature.

## API Reference

### State

| Property | Type | Description |
| --- | --- | --- |
| `audioTrackList` | `MediaAudioTrack[]` | Audio tracks available for manual track selection. |

### Actions

| Action | Type | Description |
| --- | --- | --- |
| `selectAudioTrack` | `(value: string) => void` | Select an audio track by menu value. |

### Selector

Pass `selectAudioTrack` to [`PlayerController`](https://videojs.org/docs/framework/html/reference/api/player-controller) to subscribe to audio track state. Returns `undefined` if the audio track feature is not configured.

**audio-track-info.ts**

```ts
import { createPlayer, UIElement, selectAudioTrack } from '@videojs/html';
import { videoFeatures } from '@videojs/html/video';

const { PlayerController } = createPlayer({ features: videoFeatures });

class AudioTrackInfo extends UIElement {
  readonly #audioTrack = new PlayerController(this, selectAudioTrack);
}
```

---

HTML documentation: https://videojs.org/docs/framework/html/llms.txt
All documentation: https://videojs.org/llms.txt
