IAudioTrack

interface
Component Props

Descriptor for a single track in an <OrigamAudio> playlist. The src field is mandatory; title, artist, album and cover are optional metadata surfaced on the player chrome when the track becomes active.

TypeScript

Definition

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

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

src
required
string | IAudioSource | Array<IAudioSource>
Absolute or root-relative audio URL, an IAudioSource object, or an array for codec fallback.
title
string
Display title for this track. Falls back to the root title prop when omitted.
artist
string
Display artist. Falls back to the root artist prop.
album
string
Display album. Falls back to the root album prop.
cover
string
Cover image URL. Falls back to the root cover prop.
duration
number
Optional pre-known duration in seconds. Shown in the playlist list before the audio is loaded; overridden by runtime metadata once loaded.
id
string | number
Optional stable identifier used as the list key. Defaults to the array index when omitted.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Playlist of IAudioTrack items

typescript