Optional
audioOptional
autoIf autoScroll is enabled, keep the cursor in the center of the waveform during playback
Optional
autoAutomatically scroll the container to keep the current position in viewport
Optional
autoplay?: booleanPlay the audio on load
Optional
backend?: "WebAudio" | "MediaElement"Playback "backend" to use, defaults to MediaElement
Optional
barVertical bar alignment
Optional
barSpacing between bars in pixels
Optional
barA vertical scaling factor for the waveform
Optional
barRounded borders for bars
Optional
barIf set, the waveform will be rendered with bars like this: ▁ ▂ ▇ ▃ ▅ ▂
Required: an HTML element or selector where the waveform will be rendered
Optional
cspNonce for CSP if necessary
Optional
cursorThe color of the playpack cursor
Optional
cursorThe cursor width
Optional
dragAllow to drag the cursor to seek to a new position. If an object with debounceTime
is provided instead
then dragToSeek
will also be true. If true
the default is 200ms
Optional
duration?: numberPre-computed audio duration in seconds
Optional
fetchOptions to pass to the fetch method
Optional
fillStretch the waveform to fill the container, true by default
Optional
height?: number | "auto"The height of the waveform in pixels, or "auto" to fill the container height
Optional
hideHide the scrollbar
Optional
interact?: booleanPass false to disable clicks on the waveform
Optional
media?: HTMLMediaElementUse an existing media element instead of creating one
Optional
mediaWhether to show default audio element controls
Optional
minMinimum pixels per second of audio (i.e. the zoom level)
Optional
normalize?: booleanStretch the waveform to the full height
Optional
peaks?: (Float32Array | number[])[]Pre-computed audio data, arrays of floats for each channel
Optional
plugins?: GenericPlugin[]The list of plugins to initialize on start
Optional
progressThe color of the progress mask
Optional
renderCustom render function
Optional
sampleDecoding sample rate. Doesn't affect the playback. Defaults to 8000
Optional
splitRender each audio channel as a separate waveform
Optional
url?: stringAudio URL
Optional
waveThe color of the waveform
Optional
width?: number | stringThe width of the waveform in pixels or any CSS value; defaults to 100%
Generated using TypeDoc
Audio rate, i.e. the playback speed