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
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
Inheritance
Extends
Parent interfaces this one inherits from. Their properties are available on every consumer of this interface.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- staterequiredIMediaPlayerState
- Reactive media state from useMediaPlayer() (or any specialisation: useVideoPlayer, useAudioPlayer). Required.
- methodsrequiredIMediaPlayerMethods
- 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.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Using OrigamMediaController inside a video component