WaveSurferPlayer Props

Complete reference for all available props and configuration options for theWaveSurferPlayer component.

Need More Information?

This component is built on top of WaveSurfer.js. For detailed configuration options, advanced features, and complete API documentation, visit the official WaveSurfer.js documentation.

WaveSurfer.js Documentation

Props Overview

Required Props

options
Required

Optional Props

plugins
Optional
events
Optional

Configuration Options

Waveform Styling

height
number

Height of the waveform in pixels

Default: 128
waveColor
string

Color of the waveform bars

Default: '#999'
progressColor
string

Color of the progress overlay

Default: '#555'

Bar Configuration

barWidth
number

Width of each waveform bar

Default: 1
barGap
number

Gap between waveform bars

Default: 0
barRadius
number

Border radius of bars

Default: 0

Complete Configuration Example

const options = {
  // Visual Configuration
  height: 48,
  waveColor: '#4F4A85',
  progressColor: '#383351',
  barWidth: 3,
  barGap: 2,
  barRadius: 4,
  
  // Audio Configuration
  url: 'https://example.com/audio.mp3',
  autoplay: false,
  loop: false,
  volume: 0.8,
  
  // Interaction Configuration
  cursorColor: '#333',
  cursorWidth: 2,
  interact: true,
  responsive: true,
  fillParent: true,
  
  // Advanced Configuration
  pixelRatio: 1,
  backend: 'WebAudio',
  normalize: true,
  minPxPerSec: 50
}

<WaveSurferPlayer :options="options" />

Available Events

Playback Events

@ready
WaveSurfer ready
@play
Playback started
@pause
Playback paused
@finish
Playback finished
@timeupdate
Time updated

Interaction Events

@click
Waveform clicked
@dblclick
Waveform double-clicked
@scroll
Waveform scrolled
@zoom
Waveform zoomed
@waveSurfer
WaveSurfer instance