IAudioSlots
interface
Slots
Slot signatures for <OrigamAudio>. Provides override points for the metadata strip, cover image, title, waveform canvas, transport controls, loading overlay and error overlay.
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.
- header() => any
- metadata() => any
- Override the entire title/artist/cover strip.
- cover() => any
- Override the cover image or placeholder.
- title() => any
- Override the title rendering.
- waveform(bindings: { peaks: Array<number>; currentTime: number; duration: number }) => any
- Override the waveform canvas. Receives peaks array + playhead context for custom rendering via SVG, WebGL or canvas.
- controls(bindings: IAudioScopedSlotBindings) => any
- Override the entire controls (replaces the default OrigamMediaController). Receives IAudioScopedSlotBindings.
- playlist(bindings: { tracks: Array<IAudioTrack> | undefined; currentIndex: number; select: (index: number) => void }) => any
- loading() => any
- Overlay rendered while the media is loading.
- error(bindings: { error: MediaError | Error }) => any
- Overlay rendered when an error occurred. Receives the error object.
Écosystème
Utilisé par
Composants et composables qui étendent ou consomment cette interface.
Usage
Exemples
Extraits de code prêts à coller utilisant cette interface.
Custom error overlay via the #error slot