IAudioProps

interface
Component Props

Full props contract for <OrigamAudio> — composes useAudioPlayer with OrigamMediaController to paint an opinionated audio card (cover + title/artist + transport bar). Exposes variant, cover, playlist, loop mode, shuffle, waveform, playback rates and the full design surface.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

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.

variant
TAudioVariant
'expanded'
Visual variant: 'expanded' (full strip with waveform) or 'compact' (slim transport dock).
coverPosition
TCoverPosition
'left'
Side of the surface where the album cover is painted. The controller sits on the opposite side.
src
required
string | IAudioSource | Array<IAudioSource>
Media URL — a single string, an IAudioSource object or an array for codec fallback.
tracks
Array<IVideoTrack>
[]
Optional captions/chapters tracks attached to the audio element.
title
string
Optional title shown above the controls.
artist
string
Optional artist/author shown next to the title.
album
string
Optional album name shown below the artist.
cover
string | ISrcObject
Optional cover image (URL string or ISrcObject for srcset/lazy-src support).
waveform
boolean | 'auto'
false
Display the computed waveform above controls. 'auto' activates only when OfflineAudioContext is supported.
waveformColor
string
'currentColor'
Stroke colour for the played portion of the waveform bars.
autoplay
boolean
false
Starts playback as soon as loadedmetadata fires. Suppressed when the user has requested reduced motion.
muted
boolean
false
Starts the player muted.
loop
boolean
false
Legacy loop flag — maps to loopMode="one". Prefer loopMode for new code.
loopMode
TAudioLoopMode
'none'
Tri-state loop strategy: 'none', 'all' (loop playlist) or 'one' (loop current track).
shuffle
boolean
false
Shuffle the playlist order when navigating with prev/next or auto-advancing.
playlist
Array<IAudioTrack>
Optional list of tracks to play sequentially.
currentTrackIndex
number
0
Index of the currently-active track in the playlist. Supports v-model:currentTrackIndex.
preload
'none' | 'metadata' | 'auto'
'metadata'
Buffering hint: 'metadata', 'none' or 'auto'.
crossorigin
string
Mirrors the native crossorigin attribute. Required when CORS-enabled origin needs WebAudio access.
controls
TAudioControls
'custom'
Which control surface to render: 'custom' paints OrigamMediaController; 'native' uses the browser built-in controls.
playbackRates
ReadonlyArray<number>
[0.5, 0.75, 1, 1.25, 1.5, 2]
Available playback rates exposed via the config menu.
playbackRate
number
1
Initial playback rate.
allowRemotePlayback
boolean
false
Enable the cast/AirPlay button (Remote Playback API).
downloadable
boolean
false
Adds a Download row to the cog menu.
downloadFilename
string
Override the downloaded file name. Defaults to the trailing segment of the source URL.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Audio player with playlist and waveform

vue