IUseMediaPlayerOptions

interface
Component Props

Options accepted by useMediaPlayer. The composable is media-agnostic — mediaRef accepts any HTMLMediaElement (audio OR video).

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>
false
Suppress autoplay when the user has requested reduced motion.
muted
MaybeRefOrGetter<boolean>
false
Initial muted state.
loop
boolean
false
Loop on ended.
preload
'none' | 'metadata' | 'auto'
'metadata'
Buffering hint passed to the HTMLMediaElement.
mediaRef
Ref<HTMLMediaElement | null>
Resolves to the HTMLMediaElement to drive. When omitted, the composable creates an empty ref and expects the consumer to bind it on a <video ref> / <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.

Passing options to useMediaPlayer

typescript