/** * Returns the list of available **audio tracks** for the current media. * * This hook provides a reactive way to observe and respond to changes in the player’s * audio track model. Each track represents an available audio stream (for example, * different languages, commentary, or alternative mixes). * * ⚠️ Must be used within a {@link PlayerProvider} or * [AVPlayerViewControllerProvider](../../ios-avplayerviewcontroller-plugin-api/variables/AVPlayerViewControllerProvider.md) component. * * @returns `AudioTrack[]` An array of available {@link AudioTrack} for the current media. * * @example * ```tsx * import React from 'react'; * import { View, Text, Button } from 'react-native'; * import { usePlayer, useAudioTracks } from '@castlabs/react-native-prestoplay'; * * export default function AudioTrackSelector() { * const player = usePlayer(); * const tracks = useAudioTracks(); * const activeTrack = tracks.find(t => t.active); * * const selectTrack = (id: string) => { * const track = tracks.find(t => t.id === id); * if (track) player.getTrackManager().setAudioTrack(track); * }; * * return ( * * Audio Tracks * {tracks.map(t => ( *