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.

typescript

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.

autoplay
MaybeRefOrGetter<boolean>
Suppress autoplay when the user has requested reduced motion.
muted
MaybeRefOrGetter<boolean>
Initial muted state.
loop
boolean
Loop on ended.
preload
'none' | 'metadata' | 'auto'
Buffering hint.
audioRef
Ref<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

typescript