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.
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.
- variantTAudioVariant'expanded'
- Visual variant: 'expanded' (full strip with waveform) or 'compact' (slim transport dock).
- coverPositionTCoverPosition'left'
- Side of the surface where the album cover is painted. The controller sits on the opposite side.
- srcrequiredstring | IAudioSource | Array<IAudioSource>
- Media URL — a single string, an IAudioSource object or an array for codec fallback.
- tracksArray<IVideoTrack>[]
- Optional captions/chapters tracks attached to the audio element.
- titlestring
- Optional title shown above the controls.
- artiststring
- Optional artist/author shown next to the title.
- albumstring
- Optional album name shown below the artist.
- coverstring | ISrcObject
- Optional cover image (URL string or ISrcObject for srcset/lazy-src support).
- waveformboolean | 'auto'false
- Display the computed waveform above controls. 'auto' activates only when OfflineAudioContext is supported.
- waveformColorstring'currentColor'
- Stroke colour for the played portion of the waveform bars.
- autoplaybooleanfalse
- Starts playback as soon as loadedmetadata fires. Suppressed when the user has requested reduced motion.
- mutedbooleanfalse
- Starts the player muted.
- loopbooleanfalse
- Legacy loop flag — maps to loopMode="one". Prefer loopMode for new code.
- loopModeTAudioLoopMode'none'
- Tri-state loop strategy: 'none', 'all' (loop playlist) or 'one' (loop current track).
- shufflebooleanfalse
- Shuffle the playlist order when navigating with prev/next or auto-advancing.
- playlistArray<IAudioTrack>
- Optional list of tracks to play sequentially.
- currentTrackIndexnumber0
- Index of the currently-active track in the playlist. Supports v-model:currentTrackIndex.
- preload'none' | 'metadata' | 'auto''metadata'
- Buffering hint: 'metadata', 'none' or 'auto'.
- crossoriginstring
- Mirrors the native crossorigin attribute. Required when CORS-enabled origin needs WebAudio access.
- controlsTAudioControls'custom'
- Which control surface to render: 'custom' paints OrigamMediaController; 'native' uses the browser built-in controls.
- playbackRatesReadonlyArray<number>[0.5, 0.75, 1, 1.25, 1.5, 2]
- Available playback rates exposed via the config menu.
- playbackRatenumber1
- Initial playback rate.
- allowRemotePlaybackbooleanfalse
- Enable the cast/AirPlay button (Remote Playback API).
- downloadablebooleanfalse
- Adds a Download row to the cog menu.
- downloadFilenamestring
- 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