IMediaControllerProps
Props for <OrigamMediaController> — the universal media-controls shell consumed by <OrigamVideo> and <OrigamAudio>. Purely presentational: it receives state and methods from the parent and emits intents back. Audio-specific controls (loop, shuffle, prev/next) are opt-in so video consumers see zero regression.
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.
Héritage
Hérite de
Interfaces parentes dont celle-ci hérite. Leurs propriétés sont disponibles pour tout consommateur de cette interface.
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.
- staterequisIMediaPlayerState
- Reactive media state from useMediaPlayer() (or any specialisation: useVideoPlayer, useAudioPlayer). Required.
- methodsrequisIMediaPlayerMethods
- Imperative methods from useMediaPlayer(). Required.
- insetbooleanfalse
- YouTube-style overlay mode: the shell sits on top of the media surface with a dark gradient and auto-hides on visible=false. When false, the shell renders as a regular always-on toolbar.
- visiblebooleantrue
- Visibility flag driven by the parent autohide logic.
- playbackRatesReadonlyArray<number>[0.5, 0.75, 1, 1.25, 1.5, 2]
- Available playback rates exposed via the config menu.
- allowRemotePlaybackbooleanfalse
- Enable the cast / AirPlay button (Remote Playback API).
- downloadablebooleanfalse
- Adds a "Download" row to the config menu.
- downloadUrlstring | nullnull
- URL surfaced to the consumer when "Download" is clicked.
- downloadFilenamestring
- Suggested filename written to the <a download="…"> attribute.
- qualityOptionsReadonlyArray<TQualityOption>[]
- Optional list of quality variants. When the array exposes >= 2 entries, a "Quality" drill-down appears in the config menu.
- currentQualitystring | nullnull
- Currently-active quality identifier.
- showPreviousbooleanfalse
- Show the "previous" transport button. The parent listens to the previous emit and decides whether to skip back 10s (single-track) or jump to the previous playlist track.
- showNextbooleanfalse
- Show the "next" transport button. Parent owns the action.
- showLoopbooleanfalse
- Show the tri-state loop button (none → all → one → none).
- showShufflebooleanfalse
- Show the shuffle toggle button.
- loopModeTAudioLoopMode'none'
- Current loop mode. Supports v-model:loopMode. The Controller cycles this on click; the parent observes and applies its playlist / <audio loop> policy.
- shufflebooleanfalse
- Current shuffle state. Supports v-model:shuffle. The Controller toggles on click; the parent reads and switches its next-track resolution accordingly.
Écosystème
Utilisé par
Composants et composables qui étendent ou consomment cette interface.
Usage
Exemples
Extraits de code prêts à coller utilisant cette interface.
Using OrigamMediaController inside a video component