Class: Waveform

Waveform(bufferPlayer, endTime, options)

A Waveform visual represents the time domain of the specified audio.

Constructor

new Waveform(bufferPlayer, endTime, options)

Create a waveform visual.
Parameters:
Name Type Description
bufferPlayer Object The audio source to use to create this waveform.
endTime number The absolute end time (not equal to the audio's actual end time) to use for this waveform.
options Object Configuration options.
Author:
  • Lawrence Fyfe
Source:

Methods

addProperty(name, value)

Add the specified property to this visual. The property is stored as [name, value].
Parameters:
Name Type Description
name string The name of the property.
value string The value of the property.
Source:

draw()

Draw this visual.
Source:

erase()

Erase this visual.
Source:

initialize(parentElement, width, height, timeScale)

Initialize this visual.
Parameters:
Name Type Description
parentElement Element The parent element.
width number The parent width.
height number The parent height.
timeScale d3.scaleLinear The time scale.
Source: