IMediaControllerProps

interface
Component Props

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.

typescript

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.

state
requis
IMediaPlayerState
Reactive media state from useMediaPlayer() (or any specialisation: useVideoPlayer, useAudioPlayer). Required.
methods
requis
IMediaPlayerMethods
Imperative methods from useMediaPlayer(). Required.
inset
boolean
false
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.
visible
boolean
true
Visibility flag driven by the parent autohide logic.
playbackRates
ReadonlyArray<number>
[0.5, 0.75, 1, 1.25, 1.5, 2]
Available playback rates exposed via the config menu.
allowRemotePlayback
boolean
false
Enable the cast / AirPlay button (Remote Playback API).
downloadable
boolean
false
Adds a "Download" row to the config menu.
downloadUrl
string | null
null
URL surfaced to the consumer when "Download" is clicked.
downloadFilename
string
Suggested filename written to the <a download="…"> attribute.
qualityOptions
ReadonlyArray<TQualityOption>
[]
Optional list of quality variants. When the array exposes >= 2 entries, a "Quality" drill-down appears in the config menu.
currentQuality
string | null
null
Currently-active quality identifier.
showPrevious
boolean
false
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.
showNext
boolean
false
Show the "next" transport button. Parent owns the action.
showLoop
boolean
false
Show the tri-state loop button (none → all → one → none).
showShuffle
boolean
false
Show the shuffle toggle button.
loopMode
TAudioLoopMode
'none'
Current loop mode. Supports v-model:loopMode. The Controller cycles this on click; the parent observes and applies its playlist / <audio loop> policy.
shuffle
boolean
false
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

vue