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
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- 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.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Custom error overlay via the #error slot