IUseOrigamAudioPlayerOptions
interface
Composable Options
Options accepted by the Audio-namespace useAudioPlayer composable. Named distinctly from the legacy IUseAudioPlayerOptions in the Sound namespace so both can coexist in the public barrel.
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- autoplayMaybeRefOrGetter<boolean>
- Suppress autoplay when the user has requested reduced motion.
- mutedMaybeRefOrGetter<boolean>
- Initial muted state.
- loopboolean
- Loop on ended.
- preload'none' | 'metadata' | 'auto'
- Buffering hint.
- audioRefRef<HTMLAudioElement | null>
- Resolves to the HTMLAudioElement to drive. When omitted, the composable creates an empty ref and expects the consumer to bind it on a <audio ref> themselves.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Wiring useAudioPlayer to an <audio> element