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
Définition
La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.
API
Propriétés
Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.
- 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.
Écosystème
Utilisé par
Composants et composables qui étendent ou consomment cette interface.
Usage
Exemples
Extraits de code prêts à coller utilisant cette interface.
Wiring useAudioPlayer to an <audio> element