IAudioScopedSlotBindings

interface
Slots

Bindings handed to the #controls scoped slot of <OrigamAudio>. State is exposed as plain unwrapped values (snapshot at render time) — Vue reactive re-invokes the slot on every meaningful change.

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.

playing
required
boolean
True while the audio is actively playing.
paused
required
boolean
True while the audio is paused.
currentTime
required
number
Current playhead position in seconds.
duration
required
number
Total duration of the current track in seconds.
buffered
required
number
Amount of audio buffered, in seconds.
volume
required
number
Current volume level (0..1).
muted
required
boolean
True when the audio is muted.
playbackRate
required
number
Current playback rate (e.g. 1 = normal speed, 2 = double speed).
loading
required
boolean
True while the audio source is loading.
error
required
MediaError | Error | null
The current error object, or null when no error.
methods
required
IAudioPlayerMethods
Imperative player methods (play, pause, seek, setVolume, …) from useAudioPlayer.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Custom controls via the #controls scoped slot

vue