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

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

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.

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

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

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

Playlist of IAudioTrack items

typescript