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.
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.
- srcrequisstring | IAudioSource | Array<IAudioSource>
- Absolute or root-relative audio URL, an IAudioSource object, or an array for codec fallback.
- titlestring
- Display title for this track. Falls back to the root title prop when omitted.
- artiststring
- Display artist. Falls back to the root artist prop.
- albumstring
- Display album. Falls back to the root album prop.
- coverstring
- Cover image URL. Falls back to the root cover prop.
- durationnumber
- Optional pre-known duration in seconds. Shown in the playlist list before the audio is loaded; overridden by runtime metadata once loaded.
- idstring | 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