IUseMediaPlayerOptions
interface
Component Props
Options accepted by useMediaPlayer. The composable is media-agnostic — mediaRef accepts any HTMLMediaElement (audio OR video).
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>false
- Suppress autoplay when the user has requested reduced motion.
- mutedMaybeRefOrGetter<boolean>false
- Initial muted state.
- loopbooleanfalse
- Loop on ended.
- preload'none' | 'metadata' | 'auto''metadata'
- Buffering hint passed to the HTMLMediaElement.
- mediaRefRef<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.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Passing options to useMediaPlayer