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

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.

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
requis
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.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Audio player with playlist and waveform

vue