Core Hooks
useThrelteAudio
This hook lets you consume the audio context. Although it can be useful, this is mostly used internally.
INFO
This hook needs context. Use only in a child component to
<Canvas>
.
Types
const {
audioListeners, // Map<string, AudioListener>
getAudioListener, // (id?: string) => AudioListener | undefined
addAudioListener, // (listener: AudioListener, id?: string) => void
removeAudioListener // (id?: string) => void
} = useThrelteAudio()